org.xbrlapi.data.resource
Class BaseMatcherImpl
java.lang.Object
org.xbrlapi.data.resource.BaseMatcherImpl
- All Implemented Interfaces:
- Serializable, Matcher
- Direct Known Subclasses:
- InMemoryMatcherImpl, InStoreMatcherImpl
public abstract class BaseMatcherImpl
- extends Object
- implements Matcher
- Author:
- Geoffrey Shuetrim (geoff@galexy.net)
- See Also:
- Serialized Form
BaseMatcherImpl
public BaseMatcherImpl(Cache cache,
Signer signature)
throws XBRLException
- Parameters:
cache - The resource cache to be used by the matcher when accessing
resources to determine their signature.signature - The object used to generate resource signatures.
- Throws:
XBRLException - if either parameter is null.
getCache
protected Cache getCache()
setCache
protected void setCache(Cache cache)
getSigner
protected Signer getSigner()
setSigner
public void setSigner(Signer signer)
- Description copied from interface:
Matcher
- Call this method if you need to use a different signature
generator for the resources you are working with.
- Specified by:
setSigner in interface Matcher
- Parameters:
signer - The object used to generate signatures.
getSignature
public String getSignature(URI uri)
throws XBRLException
- Specified by:
getSignature in interface Matcher
- Parameters:
uri - The URI of the resource to obtain the signature for.
- Returns:
- the signature for the resource specified by the URI or null
if the resource could not be accessed.
- Throws:
XBRLException - if the signature cannot be constructed.- See Also:
Matcher.getSignature(URI)
getResourceContent
protected List<String> getResourceContent(File file)
throws XBRLException
- Throws:
XBRLException
getResourceContent
protected List<String> getResourceContent(URI uri)
throws XBRLException
- Throws:
XBRLException
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
- See Also:
Object.hashCode()
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object