XBRLAPI

A Java API for XBRL


org.xbrlapi.data.resource
Interface Matcher

All Superinterfaces:
Serializable
All Known Implementing Classes:
BaseMatcherImpl, DefaultMatcherImpl, InMemoryMatcherImpl, InStoreMatcherImpl

public interface Matcher
extends Serializable

The resource matcher interface, defining all methods that need to be implemented by a resource matcher to support XBRLAPI data stores.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Method Summary
 URI delete(URI uri)
          Deletes the given URI from the matcher.
 List<URI> getAllMatchingURIs(URI uri)
           
 URI getMatch(URI uri)
          As a side effect, this method adds the specified URI to the matcher.
 String getSignature(URI uri)
           
 boolean hasURI(URI uri)
           
 void setSigner(Signer signer)
          Call this method if you need to use a different signature generator for the resources you are working with.
 

Method Detail

setSigner

void setSigner(Signer signer)
Call this method if you need to use a different signature generator for the resources you are working with.

Parameters:
signer - The object used to generate signatures.

getSignature

String getSignature(URI uri)
                    throws XBRLException
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.

getMatch

URI getMatch(URI uri)
             throws XBRLException
As a side effect, this method adds the specified URI to the matcher.

Parameters:
uri - The URI of the resource to be tested for a match.
Returns:
the URI of the matching resource in the data store if one exists and the original URI otherwise (because it becomes the matching URI in the data store).
Throws:
XBRLException

hasURI

boolean hasURI(URI uri)
               throws XBRLException
Parameters:
uri - The URI to test.
Returns:
true if the matcher has a URI that is a match for the given URI (this match may be the URI itself).
Throws:
XBRLException

getAllMatchingURIs

List<URI> getAllMatchingURIs(URI uri)
                             throws XBRLException
Parameters:
uri - The URI of the resource to be tested for a match.
Returns:
a list of all URIs that match the given URI, including the given URI.
Throws:
XBRLException

delete

URI delete(URI uri)
           throws XBRLException
Deletes the given URI from the matcher.

Parameters:
uri - The URI to delete.
Returns:
the new match URI for documents that used to match the given URI or null if there is none.
Throws:
XBRLException - if the URI is null.

Get Java XBRL API implementation at SourceForge.net.