org.xbrlapi.data.resource
Class BaseMatcherImpl
java.lang.Object
org.xbrlapi.data.resource.BaseMatcherImpl
- All Implemented Interfaces:
- Matcher
- Direct Known Subclasses:
- InMemoryMatcherImpl, InStoreMatcherImpl
public abstract class BaseMatcherImpl
- extends Object
- implements Matcher
- Author:
- Geoffrey Shuetrim (geoff@galexy.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xbrlapi.data.resource.Matcher |
getMatch |
BaseMatcherImpl
public BaseMatcherImpl(CacheImpl 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 CacheImpl getCache()
setCache
protected void setCache(CacheImpl cache)
getSignature
protected Signer getSignature()
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 cached (generally because it does not exist).
- Throws:
XBRLException - if the signature cannot be constructed.- See Also:
Matcher.getSignature(URI)
getResourceContent
protected List<String> getResourceContent(File file)
throws XBRLException
- Throws:
XBRLException