|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbrlapi.data.BaseStoreImpl
public abstract class BaseStoreImpl
Abstract base implementation of the data store providing all methods of the store interface that do not depend on the nature of the underlying data store implementation.
| Field Summary | |
|---|---|
protected DOMImplementationLS |
domImplementation
|
protected Matcher |
matcher
Resource matcher |
protected HashMap<URI,String> |
namespaceBindings
Namespace bindings |
protected Document |
storeDOM
The DOM document used to construct DOM representations of subtrees of documents in the store. |
| Constructor Summary | |
|---|---|
BaseStoreImpl()
|
|
| Method Summary | ||
|---|---|---|
void |
augmentNetworkForFragment(Fragment fragment,
Network network)
This method is recursive. |
|
void |
augmentNetworksForFragment(Fragment fragment,
URI arcrole,
Networks networks)
This method is recursive. |
|
void |
clearFilteringURIs()
Specify that the data store is not to filter query results to only come from a specified set of URIs. |
|
void |
close()
Does nothing. |
|
void |
deleteDocument(URI uri)
Algorithm: Check if the matcher indicate that the URI has matching URIs. If the URI has matching URIs: If the URI is the one used for the document in the data store: Delete the URI from the matcher, getting the new matching URI back as a result of the deletion operation and update the document fragments to use the new matching URI instead of the deleted URI. Otherwise, just delete the URI from the matcher and we are done. Otherwise, the URI does not have matching URIs so just delete the URI from the matcher and delete the relevant fragments from the data store. |
|
void |
deleteRelatedDocuments(URI uri)
This deletion method ensures that all related documents are also deleted from the data store. |
|
protected String |
DOM2String(Element element)
Convert a DOM element (and its descendents) to a string. |
|
boolean |
equals(Object obj)
|
|
protected void |
finalize()
|
|
Set<String> |
getAllFactIndices()
|
|
List<Fact> |
getAllFacts()
|
|
List<Fact> |
getAllFacts(URI uri)
|
|
Analyser |
getAnalyser()
|
|
Set<String> |
getArcIndices(String linkIndex)
|
|
Set<String> |
getArcIndices(URI arcrole)
|
|
Set<URI> |
getArcroles()
|
|
Set<URI> |
getArcroles(URI linkRole)
|
|
List<ArcroleType> |
getArcroleTypes()
|
|
List<ArcroleType> |
getArcroleTypes(URI uri)
|
|
List<Arc> |
getArcs(String linkIndex)
|
|
List<Arc> |
getArcs(URI arcrole,
String linkIndex)
|
|
|
getChildFragments(Class<?> childClass,
String parentIndex)
|
|
|
getChildFragments(String interfaceName,
String parentIndex)
|
|
Document |
getCompositeDocument()
Get all data in the store as a single XML DOM object including the annotations used in the XBRLComposer project. |
|
Concept |
getConcept(URI namespace,
String name)
|
|
Element |
getDocumentAsDOM(URI uri)
Get a single document in the store as a DOM. |
|
List<URI> |
getDocumentsToDiscover()
|
|
Set<URI> |
getDocumentURIs()
Get a list of the URIs that have been stored. |
|
Set<String> |
getExtendedLinkIndices(URI linkRole)
|
|
List<ExtendedLink> |
getExtendedLinks(URI linkrole)
|
|
Set<String> |
getFactIndices()
|
|
List<Fact> |
getFacts()
|
|
List<Fact> |
getFacts(Concept concept)
|
|
List<Fact> |
getFacts(URI uri)
|
|
List<Fact> |
getFacts(URI namespace,
String localname)
|
|
Set<URI> |
getFilteringURIs()
|
|
protected Element |
getFollowingSibling(Element parentElement,
int precedingSiblings)
Get the following sibling of this fragment's root in the parent fragment's data. |
|
Set<String> |
getFragmentIndices(String interfaceName)
|
|
Set<String> |
getFragmentIndicesFromDocument(URI uri)
|
|
Set<String> |
getFragmentIndicesFromDocument(URI uri,
String interfaceName)
|
|
|
getFragmentsFromDocument(URI uri,
Class<?> fragmentClass)
|
|
|
getFragmentsFromDocument(URI uri,
String interfaceName)
Utility method to return a list of fragments in a data store that have a type corresponding to the specified fragment interface name and that are in the document with the specified URI. |
|
|
getGlobalDeclaration(URI namespace,
String name)
|
|
String |
getId(String input)
This implementation generates the an ID for a document being stored with a prefix that is a random string of characters including a-z, A-Z and 0-9. |
|
List<Item> |
getItems()
|
|
List<Item> |
getItems(URI uri)
|
|
List<LabelResource> |
getLabels(String fragment)
Implemented by Store.getLabels(String,URI,URI,String). |
|
List<LabelResource> |
getLabels(String fragment,
String language)
Implemented by Store.getLabels(String,URI,URI,String). |
|
List<LabelResource> |
getLabels(String fragment,
URI resourceRole)
Implemented by Store.getLabels(String,URI,URI,String). |
|
List<LabelResource> |
getLabels(String fragment,
URI resourceRole,
String language)
Implemented by Store.getLabels(String,URI,URI,String). |
|
List<LabelResource> |
getLabels(String fragment,
URI linkRole,
URI resourceRole,
String language)
If using persisted relationships then the set of relationships used to generate the results can be modified by appropriate choice of |
|
Language |
getLanguage(String encoding,
String code)
|
|
Map<String,Language> |
getLanguageMap(String code)
|
|
List<Language> |
getLanguages(String code)
|
|
Set<URI> |
getLinkRoles()
|
|
Set<URI> |
getLinkRoles(URI arcrole)
|
|
Matcher |
getMatcher()
|
|
Network |
getMinimalNetwork(Set<Fragment> fragments,
URI linkRole,
URI arcrole)
|
|
Networks |
getMinimalNetworksWithArcrole(Fragment fragment,
URI arcrole)
Convenience method for a single fragment. |
|
Networks |
getMinimalNetworksWithArcrole(Set<Fragment> fragments,
URI arcrole)
Get the networks that, at a minimum, contain the relationships from each of the given fragments working back through ancestor relationships as far as possible. |
|
Set<URI> |
getMinimumDocumentSet(Collection<URI> starters)
|
|
Set<URI> |
getMinimumDocumentSet(URI uri)
This is just a convenience method. |
|
Set<URI> |
getMissingDocumentURIs()
|
|
|
getNetworkRoots(URI linkRole,
URI arcrole)
This implementation is not as strict as the XBRL 2.1 specification requires but it is generally faster and delivers sensible results. |
|
Networks |
getNetworks()
Note that this can massively overload resources if the data store is large because much of the information in the store will be reflected in -in-memory objects. |
|
Networks |
getNetworks(URI arcrole)
|
|
Networks |
getNetworks(URI linkRole,
URI arcrole)
|
|
Networks |
getNetworksFrom(String sourceIndex)
Implemented by Store.getNetworksFrom(String,URI,URI). |
|
Networks |
getNetworksFrom(String sourceIndex,
URI arcrole)
Implemented by Store.getNetworksFrom(String,URI,URI). |
|
Networks |
getNetworksFrom(String sourceIndex,
URI linkRole,
URI arcrole)
|
|
Networks |
getNetworksTo(String targetIndex)
Implemented by Store.getNetworksTo(String,URI,URI). |
|
Networks |
getNetworksTo(String targetIndex,
URI arcrole)
Implemented by Store.getNetworksTo(String,URI,URI). |
|
Networks |
getNetworksTo(String targetIndex,
URI linkRole,
URI arcrole)
If using persisted relationships then the set of relationships used to generate the results can be modified by appropriate choice of |
|
long |
getNumberOfXMLResources(Class<?> specifiedClass)
|
|
Set<URI> |
getReferencedDocuments(URI uri)
Override this method in a data store implementation if the data store implementation supports XQuery (rather than XPath). |
|
List<ReferenceResource> |
getReferences(String fragment)
Implemented by Store.getReferences(String,URI,URI,String). |
|
List<ReferenceResource> |
getReferences(String fragment,
String language)
Implemented by Store.getReferences(String,URI,URI,String). |
|
List<ReferenceResource> |
getReferences(String fragment,
URI resourceRole)
Implemented by Store.getReferences(String,URI,URI,String). |
|
List<ReferenceResource> |
getReferences(String fragment,
URI resourceRole,
String language)
Implemented by Store.getReferences(String,URI,URI,String). |
|
List<ReferenceResource> |
getReferences(String fragment,
URI linkRole,
URI resourceRole,
String language)
If using persisted relationships then the set of relationships used to generate the results can be modified by appropriate choice of |
|
List<URI> |
getReferencingDocuments(URI uri)
|
|
List<Fragment> |
getReferencingFragments(URI uri)
|
|
SortedSet<Relationship> |
getRelationshipsFrom(String sourceIndex,
URI linkRole,
URI arcrole)
If using persisted relationships then the set of relationships used to generate the results can be modified by appropriate choice of |
|
SortedSet<Relationship> |
getRelationshipsTo(String targetIndex,
URI linkRole,
URI arcrole)
|
|
List<URI> |
getResourceRoles()
|
|
List<RoleType> |
getRoleTypes()
|
|
List<RoleType> |
getRoleTypes(URI uri)
|
|
|
getRootFragmentForDocument(URI uri)
|
|
Set<String> |
getRootFragmentIndices(String interfaceName)
|
|
|
getRootFragments()
|
|
|
getRootFragments(String interfaceName)
|
|
Schema |
getSchema(URI targetNamespace)
|
|
|
getSchemaContent(URI namespace,
String name)
|
|
Set<String> |
getSourceIndices(String targetIndex,
URI linkRole,
URI arcrole)
|
|
|
getSources(String targetIndex,
URI linkRole,
URI arcrole)
|
|
Document |
getStoreAsDOM()
Get all data in the store as a single XML DOM object. |
|
List<Stub> |
getStubs()
|
|
List<Stub> |
getStubs(URI uri)
|
|
Element |
getSubtree(Fragment f)
Returns the root element of the subtree starting with the fragment with the specified index. |
|
|
getTargets(String sourceIndex,
URI linkRole,
URI arcrole)
|
|
List<Tuple> |
getTuples()
|
|
List<Tuple> |
getTuples(URI uri)
|
|
protected String |
getURIFilteringPredicate()
|
|
|
getXMLResources(Class<?> specifiedClass)
Return a list of XML resources in a data store that have a type corresponding to the specified XML resource interface name. |
|
|
getXMLResources(String interfaceName)
Return a list of XML resources in a data store that have a type corresponding to the specified XML resource interface name. |
|
boolean |
hasAllRelationships(URI document)
|
|
boolean |
hasDocument(URI uri)
Test if a particular URI is already in the data store. |
|
int |
hashCode()
|
|
boolean |
isFilteringByURIs()
|
|
boolean |
isLoading()
|
|
boolean |
isPersistingRelationships()
|
|
void |
persistLoaderState(Map<URI,String> documents)
Stores the state of the document discovery process. |
|
void |
persistStub(URI uri,
String reason)
|
|
String |
queryForString(String query)
Run a query that is required to return a single string. |
|
void |
recindLoadingRightsFor(Loader loader,
URI document)
Loaders need to call this method to indicate that they are recinding responsibility for loading the document. |
|
void |
remove(XML xml)
Remove a XML resource from the underlying data structure. |
|
void |
removeStub(Stub stub)
|
|
boolean |
requestLoadingRightsFor(Loader loader,
URI document)
Loaders need to call this method to indicate that they are going to take responsibility for loading the document. |
|
void |
saveDocuments(File destination)
Serializes the individual documents in the data store, saving them into a directory structure that is placed into the specified directory. |
|
void |
saveDocuments(File destination,
String uriPrefix)
Serializes those documents in the data store with a URI that begins with the specified URI prefix. |
|
void |
saveStoreAsSingleDocument(File file)
Creates a single DOM structure from all documents in the data store and saves this single XML structure in the specified file. |
|
String |
serialize(Element what)
Serialize the specified XML DOM node. |
|
void |
serialize(Element what,
File destination)
Serialize the specified XML DOM to the specified destination. |
|
void |
serialize(Element what,
OutputStream destination)
Serialize the specified XML DOM to the specified destination. |
|
void |
setAnalyser(Analyser analyser)
|
|
void |
setFilteringURIs(Set<URI> uris)
|
|
void |
setMatcher(Matcher matcher)
Sets the matcher for the store to use. |
|
void |
setNamespaceBinding(URI namespace,
String prefix)
|
|
void |
startLoading(Loader loader)
|
|
void |
stopLoading(Loader loader)
|
|
void |
sync()
Default implementation does nothing. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xbrlapi.data.Store |
|---|
delete, getSize, getXMLResource, hasXMLResource, persist, queryCount, queryForIndices, queryForStrings, queryForXMLResources, remove |
| Field Detail |
|---|
protected transient Document storeDOM
protected transient DOMImplementationLS domImplementation
protected Matcher matcher
protected HashMap<URI,String> namespaceBindings
| Constructor Detail |
|---|
public BaseStoreImpl()
throws XBRLException
XBRLException| Method Detail |
|---|
public long getNumberOfXMLResources(Class<?> specifiedClass)
throws XBRLException
getNumberOfXMLResources in interface StorespecifiedClass - The class of XML resource to count.
XBRLExceptionStore.getNumberOfXMLResources(Class)
public void setMatcher(Matcher matcher)
throws XBRLException
Store
setMatcher in interface Storematcher - the matcher to use to identify identical resources.
XBRLException - if the matcher is null;Store.setMatcher(Matcher)public Matcher getMatcher()
getMatcher in interface StoreStore.getMatcher()
public void setNamespaceBinding(URI namespace,
String prefix)
throws XBRLException
setNamespaceBinding in interface Storenamespace - The namespace to bind a prefix to for queryingprefix - The prefix to bind to the namespace for querying
XBRLException - if either argument is null.Store.setNamespaceBinding(URI,String)public void setFilteringURIs(Set<URI> uris)
setFilteringURIs in interface Storeuris - The set of URIs to restrict query results to coming from.
The set of URIs is set to the empty set if this parameter is null.Store.setFilteringURIs(Set)public Set<URI> getFilteringURIs()
getFilteringURIs in interface StoreStore.getFilteringURIs()public void clearFilteringURIs()
Store
clearFilteringURIs in interface StoreStore.clearFilteringURIs()public boolean isFilteringByURIs()
isFilteringByURIs in interface StoreStore.isFilteringByURIs()protected String getURIFilteringPredicate()
public void close()
throws XBRLException
close in interface StoreXBRLExceptionStore.close()
public void persistLoaderState(Map<URI,String> documents)
throws XBRLException
Store
persistLoaderState in interface Storedocuments - The map from URIs of the documents
remaining to be discovered to the textual reason why
the document has not yet been discovered.
XBRLExceptionStore.persistLoaderState(Map)
public void persistStub(URI uri,
String reason)
throws XBRLException
persistStub in interface Storeuri - The document to store a stub for.reason - The reason the document has not been stored.
XBRLExceptionStore.persistStub(URI,String)
public void sync()
throws XBRLException
sync in interface StoreXBRLException - if the sync operation fails.Store.sync()
public String getId(String input)
throws XBRLException
getId in interface Storeinput - The string that may be used to generate the id.
XBRLExceptionStore.getId(String)
public void serialize(Element what,
OutputStream destination)
throws XBRLException
Store
serialize in interface Storewhat - the root element of the DOM to be serialised.destination - The destination output stream to be serialised to.
XBRLException - if the DOM cannot be serialised
because the destination cannot be written to or some other
different problem occurs during serialisation.Store.serialize(Element, OutputStream)
public String serialize(Element what)
throws XBRLException
Store
serialize in interface Storewhat - the root element of the DOM to be serialised.
XBRLExceptionStore.serialize(Element)
public void deleteDocument(URI uri)
throws XBRLException
deleteDocument in interface Storeuri - The URI of the document to delete from the data store.
XBRLExceptionStore.deleteDocument(URI)
public void deleteRelatedDocuments(URI uri)
throws XBRLException
Store
deleteRelatedDocuments in interface Storeuri - The URI of the document to delete.
XBRLExceptionStore.deleteRelatedDocuments(URI)
public List<URI> getReferencingDocuments(URI uri)
throws XBRLException
getReferencingDocuments in interface Storeuri - The URI of the referenced document.
XBRLException - if the list of referencing documents cannot be populated.Store.getReferencingDocuments(URI)
public List<Fragment> getReferencingFragments(URI uri)
throws XBRLException
getReferencingFragments in interface Storeuri - The URI of the referenced document.
XBRLExceptionStore.getReferencingFragments(URI)
public Set<URI> getReferencedDocuments(URI uri)
throws XBRLException
Store
getReferencedDocuments in interface Storeuri - The URI of the referencing document.
XBRLException - if the set of referenced documents cannot be populated.Store.getReferencedDocuments(URI)
public void serialize(Element what,
File destination)
throws XBRLException
Store
serialize in interface Storewhat - the root element of the DOM to be serialised.destination - The destination file to be serialised to.
XBRLException - if the DOM cannot be serialised
because the destination cannot be written to or some other
different problem occurs during serialisation.Store.serialize(Element, File)
public Set<URI> getDocumentURIs()
throws XBRLException
Store
getDocumentURIs in interface StoreXBRLException - if the list cannot be constructed.Store.getDocumentURIs()
public boolean hasDocument(URI uri)
throws XBRLException
Store
hasDocument in interface Storeuri - the string representation of the URI to be tested for.
XBRLExceptionStore.hasDocument(URI)
public Element getDocumentAsDOM(URI uri)
throws XBRLException
Store
getDocumentAsDOM in interface Storeuri - The URI of the document to be retrieved.
XBRLException - if the document cannot be constructed as a DOM.Store.getDocumentAsDOM(URI)
public Element getSubtree(Fragment f)
throws XBRLException
Store
getSubtree in interface Storef - The fragment at the root of the subtree.
XBRLException - if the subtree cannot be constructed.Store.getSubtree(Fragment)
protected Element getFollowingSibling(Element parentElement,
int precedingSiblings)
parentElement - The parent element in the parent fragment's data.precedingSiblings - The number of sibling elements preceding the element of interest.
public Document getStoreAsDOM()
throws XBRLException
Store
getStoreAsDOM in interface StoreXBRLException - if the DOM cannot be constructed.Store.getStoreAsDOM()
public Document getCompositeDocument()
throws XBRLException
Store
getCompositeDocument in interface StoreXBRLException - if the composed data store cannot be constructed.Store.getCompositeDocument()
public List<Stub> getStubs()
throws XBRLException
getStubs in interface StoreXBRLExceptionStore.getStubs()
public List<Stub> getStubs(URI uri)
throws XBRLException
getStubs in interface Storeuri - The string value of the URI of the document to get the stub for.
XBRLExceptionStore.getStubs(URI)
public void removeStub(Stub stub)
throws XBRLException
removeStub in interface Storestub - The stub to be removed from the data store.
XBRLExceptionStore.removeStub(Stub)
public void remove(XML xml)
throws XBRLException
Store
remove in interface Storexml - The XML resource to remove.
XBRLException - if the XML resource cannot be removed from the store.Store.remove(XML)
public List<URI> getDocumentsToDiscover()
throws XBRLException
getDocumentsToDiscover in interface StoreXBRLException - if any of the document URIs are malformed.Store.getDocumentsToDiscover()
public void saveDocuments(File destination)
throws XBRLException
Store
saveDocuments in interface Storedestination - The folder in which the directory structure and
the documents in the data store are to be saved.
XBRLException - If the root folder does not exist or
is not a directory or if the documents in the store cannot
be saved to the local file system.Store.saveDocuments(File)
public void saveDocuments(File destination,
String uriPrefix)
throws XBRLException
Store
saveDocuments in interface Storedestination - The folder in which the directory structure and
the documents in the data store are to be saved.uriPrefix - All documents in the data store with a URI that begins
with the string specified by uriPrefix will be saved to the local
file system.
XBRLException - If the root folder does not exist or
is not a directory or if the documents in the store cannot
be saved to the local file system.Store.saveDocuments(File, String)
public void saveStoreAsSingleDocument(File file)
throws XBRLException
Store
saveStoreAsSingleDocument in interface Storefile - The file to save the Store content to.
XBRLException - if the documents in the store cannot be
saved to the single file.Store.saveStoreAsSingleDocument(File)
protected String DOM2String(Element element)
throws XBRLException
element - The element to convert to a string.
XBRLException - if an IO exception occurs.
public <F extends XML> List<F> getXMLResources(String interfaceName)
throws XBRLException
Store
getXMLResources in interface StoreinterfaceName - The name of the interface. EG: If a list of
org.xbrlapi.impl.ReferenceArcImpl fragments is required then
this parameter would have a value of "ReferenceArc".
Note that if the parameter contains full stops, then it is used directly
as the value for the fragment type, enabling fragment extensions to exploit this
method without placing fragment implementations in the org.xbrlapi package.
XBRLExceptionStore.getXMLResources(String)
public <F extends XML> List<F> getXMLResources(Class<?> specifiedClass)
throws XBRLException
Store
getXMLResources in interface StorespecifiedClass - The class of XML resources to retrieve.
XBRLExceptionStore.getXMLResources(Class)
public <F extends Fragment> List<F> getChildFragments(String interfaceName,
String parentIndex)
throws XBRLException
getChildFragments in interface StoreinterfaceName - The name of the interface. EG: If a list of
org.xbrlapi.impl.ReferenceArcImpl fragments is required then
this parameter would have a value of "ReferenceArc".
Note that this method does not yet recognise fragment subtypes so
a request for an Arc would not return all ReferenceArcs as well as other
types of arcs.parentIndex - The index of the parent fragment.
XBRLExceptionStore.getChildFragments(String, String)
public <F extends Fragment> List<F> getChildFragments(Class<?> childClass,
String parentIndex)
throws XBRLException
getChildFragments in interface StorechildClass - The class of child fragment.parentIndex - The index of the parent fragment.
XBRLExceptionStore.getChildFragments(Class, String)
public Networks getNetworks()
throws XBRLException
Store
getNetworks in interface StoreXBRLExceptionStore.getNetworks()
public Networks getNetworks(URI arcrole)
throws XBRLException
getNetworks in interface Storearcrole - The XLink arcrole value.
XBRLExceptionStore.getNetworks(URI)
public Networks getNetworks(URI linkRole,
URI arcrole)
throws XBRLException
getNetworks in interface StorelinkRole - The linkrole of the networks.arcrole - The arcrole of the networks.
XBRLExceptionStore.getNetworks(URI,URI)
public List<LabelResource> getLabels(String fragment,
URI linkRole,
URI resourceRole,
String language)
throws XBRLException
Store
getLabels in interface Storefragment - the index of the fragment that we are getting labels forlinkRole - The required link role or null if not used.resourceRole - The required resource role or null if not used.language - The required language code or null if not used.
XBRLExceptionStore.getLabels(String, URI, URI, String)
public List<LabelResource> getLabels(String fragment,
URI resourceRole,
String language)
throws XBRLException
StoreStore.getLabels(String,URI,URI,String).
getLabels in interface Storefragment - the index of the fragment that we are getting labels forresourceRole - The required resource role or null if not used.language - The required language code or null if not used.
XBRLExceptionStore.getLabels(String, URI, String)
public List<LabelResource> getLabels(String fragment,
String language)
throws XBRLException
StoreStore.getLabels(String,URI,URI,String).
getLabels in interface Storefragment - the index of the fragment that we are getting labels forlanguage - The required language code or null if not used.
XBRLExceptionStore.getLabels(String, String)
public List<LabelResource> getLabels(String fragment)
throws XBRLException
StoreStore.getLabels(String,URI,URI,String).
getLabels in interface Storefragment - the index of the fragment that we are getting labels for
XBRLExceptionStore.getLabels(String)
public List<LabelResource> getLabels(String fragment,
URI resourceRole)
throws XBRLException
StoreStore.getLabels(String,URI,URI,String).
getLabels in interface Storefragment - the index of the fragment that we are getting labels forresourceRole - The required resource role or null if not used.
XBRLExceptionStore.getLabels(String, URI)
public List<ReferenceResource> getReferences(String fragment,
URI linkRole,
URI resourceRole,
String language)
throws XBRLException
Store
getReferences in interface Storefragment - the index of the fragment that we are getting references forlinkRole - The required link role or null if not used.resourceRole - The required resource role or null if not used.language - The required language code or null if not used.
XBRLExceptionStore.getReferences(String, URI, URI, String)
public List<ReferenceResource> getReferences(String fragment,
URI resourceRole,
String language)
throws XBRLException
StoreStore.getReferences(String,URI,URI,String).
getReferences in interface Storefragment - the index of the fragment that we are getting references forresourceRole - The required resource role or null if not used.language - The required language code or null if not used.
XBRLExceptionStore.getReferences(String, URI, String)
public List<ReferenceResource> getReferences(String fragment,
String language)
throws XBRLException
StoreStore.getReferences(String,URI,URI,String).
getReferences in interface Storefragment - the index of the fragment that we are getting references forlanguage - The required language code or null if not used.
XBRLExceptionStore.getReferences(String, String)
public List<ReferenceResource> getReferences(String fragment)
throws XBRLException
StoreStore.getReferences(String,URI,URI,String).
getReferences in interface Storefragment - the index of the fragment that we are getting references for
XBRLExceptionStore.getReferences(String)
public List<ReferenceResource> getReferences(String fragment,
URI resourceRole)
throws XBRLException
StoreStore.getReferences(String,URI,URI,String).
getReferences in interface Storefragment - the index of the fragment that we are getting references forresourceRole - The required resource role or null if not used.
XBRLExceptionStore.getReferences(String, URI)
public List<Arc> getArcs(URI arcrole,
String linkIndex)
throws XBRLException
getArcs in interface Storearcrole - The arcrole to use to identify the arcs to retrieve.linkIndex - The index of the extended link containing the arcs to retrieve.
XBRLExceptionStore.getArcs(URI, String)
public List<Arc> getArcs(String linkIndex)
throws XBRLException
getArcs in interface StorelinkIndex - The index of the extended link containing the arcs to retrieve.
XBRLExceptionStore.getArcs(String)
public Set<String> getArcIndices(URI arcrole)
throws XBRLException
getArcIndices in interface Storearcrole - The arcrole to use to identify the arcs to retrieve.
XBRLExceptionStore.getArcIndices(URI)
public Set<String> getArcIndices(String linkIndex)
throws XBRLException
getArcIndices in interface StorelinkIndex - The index of the extended link containing the arcs to retrieve.
XBRLExceptionStore.getArcIndices(String)
public Set<String> getExtendedLinkIndices(URI linkRole)
throws XBRLException
getExtendedLinkIndices in interface StorelinkRole - The link role to use to identify the extended links to retrieve.
XBRLExceptionStore.getExtendedLinkIndices(URI)
public <F extends Fragment> List<F> getFragmentsFromDocument(URI uri,
String interfaceName)
throws XBRLException
Store
getFragmentsFromDocument in interface Storeuri - The URI of the document to get the fragments from.interfaceName - The name of the interface. EG: If a list of
fragments is required then
this parameter would have a value of "ReferenceArc".
Note that this method does not yet recognise fragment subtypes so
a request for an Arc would not return all ReferenceArcs as well as other
types of arcs.
XBRLExceptionStore.getFragmentsFromDocument(URI, String)
public <F extends Fragment> List<F> getFragmentsFromDocument(URI uri,
Class<?> fragmentClass)
throws XBRLException
getFragmentsFromDocument in interface Storeuri - The URI of the document to get the fragments from.fragmentClass - The class of fragment being sought.
XBRLExceptionStore.getFragmentsFromDocument(URI, Class)
public Set<String> getFragmentIndicesFromDocument(URI uri,
String interfaceName)
throws XBRLException
getFragmentIndicesFromDocument in interface Storeuri - The URI of the document to get the fragments from.interfaceName - The name of the interface. EG: If a list of
concept fragments is required then
this parameter would have a value of "Concept".
Note that this method does not yet recognise fragment subtypes so
a request for an ElementDeclaration would not return all concepts as well as
other XML Schema element declarations.
XBRLExceptionStore.getFragmentIndicesFromDocument(URI, String)
public Set<String> getFragmentIndicesFromDocument(URI uri)
throws XBRLException
getFragmentIndicesFromDocument in interface Storeuri - The URI of the document to get the fragments from.
XBRLExceptionStore.getFragmentIndicesFromDocument(URI)
public Set<String> getFragmentIndices(String interfaceName)
throws XBRLException
getFragmentIndices in interface StoreinterfaceName - The name of the interface. EG: If a list of
Concept fragments is required then this parameter would have a value of "Concept".
Note that this method does not yet recognise fragment subtypes so
a request for an ElementDeclaration would not return all concepts as well as
other XML Schema element declarations.
XBRLExceptionStore.getFragmentIndices(String)
public List<Fact> getFacts()
throws XBRLException
getFacts in interface StoreXBRLExceptionStore.getFacts()
public List<Fact> getFacts(URI uri)
throws XBRLException
getFacts in interface Storeuri - The URI of the document to get the facts from.
XBRLExceptionStore.getFacts(URI)
public List<Fact> getAllFacts(URI uri)
throws XBRLException
getAllFacts in interface Storeuri - The URI of the document to get the facts from.
XBRLExceptionStore.getAllFacts(URI)
public List<Fact> getAllFacts()
throws XBRLException
getAllFacts in interface StoreXBRLExceptionStore.getAllFacts()
public <F extends Fragment> F getRootFragmentForDocument(URI uri)
throws XBRLException
getRootFragmentForDocument in interface StoreF - The fragment extension classuri - The URI of the document to get the root fragment for.
XBRLException - if more than one root fragment is found in the data store.Store.getRootFragmentForDocument(URI)
public <F extends Fragment> List<F> getRootFragments()
throws XBRLException
getRootFragments in interface StoreF - The fragment extension class
XBRLException - if more than one root fragment is found in the data store.Store.getRootFragments()
public <F extends Fragment> List<F> getRootFragments(String interfaceName)
throws XBRLException
getRootFragments in interface StoreF - The fragment extension classinterfaceName - The type of fragment to select by.
Store.getXMLResources(String) gives details on how the type
parameter is to be used.
XBRLExceptionStore.getRootFragments(String)
public Language getLanguage(String encoding,
String code)
throws XBRLException
getLanguage in interface Storeencoding - The code identifying the language that the name of the
language is expressed in.code - The code that identifies the language being named.
XBRLException - if either parameter equals null.Store.getLanguage(String, String)
public List<Language> getLanguages(String code)
throws XBRLException
getLanguages in interface Storecode - The language code to get the language fragments for. The code
is converted to upper case before processing.
XBRLException - if the language code is null.Store.getLanguages(String)
public Map<String,Language> getLanguageMap(String code)
throws XBRLException
getLanguageMap in interface Storecode - The language code to get a map of language fragments for.
XBRLExceptionStore.getLanguageMap(String)
public String queryForString(String query)
throws XBRLException
Store
queryForString in interface Storequery - The XQuery query to run against the set of fragments.
Any occurrences of the string #roots# in a query will be deemed to
be a marker for the root elements of the fragments in an XML database collection
and it will be substituted with the necessary
expression to identify those roots in the data store.
XBRLException - if the query cannot be executed or if the
query result is not a single string.Store.queryForString(String)
public List<Item> getItems()
throws XBRLException
getItems in interface StoreXBRLExceptionStore.getItems()
public List<Tuple> getTuples()
throws XBRLException
getTuples in interface StoreXBRLExceptionStore.getTuples()
public List<Item> getItems(URI uri)
throws XBRLException
getItems in interface Storeuri - The URI of the document to get the items from.
XBRLExceptionStore.getItems(URI)
public List<Tuple> getTuples(URI uri)
throws XBRLException
getTuples in interface Storeuri - The URI of the document to get the facts from.
XBRLExceptionStore.getTuples(URI)
public <F extends Fragment> Set<F> getNetworkRoots(URI linkRole,
URI arcrole)
throws XBRLException
Store
getNetworkRoots in interface StorelinkRole - the role on the extended links that contain the network arcs.arcrole - the arcrole on the arcs describing the network.
XBRLExceptionStore.getNetworkRoots(URI, URI)
public Concept getConcept(URI namespace,
String name)
throws XBRLException
getConcept in interface Storenamespace - The namespace for the concept.name - The local name for the concept.
XBRLException - if more than one matching concept is found in the data store
or if no matching concepts are found in the data store.Store.getConcept(URI, String)
public <D extends SchemaDeclaration> D getGlobalDeclaration(URI namespace,
String name)
throws XBRLException
getGlobalDeclaration in interface Storenamespace - The target namespace for the schema containing the global declaration.name - The local name for the global declaration.
XBRLException - if more than one matching declaration is found in the data store
or if no matching declarations are found in the data store.Store.getGlobalDeclaration(URI, String)
public List<RoleType> getRoleTypes()
throws XBRLException
getRoleTypes in interface StoreXBRLException
public List<RoleType> getRoleTypes(URI uri)
throws XBRLException
getRoleTypes in interface StoreXBRLExceptionStore.getRoleTypes(URI)
public List<ArcroleType> getArcroleTypes()
throws XBRLException
getArcroleTypes in interface StoreXBRLExceptionStore.getArcroleTypes()
public List<ArcroleType> getArcroleTypes(URI uri)
throws XBRLException
getArcroleTypes in interface StoreXBRLExceptionStore.getArcroleTypes(URI)
public List<URI> getResourceRoles()
throws XBRLException
getResourceRoles in interface StoreXBRLExceptionStore.getResourceRoles()
public Set<URI> getMinimumDocumentSet(URI uri)
throws XBRLException
Store
getMinimumDocumentSet in interface Storeuri - The single document URI to use as
starting points for analysis.
XBRLException - if some of the referenced documents are not in
the data store.Store.getMinimumDocumentSet(URI)
public Set<URI> getMinimumDocumentSet(Collection<URI> starters)
throws XBRLException
getMinimumDocumentSet in interface Storestarters - The collection of URIs of the documents to use as
starting points for analysis.
XBRLException - if some of the referenced documents are not in
the data store.Store.getMinimumDocumentSet(Collection)
public List<ExtendedLink> getExtendedLinks(URI linkrole)
throws XBRLException
getExtendedLinks in interface Storelinkrole - The required linkrole value.
XBRLExceptionStore.getExtendedLinks(URI)
public Networks getMinimalNetworksWithArcrole(Fragment fragment,
URI arcrole)
throws XBRLException
Store
getMinimalNetworksWithArcrole in interface StoreXBRLExceptionStore.getMinimalNetworksWithArcrole(Fragment, URI)
public Networks getMinimalNetworksWithArcrole(Set<Fragment> fragments,
URI arcrole)
throws XBRLException
Store
getMinimalNetworksWithArcrole in interface Storefragments - The fragments to analyse.arcrole - The required arcrole.
XBRLExceptionStore.getMinimalNetworksWithArcrole(Set, URI)
public void augmentNetworksForFragment(Fragment fragment,
URI arcrole,
Networks networks)
throws XBRLException
Store
augmentNetworksForFragment in interface Storefragment - The fragment to use as the target for the relationships to be added to the networks.arcrole - The arcrole for the networks to augment.networks - The networks to augment.
XBRLExceptionStore.augmentNetworksForFragment(Fragment, URI, Networks)
public void augmentNetworkForFragment(Fragment fragment,
Network network)
throws XBRLException
Store
augmentNetworkForFragment in interface Storefragment - The fragment to use as the target for the relationships to be added to the networks.network - The network that is to be augmented.
XBRLExceptionStore.augmentNetworkForFragment(Fragment, Network)
public Network getMinimalNetwork(Set<Fragment> fragments,
URI linkRole,
URI arcrole)
throws XBRLException
getMinimalNetwork in interface Storefragments - The set of target node fragments in the network.linkRole - The network link role value.arcrole - The network arcrole value.
XBRLExceptionStore.getMinimalNetwork(Set, URI, URI)
public Set<URI> getArcroles()
throws XBRLException
getArcroles in interface StoreXBRLExceptionStore.getArcroles()
public Set<URI> getLinkRoles()
throws XBRLException
getLinkRoles in interface StoreXBRLExceptionStore.getLinkRoles()
public Set<URI> getLinkRoles(URI arcrole)
throws XBRLException
getLinkRoles in interface Storearcrole - The arcrole determining the extended links that are to be examined for
linkroles that are used on links containing arcs with the required arcrole.
XBRLExceptionStore.getLinkRoles(URI)
public Set<URI> getArcroles(URI linkRole)
throws XBRLException
getArcroles in interface StorelinkRole - the specified linkrole to use in selecting arcroles.
XBRLException - if any of the arcroles is not a valid URI.Store.getArcroles(URI)
public <F extends Fragment> List<F> getTargets(String sourceIndex,
URI linkRole,
URI arcrole)
throws XBRLException
getTargets in interface StoreF - The type of fragment.sourceIndex - The index of the source fragment.linkRole - The XLink link role.arcrole - The XLink arcrole.
XBRLExceptionStore.getTargets(String, URI, URI)
public <F extends Fragment> List<F> getSources(String targetIndex,
URI linkRole,
URI arcrole)
throws XBRLException
getSources in interface StoreF - The type of fragment.targetIndex - The index of the target fragment.linkRole - The XLink link role.arcrole - The XLink arcrole.
XBRLExceptionStore.getSources(String, URI, URI)
public Set<String> getSourceIndices(String targetIndex,
URI linkRole,
URI arcrole)
throws XBRLException
getSourceIndices in interface StoretargetIndex - The index of the target fragment.linkRole - The XLink link role.arcrole - The XLink arcrole.
XBRLExceptionStore.getSourceIndices(String, URI, URI)
public SortedSet<Relationship> getRelationshipsFrom(String sourceIndex,
URI linkRole,
URI arcrole)
throws XBRLException
Store
getRelationshipsFrom in interface StoresourceIndex - The source fragment indexlinkRole - The XLink link rolearcrole - The XLink arcrole
XBRLExceptionStore.getRelationshipsFrom(String,URI,URI)
public boolean hasAllRelationships(URI document)
throws XBRLException
hasAllRelationships in interface Storedocument - The document URI.
XBRLExceptionStore.hasAllRelationships(URI)
public SortedSet<Relationship> getRelationshipsTo(String targetIndex,
URI linkRole,
URI arcrole)
throws XBRLException
getRelationshipsTo in interface StoretargetIndex - The target fragment indexlinkRole - The XLink link rolearcrole - The XLink arcrole
XBRLExceptionStore.getRelationshipsTo(String, URI, URI)
public Networks getNetworksFrom(String sourceIndex,
URI linkRole,
URI arcrole)
throws XBRLException
getNetworksFrom in interface StoresourceIndex - The source fragment indexlinkRole - The XLink link rolearcrole - The XLink arcrole
XBRLExceptionStore.getNetworksFrom(String,URI,URI)
public Networks getNetworksTo(String targetIndex,
URI linkRole,
URI arcrole)
throws XBRLException
Store
getNetworksTo in interface StoretargetIndex - The target fragment indexlinkRole - The XLink link role or null if networks for
all link roles are soughtarcrole - The XLink arcrole or null if networks for
all arcroles are sought
XBRLExceptionStore.getNetworksTo(String,URI,URI)public Analyser getAnalyser()
getAnalyser in interface StoreStore.getAnalyser()public void setAnalyser(Analyser analyser)
setAnalyser in interface Storeanalyser - The persisted network analyser
to use for network analysis when building the
aspect model. Set to null if you do not want to
build the aspect model using persisted network information.Store.setAnalyser(Analyser)public boolean isPersistingRelationships()
isPersistingRelationships in interface StoreStore.isPersistingRelationships()
public Networks getNetworksFrom(String sourceIndex,
URI arcrole)
throws XBRLException
StoreStore.getNetworksFrom(String,URI,URI).
getNetworksFrom in interface StoresourceIndex - The source fragment indexarcrole - The XLink arcrole
XBRLExceptionStore.getNetworksFrom(java.lang.String, java.net.URI)
public Networks getNetworksFrom(String sourceIndex)
throws XBRLException
StoreStore.getNetworksFrom(String,URI,URI).
getNetworksFrom in interface StoresourceIndex - The source fragment index
XBRLExceptionStore.getNetworksFrom(String)
public Networks getNetworksTo(String targetIndex,
URI arcrole)
throws XBRLException
StoreStore.getNetworksTo(String,URI,URI).
getNetworksTo in interface StoretargetIndex - The target fragment indexarcrole - The XLink arcrole
XBRLExceptionStore.getNetworksTo(String, URI)
public Networks getNetworksTo(String targetIndex)
throws XBRLException
StoreStore.getNetworksTo(String,URI,URI).
getNetworksTo in interface StoretargetIndex - The target fragment index
XBRLExceptionStore.getNetworksTo(String)
public Set<URI> getMissingDocumentURIs()
throws XBRLException
getMissingDocumentURIs in interface StoreXBRLExceptionStore.getMissingDocumentURIs()
public boolean requestLoadingRightsFor(Loader loader,
URI document)
throws XBRLException
Store
requestLoadingRightsFor in interface Storeloader - The loader claiming loading rights.document - The URI of the document that a loader is about
to start loading.
XBRLExceptionStore.requestLoadingRightsFor(Loader, URI)
public void recindLoadingRightsFor(Loader loader,
URI document)
Store
recindLoadingRightsFor in interface Storeloader - The loader recinding loading rights.document - The URI of the document whose loading rights are being recinded.Store.recindLoadingRightsFor(Loader, URI)
protected void finalize()
throws Throwable
finalize in class ObjectThrowablepublic int hashCode()
hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public boolean isLoading()
isLoading in interface StoreStore.isLoading()public void startLoading(Loader loader)
startLoading in interface Storeloader - The loader that has started to use
this store for data loading.Store.startLoading(Loader)public void stopLoading(Loader loader)
stopLoading in interface Storeloader - The loader that has stopped using
this store for data loading.Store.stopLoading(Loader)
public <F extends SchemaContent> F getSchemaContent(URI namespace,
String name)
throws XBRLException
getSchemaContent in interface Storenamespace - The target namespace of the schema with the desired content.name - The name given to the schema component.
XBRLExceptionStore.getSchemaContent(URI, String)
public Schema getSchema(URI targetNamespace)
throws XBRLException
getSchema in interface StoretargetNamespace - The target namespace of the schema.
XBRLException - if there is more than one schema with the
given target namespace or if the target namespace is null.Store.getSchema(java.net.URI)
public Set<String> getFactIndices()
throws XBRLException
getFactIndices in interface StoreXBRLExceptionStore.getFactIndices()
public Set<String> getAllFactIndices()
throws XBRLException
getAllFactIndices in interface StoreXBRLExceptionStore.getAllFactIndices()
public Set<String> getRootFragmentIndices(String interfaceName)
throws XBRLException
getRootFragmentIndices in interface StoreinterfaceName - The name of the interface. EG: If a list of
Concept fragments is required then this parameter would have a value of "Concept".
Note that this method does not yet recognise fragment subtypes so
a request for an ElementDeclaration would not return all concepts as well as
other XML Schema element declarations.
XBRLExceptionStore.getRootFragmentIndices(String)
public List<Fact> getFacts(URI namespace,
String localname)
throws XBRLException
getFacts in interface Storenamespace - The namespace of the facts to select.localname - The local name of the facts to select.
XBRLException - if either parameter is null.Store.getFacts(URI, String)
public List<Fact> getFacts(Concept concept)
throws XBRLException
getFacts in interface Storeconcept - The concept to get the facts for.
XBRLException - if the parameter is null.Store.getFacts(Concept)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||