public abstract class BaseStoreImpl extends java.lang.Object implements Store
Constructor and Description |
---|
BaseStoreImpl() |
Modifier and Type | Method and Description |
---|---|
void |
augmentNetworkForFragment(Fragment fragment,
Network network)
This method is recursive.
|
void |
augmentNetworksForFragment(Fragment fragment,
java.lang.String 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(java.net.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(java.net.URI uri)
This deletion method ensures that all related documents
are also deleted from the data store.
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<java.lang.String> |
getAllFactIndices() |
java.util.List<Fact> |
getAllFacts() |
java.util.List<Fact> |
getAllFacts(java.net.URI uri) |
Analyser |
getAnalyser() |
java.util.Set<java.lang.String> |
getArcIndicesWithArcrole(java.lang.String arcrole) |
java.util.Set<java.lang.String> |
getArcIndicesWithLinkIndex(java.lang.String linkIndex) |
java.util.Set<java.lang.String> |
getArcroles() |
java.util.Set<java.lang.String> |
getArcroles(java.lang.String linkRole) |
java.util.List<ArcroleType> |
getArcroleTypes() |
java.util.List<ArcroleType> |
getArcroleTypes(java.lang.String uri) |
java.util.List<Arc> |
getArcs(java.lang.String linkIndex) |
java.util.List<Arc> |
getArcs(java.net.URI arcrole,
java.lang.String linkIndex) |
<F extends Fragment> |
getChildFragments(java.lang.Class<?> childClass,
java.lang.String parentIndex) |
<F extends Fragment> |
getChildFragments(java.lang.String interfaceName,
java.lang.String parentIndex) |
org.w3c.dom.Document |
getCompositeDocument()
Get all data in the store as a single XML DOM object including
the annotations used in the
XBRLComposer project.
|
Concept |
getConcept(java.lang.String namespace,
java.lang.String name) |
org.w3c.dom.Element |
getDocumentAsDOM(java.net.URI uri)
Get a single document in the store as a DOM.
|
java.util.List<java.net.URI> |
getDocumentsToDiscover() |
java.util.Set<java.net.URI> |
getDocumentURIs()
Get a list of the URIs that have been stored.
|
java.util.Set<java.lang.String> |
getExtendedLinkIndices(java.lang.String linkRole) |
java.util.List<ExtendedLink> |
getExtendedLinks(java.lang.String linkrole) |
java.util.Set<java.lang.String> |
getFactIndices() |
java.util.List<Fact> |
getFacts() |
java.util.List<Fact> |
getFacts(Concept concept) |
java.util.List<Fact> |
getFacts(java.lang.String namespace,
java.lang.String localname) |
java.util.List<Fact> |
getFacts(java.net.URI uri) |
java.util.Set<java.net.URI> |
getFilteringURIs() |
java.util.Set<java.lang.String> |
getFragmentIndices(java.lang.String interfaceName) |
java.util.Set<java.lang.String> |
getFragmentIndicesFromDocument(java.net.URI uri) |
java.util.Set<java.lang.String> |
getFragmentIndicesFromDocument(java.net.URI uri,
java.lang.String interfaceName) |
<F extends Fragment> |
getFragmentsFromDocument(java.net.URI uri,
java.lang.Class<?> fragmentClass) |
<F extends Fragment> |
getFragmentsFromDocument(java.net.URI uri,
java.lang.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.
|
<D extends SchemaDeclaration> |
getGlobalDeclaration(java.lang.String namespace,
java.lang.String name) |
java.lang.String |
getId(java.lang.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.
|
java.util.List<Item> |
getItems() |
java.util.List<Item> |
getItems(java.net.URI uri) |
java.util.List<LabelResource> |
getLabels(java.lang.String fragment)
Implemented by
Store.getLabels(String,String,String,String) . |
java.util.List<LabelResource> |
getLabels(java.lang.String fragment,
java.lang.String resourceRole,
java.lang.String language)
Implemented by
Store.getLabels(String,String,String,String) . |
java.util.List<LabelResource> |
getLabels(java.lang.String fragment,
java.lang.String linkRole,
java.lang.String resourceRole,
java.lang.String language)
If using persisted relationships then the set of relationships used to
generate the results can be modified by appropriate choice of
|
java.util.List<LabelResource> |
getLabelsWithLanguage(java.lang.String fragment,
java.lang.String language)
Implemented by
Store.getLabels(String,String,String,String) . |
java.util.List<LabelResource> |
getLabelsWithResourceRole(java.lang.String fragment,
java.lang.String resourceRole)
Implemented by
Store.getLabels(String,String,String,String) . |
Language |
getLanguage(java.lang.String encoding,
java.lang.String code) |
java.util.Map<java.lang.String,Language> |
getLanguageMap(java.lang.String code) |
java.util.List<Language> |
getLanguages(java.lang.String code) |
java.util.Set<java.lang.String> |
getLinkRoles() |
java.util.Set<java.lang.String> |
getLinkRoles(java.lang.String arcrole) |
Matcher |
getMatcher() |
Network |
getMinimalNetwork(java.util.Set<Fragment> fragments,
java.lang.String linkRole,
java.lang.String arcrole) |
Networks |
getMinimalNetworksWithArcrole(Fragment fragment,
java.lang.String arcrole)
Convenience method for a single fragment.
|
Networks |
getMinimalNetworksWithArcrole(java.util.Set<Fragment> fragments,
java.lang.String 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.
|
java.util.Set<java.net.URI> |
getMinimumDocumentSet(java.util.Collection<java.net.URI> starters) |
java.util.Set<java.net.URI> |
getMinimumDocumentSet(java.net.URI uri)
This is just a convenience method.
|
java.util.Set<java.net.URI> |
getMissingDocumentURIs() |
<F extends Fragment> |
getNetworkRoots(java.lang.String linkRole,
java.lang.String 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(java.lang.String arcrole) |
Networks |
getNetworks(java.lang.String linkRole,
java.lang.String arcrole) |
Networks |
getNetworksFrom(java.lang.String sourceIndex)
Implemented by
Store.getNetworksFrom(String,String,String) . |
Networks |
getNetworksFrom(java.lang.String sourceIndex,
java.lang.String arcrole)
Implemented by
Store.getNetworksFrom(String,String,String) . |
Networks |
getNetworksFrom(java.lang.String sourceIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
Networks |
getNetworksTo(java.lang.String targetIndex)
Implemented by
Store.getNetworksTo(String,String,String) . |
Networks |
getNetworksTo(java.lang.String targetIndex,
java.lang.String arcrole)
Implemented by
Store.getNetworksTo(String,String,String) . |
Networks |
getNetworksTo(java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole)
If using persisted relationships then the set of relationships used to
generate the results can be modified by appropriate choice of
|
long |
getNumberOfXMLResources(java.lang.Class<?> specifiedClass) |
java.util.Set<java.net.URI> |
getReferencedDocuments(java.net.URI uri)
Override this method in a data store implementation if the data store
implementation supports XQuery (rather than XPath).
|
java.util.List<ReferenceResource> |
getReferences(java.lang.String fragment)
Implemented by
Store.getReferences(String,String,String,String) . |
java.util.List<ReferenceResource> |
getReferences(java.lang.String fragment,
java.lang.String resourceRole,
java.lang.String language)
Implemented by
Store.getReferences(String,String,String,String) . |
java.util.List<ReferenceResource> |
getReferences(java.lang.String fragment,
java.lang.String linkRole,
java.lang.String resourceRole,
java.lang.String language)
If using persisted relationships then the set of relationships used to
generate the results can be modified by appropriate choice of
|
java.util.List<ReferenceResource> |
getReferencesWithLanguage(java.lang.String fragment,
java.lang.String language)
Implemented by
Store.getReferences(String,String,String,String) . |
java.util.List<ReferenceResource> |
getReferencesWithResourceRole(java.lang.String fragment,
java.lang.String resourceRole)
Implemented by
Store.getReferences(String,String,String,String) . |
java.util.List<java.net.URI> |
getReferencingDocuments(java.net.URI uri) |
java.util.List<Fragment> |
getReferencingFragments(java.net.URI uri) |
java.util.SortedSet<Relationship> |
getRelationshipsFrom(java.lang.String sourceIndex,
java.lang.String linkRole,
java.lang.String arcrole)
If using persisted relationships then the set of relationships used to
generate the results can be modified by appropriate choice of
|
java.util.SortedSet<Relationship> |
getRelationshipsTo(java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<java.lang.String> |
getResourceRoles() |
java.util.List<RoleType> |
getRoleTypes() |
java.util.List<RoleType> |
getRoleTypes(java.lang.String uri) |
<F extends Fragment> |
getRootFragmentForDocument(java.net.URI uri) |
java.util.Set<java.lang.String> |
getRootFragmentIndices(java.lang.String interfaceName) |
<F extends Fragment> |
getRootFragments() |
<F extends Fragment> |
getRootFragments(java.lang.String interfaceName) |
Schema |
getSchema(java.lang.String targetNamespace) |
<F extends SchemaContent> |
getSchemaContent(java.lang.String namespace,
java.lang.String name) |
java.util.Set<java.lang.String> |
getSourceIndices(java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
<F extends Fragment> |
getSources(java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
org.w3c.dom.Document |
getStoreAsDOM()
Get all data in the store as a single XML DOM object.
|
java.util.List<Stub> |
getStubs() |
java.util.List<Stub> |
getStubs(java.net.URI uri) |
org.w3c.dom.Element |
getSubtree(Fragment f)
Returns the root element of the subtree starting with the
fragment with the specified index.
|
<F extends Fragment> |
getTargets(java.lang.String sourceIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<Tuple> |
getTuples() |
java.util.List<Tuple> |
getTuples(java.net.URI uri) |
<F extends XML> |
getXMLResources(java.lang.Class<?> specifiedClass)
Return a list of XML resources in a data store
that have a type corresponding to the specified XML resource interface name.
|
<F extends XML> |
getXMLResources(java.lang.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(java.net.URI document) |
boolean |
hasDocument(java.net.URI uri)
Test if a particular URI is already in the data store.
|
int |
hashCode() |
boolean |
isFilteringByURIs() |
boolean |
isLoading() |
boolean |
isPersistingRelationships() |
void |
persistLoaderState(java.util.Map<java.net.URI,java.lang.String> documents)
Stores the state of the document discovery process.
|
void |
persistStub(java.net.URI uri,
java.lang.String reason) |
java.lang.String |
queryForString(java.lang.String query)
Run a query that is required to return a single string.
|
void |
recindLoadingRightsFor(Loader loader,
java.net.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 |
removeNamespaceBinding(java.lang.String prefix)
This should not need to be called but is available if the number of mappings
in the namepace mapping table grows innefficiently large.
|
void |
removeStub(Stub stub) |
boolean |
requestLoadingRightsFor(Loader loader,
java.net.URI document)
Loaders need to call this method to indicate that they are going to take
responsibility for loading the document.
|
void |
saveDocuments(java.io.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(java.io.File destination,
java.lang.String uriPrefix)
Serializes those documents in the data store with a URI that
begins with the specified URI prefix.
|
void |
saveStoreAsSingleDocument(java.io.File file)
Creates a single DOM structure from all documents in the
data store and saves this single XML structure in the
specified file.
|
java.lang.String |
serialize(org.w3c.dom.Element what)
Serialize the specified XML DOM node.
|
void |
serialize(org.w3c.dom.Element what,
java.io.File destination)
Serialize the specified XML DOM to the specified destination.
|
void |
serialize(org.w3c.dom.Element what,
java.io.OutputStream destination)
Serialize the specified XML DOM to the specified destination.
|
void |
setAnalyser(Analyser analyser) |
void |
setFilteringURIs(java.util.Set<java.net.URI> uris) |
void |
setMatcher(Matcher matcher)
Sets the matcher for the store to use.
|
void |
setNamespaceBinding(java.lang.String namespace,
java.lang.String prefix) |
void |
startLoading(Loader loader) |
void |
stopLoading(Loader loader) |
void |
sync()
Default implementation does nothing.
|
getClass, notify, notifyAll, toString, wait, wait, wait
delete, getSize, getXMLResource, hasXMLResource, persist, queryCount, queryForIndices, queryForStrings, queryForXMLResources, remove
public BaseStoreImpl() throws XBRLException
XBRLException
public long getNumberOfXMLResources(java.lang.Class<?> specifiedClass) throws XBRLException
getNumberOfXMLResources
in interface Store
specifiedClass
- The class of XML resource to count.XBRLException
Store.getNumberOfXMLResources(Class)
public void setMatcher(Matcher matcher) throws XBRLException
Store
setMatcher
in interface Store
matcher
- the matcher to use to identify identical resources.XBRLException
- if the matcher is null;Store.setMatcher(Matcher)
public Matcher getMatcher()
getMatcher
in interface Store
Store.getMatcher()
public void setNamespaceBinding(java.lang.String namespace, java.lang.String prefix) throws XBRLException
setNamespaceBinding
in interface Store
namespace
- The namespace to bind a prefix to for queryingprefix
- The prefix to bind to the namespace for queryingXBRLException
- if either argument is null.Store.setNamespaceBinding(String,String)
public void removeNamespaceBinding(java.lang.String prefix) throws XBRLException
Store
removeNamespaceBinding
in interface Store
prefix
- the prefix to remove the namespace binding forXBRLException
Store.removeNamespaceBinding(String)
public void setFilteringURIs(java.util.Set<java.net.URI> uris)
setFilteringURIs
in interface Store
uris
- 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 java.util.Set<java.net.URI> getFilteringURIs()
getFilteringURIs
in interface Store
Store.getFilteringURIs()
public void clearFilteringURIs()
Store
clearFilteringURIs
in interface Store
Store.clearFilteringURIs()
public boolean isFilteringByURIs()
isFilteringByURIs
in interface Store
Store.isFilteringByURIs()
public void close() throws XBRLException
close
in interface Store
XBRLException
Store.close()
public void persistLoaderState(java.util.Map<java.net.URI,java.lang.String> documents) throws XBRLException
Store
persistLoaderState
in interface Store
documents
- The map from URIs of the documents
remaining to be discovered to the textual reason why
the document has not yet been discovered.XBRLException
Store.persistLoaderState(Map)
public void persistStub(java.net.URI uri, java.lang.String reason) throws XBRLException
persistStub
in interface Store
uri
- The document to store a stub for.reason
- The reason the document has not been stored.XBRLException
Store.persistStub(URI,String)
public void sync() throws XBRLException
sync
in interface Store
XBRLException
- if the sync operation fails.Store.sync()
public java.lang.String getId(java.lang.String input) throws XBRLException
getId
in interface Store
input
- The string that may be used to generate the id.XBRLException
Store.getId(String)
public void serialize(org.w3c.dom.Element what, java.io.OutputStream destination) throws XBRLException
Store
serialize
in interface Store
what
- 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 java.lang.String serialize(org.w3c.dom.Element what) throws XBRLException
Store
serialize
in interface Store
what
- the root element of the DOM to be serialised.XBRLException
Store.serialize(Element)
public void deleteDocument(java.net.URI uri) throws XBRLException
deleteDocument
in interface Store
uri
- The URI of the document to delete from the data store.XBRLException
Store.deleteDocument(URI)
public void deleteRelatedDocuments(java.net.URI uri) throws XBRLException
Store
deleteRelatedDocuments
in interface Store
uri
- The URI of the document to delete.XBRLException
Store.deleteRelatedDocuments(URI)
public java.util.List<java.net.URI> getReferencingDocuments(java.net.URI uri) throws XBRLException
getReferencingDocuments
in interface Store
uri
- The URI of the referenced document.XBRLException
- if the list of referencing documents cannot be populated.Store.getReferencingDocuments(URI)
public java.util.List<Fragment> getReferencingFragments(java.net.URI uri) throws XBRLException
getReferencingFragments
in interface Store
uri
- The URI of the referenced document.XBRLException
Store.getReferencingFragments(URI)
public java.util.Set<java.net.URI> getReferencedDocuments(java.net.URI uri) throws XBRLException
Store
getReferencedDocuments
in interface Store
uri
- The URI of the referencing document.XBRLException
- if the set of referenced documents cannot be populated.Store.getReferencedDocuments(URI)
public void serialize(org.w3c.dom.Element what, java.io.File destination) throws XBRLException
Store
serialize
in interface Store
what
- 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 java.util.Set<java.net.URI> getDocumentURIs() throws XBRLException
Store
getDocumentURIs
in interface Store
XBRLException
- if the list cannot be constructed.Store.getDocumentURIs()
public boolean hasDocument(java.net.URI uri) throws XBRLException
Store
hasDocument
in interface Store
uri
- the string representation of the URI to be tested for.XBRLException
Store.hasDocument(URI)
public org.w3c.dom.Element getDocumentAsDOM(java.net.URI uri) throws XBRLException
Store
getDocumentAsDOM
in interface Store
uri
- The URI of the document to be retrieved.XBRLException
- if the document cannot be constructed as a DOM.Store.getDocumentAsDOM(URI)
public org.w3c.dom.Element getSubtree(Fragment f) throws XBRLException
Store
getSubtree
in interface Store
f
- The fragment at the root of the subtree.XBRLException
- if the subtree cannot be constructed.Store.getSubtree(Fragment)
public org.w3c.dom.Document getStoreAsDOM() throws XBRLException
Store
getStoreAsDOM
in interface Store
XBRLException
- if the DOM cannot be constructed.Store.getStoreAsDOM()
public org.w3c.dom.Document getCompositeDocument() throws XBRLException
Store
getCompositeDocument
in interface Store
XBRLException
- if the composed data store cannot be constructed.Store.getCompositeDocument()
public java.util.List<Stub> getStubs() throws XBRLException
getStubs
in interface Store
XBRLException
Store.getStubs()
public java.util.List<Stub> getStubs(java.net.URI uri) throws XBRLException
getStubs
in interface Store
uri
- The string value of the URI of the document to get the stub for.XBRLException
Store.getStubs(URI)
public void removeStub(Stub stub) throws XBRLException
removeStub
in interface Store
stub
- The stub to be removed from the data store.XBRLException
Store.removeStub(Stub)
public void remove(XML xml) throws XBRLException
Store
remove
in interface Store
xml
- The XML resource to remove.XBRLException
- if the XML resource cannot be removed from the store.Store.remove(XML)
public java.util.List<java.net.URI> getDocumentsToDiscover() throws XBRLException
getDocumentsToDiscover
in interface Store
XBRLException
- if any of the document URIs are malformed.Store.getDocumentsToDiscover()
public void saveDocuments(java.io.File destination) throws XBRLException
Store
saveDocuments
in interface Store
destination
- 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(java.io.File destination, java.lang.String uriPrefix) throws XBRLException
Store
saveDocuments
in interface Store
destination
- 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(java.io.File file) throws XBRLException
Store
saveStoreAsSingleDocument
in interface Store
file
- 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)
public <F extends XML> java.util.List<F> getXMLResources(java.lang.String interfaceName) throws XBRLException
Store
getXMLResources
in interface Store
interfaceName
- 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.XBRLException
Store.getXMLResources(String)
public <F extends XML> java.util.List<F> getXMLResources(java.lang.Class<?> specifiedClass) throws XBRLException
Store
getXMLResources
in interface Store
specifiedClass
- The class of XML resources to retrieve.XBRLException
Store.getXMLResources(Class)
public <F extends Fragment> java.util.List<F> getChildFragments(java.lang.String interfaceName, java.lang.String parentIndex) throws XBRLException
getChildFragments
in interface Store
interfaceName
- 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.XBRLException
Store.getChildFragments(String, String)
public <F extends Fragment> java.util.List<F> getChildFragments(java.lang.Class<?> childClass, java.lang.String parentIndex) throws XBRLException
getChildFragments
in interface Store
childClass
- The class of child fragment.parentIndex
- The index of the parent fragment.XBRLException
Store.getChildFragments(Class, String)
public Networks getNetworks() throws XBRLException
Store
getNetworks
in interface Store
XBRLException
Store.getNetworks()
public Networks getNetworks(java.lang.String arcrole) throws XBRLException
getNetworks
in interface Store
arcrole
- The XLink arcrole value.XBRLException
Store.getNetworks(String)
public Networks getNetworks(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getNetworks
in interface Store
linkRole
- The linkrole of the networks.arcrole
- The arcrole of the networks.XBRLException
Store.getNetworks(String,String)
public java.util.List<LabelResource> getLabels(java.lang.String fragment, java.lang.String linkRole, java.lang.String resourceRole, java.lang.String language) throws XBRLException
Store
getLabels
in interface Store
fragment
- 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.XBRLException
Store.getLabels(String, String, String, String)
public java.util.List<LabelResource> getLabels(java.lang.String fragment, java.lang.String resourceRole, java.lang.String language) throws XBRLException
Store
Store.getLabels(String,String,String,String)
.getLabels
in interface Store
fragment
- 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.XBRLException
Store.getLabels(String, String, String)
public java.util.List<LabelResource> getLabelsWithLanguage(java.lang.String fragment, java.lang.String language) throws XBRLException
Store
Store.getLabels(String,String,String,String)
.getLabelsWithLanguage
in interface Store
fragment
- the index of the fragment that we are getting labels forlanguage
- The required language code or null if not used.XBRLException
Store.getLabelsWithLanguage(String, String)
public java.util.List<LabelResource> getLabels(java.lang.String fragment) throws XBRLException
Store
Store.getLabels(String,String,String,String)
.getLabels
in interface Store
fragment
- the index of the fragment that we are getting labels forXBRLException
Store.getLabels(String)
public java.util.List<LabelResource> getLabelsWithResourceRole(java.lang.String fragment, java.lang.String resourceRole) throws XBRLException
Store
Store.getLabels(String,String,String,String)
.getLabelsWithResourceRole
in interface Store
fragment
- the index of the fragment that we are getting labels forresourceRole
- The required resource role or null if not used.XBRLException
Store.getLabelsWithResourceRole(String, String)
public java.util.List<ReferenceResource> getReferences(java.lang.String fragment, java.lang.String linkRole, java.lang.String resourceRole, java.lang.String language) throws XBRLException
Store
getReferences
in interface Store
fragment
- 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.XBRLException
Store.getReferences(String, String, String, String)
public java.util.List<ReferenceResource> getReferences(java.lang.String fragment, java.lang.String resourceRole, java.lang.String language) throws XBRLException
Store
Store.getReferences(String,String,String,String)
.getReferences
in interface Store
fragment
- 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.XBRLException
Store.getReferences(String, String, String)
public java.util.List<ReferenceResource> getReferencesWithLanguage(java.lang.String fragment, java.lang.String language) throws XBRLException
Store
Store.getReferences(String,String,String,String)
.getReferencesWithLanguage
in interface Store
fragment
- the index of the fragment that we are getting references forlanguage
- The required language code or null if not used.XBRLException
Store.getReferencesWithLanguage(String, String)
public java.util.List<ReferenceResource> getReferences(java.lang.String fragment) throws XBRLException
Store
Store.getReferences(String,String,String,String)
.getReferences
in interface Store
fragment
- the index of the fragment that we are getting references forXBRLException
Store.getReferences(String)
public java.util.List<ReferenceResource> getReferencesWithResourceRole(java.lang.String fragment, java.lang.String resourceRole) throws XBRLException
Store
Store.getReferences(String,String,String,String)
.getReferencesWithResourceRole
in interface Store
fragment
- the index of the fragment that we are getting references forresourceRole
- The required resource role or null if not used.XBRLException
Store.getReferencesWithResourceRole(String, String)
public java.util.List<Arc> getArcs(java.net.URI arcrole, java.lang.String linkIndex) throws XBRLException
getArcs
in interface Store
arcrole
- The arcrole to use to identify the arcs to retrieve.linkIndex
- The index of the extended link containing the arcs to retrieve.XBRLException
Store.getArcs(URI, String)
public java.util.List<Arc> getArcs(java.lang.String linkIndex) throws XBRLException
getArcs
in interface Store
linkIndex
- The index of the extended link containing the arcs to retrieve.XBRLException
Store.getArcs(String)
public java.util.Set<java.lang.String> getArcIndicesWithArcrole(java.lang.String arcrole) throws XBRLException
getArcIndicesWithArcrole
in interface Store
arcrole
- The arcrole to use to identify the arcs to retrieve.XBRLException
Store.getArcIndicesWithArcrole(String)
public java.util.Set<java.lang.String> getArcIndicesWithLinkIndex(java.lang.String linkIndex) throws XBRLException
getArcIndicesWithLinkIndex
in interface Store
linkIndex
- The index of the extended link containing the arcs to retrieve.XBRLException
Store.getArcIndicesWithLinkIndex(String)
public java.util.Set<java.lang.String> getExtendedLinkIndices(java.lang.String linkRole) throws XBRLException
getExtendedLinkIndices
in interface Store
linkRole
- The link role to use to identify the extended links to retrieve.XBRLException
Store.getExtendedLinkIndices(String)
public <F extends Fragment> java.util.List<F> getFragmentsFromDocument(java.net.URI uri, java.lang.String interfaceName) throws XBRLException
Store
getFragmentsFromDocument
in interface Store
uri
- 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.XBRLException
Store.getFragmentsFromDocument(URI, String)
public <F extends Fragment> java.util.List<F> getFragmentsFromDocument(java.net.URI uri, java.lang.Class<?> fragmentClass) throws XBRLException
getFragmentsFromDocument
in interface Store
uri
- The URI of the document to get the fragments from.fragmentClass
- The class of fragment being sought.XBRLException
Store.getFragmentsFromDocument(URI, Class)
public java.util.Set<java.lang.String> getFragmentIndicesFromDocument(java.net.URI uri, java.lang.String interfaceName) throws XBRLException
getFragmentIndicesFromDocument
in interface Store
uri
- 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.XBRLException
Store.getFragmentIndicesFromDocument(URI, String)
public java.util.Set<java.lang.String> getFragmentIndicesFromDocument(java.net.URI uri) throws XBRLException
getFragmentIndicesFromDocument
in interface Store
uri
- The URI of the document to get the fragments from.XBRLException
Store.getFragmentIndicesFromDocument(URI)
public java.util.Set<java.lang.String> getFragmentIndices(java.lang.String interfaceName) throws XBRLException
getFragmentIndices
in interface Store
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.XBRLException
Store.getFragmentIndices(String)
public java.util.List<Fact> getFacts() throws XBRLException
getFacts
in interface Store
XBRLException
Store.getFacts()
public java.util.List<Fact> getFacts(java.net.URI uri) throws XBRLException
getFacts
in interface Store
uri
- The URI of the document to get the facts from.XBRLException
Store.getFacts(URI)
public java.util.List<Fact> getAllFacts(java.net.URI uri) throws XBRLException
getAllFacts
in interface Store
uri
- The URI of the document to get the facts from.XBRLException
Store.getAllFacts(URI)
public java.util.List<Fact> getAllFacts() throws XBRLException
getAllFacts
in interface Store
XBRLException
Store.getAllFacts()
public <F extends Fragment> F getRootFragmentForDocument(java.net.URI uri) throws XBRLException
getRootFragmentForDocument
in interface Store
F
- 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> java.util.List<F> getRootFragments() throws XBRLException
getRootFragments
in interface Store
F
- The fragment extension classXBRLException
- if more than one root fragment is found in the data store.Store.getRootFragments()
public <F extends Fragment> java.util.List<F> getRootFragments(java.lang.String interfaceName) throws XBRLException
getRootFragments
in interface Store
F
- 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.XBRLException
Store.getRootFragments(String)
public Language getLanguage(java.lang.String encoding, java.lang.String code) throws XBRLException
getLanguage
in interface Store
encoding
- 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 java.util.List<Language> getLanguages(java.lang.String code) throws XBRLException
getLanguages
in interface Store
code
- 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 java.util.Map<java.lang.String,Language> getLanguageMap(java.lang.String code) throws XBRLException
getLanguageMap
in interface Store
code
- The language code to get a map of language fragments for.XBRLException
Store.getLanguageMap(String)
public java.lang.String queryForString(java.lang.String query) throws XBRLException
Store
queryForString
in interface Store
query
- 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 java.util.List<Item> getItems() throws XBRLException
getItems
in interface Store
XBRLException
Store.getItems()
public java.util.List<Tuple> getTuples() throws XBRLException
getTuples
in interface Store
XBRLException
Store.getTuples()
public java.util.List<Item> getItems(java.net.URI uri) throws XBRLException
getItems
in interface Store
uri
- The URI of the document to get the items from.XBRLException
Store.getItems(URI)
public java.util.List<Tuple> getTuples(java.net.URI uri) throws XBRLException
getTuples
in interface Store
uri
- The URI of the document to get the facts from.XBRLException
Store.getTuples(URI)
public <F extends Fragment> java.util.Set<F> getNetworkRoots(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
Store
getNetworkRoots
in interface Store
linkRole
- the role on the extended links that contain the network arcs.arcrole
- the arcrole on the arcs describing the network.XBRLException
Store.getNetworkRoots(String, String)
public Concept getConcept(java.lang.String namespace, java.lang.String name) throws XBRLException
getConcept
in interface Store
namespace
- 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(String, String)
public <D extends SchemaDeclaration> D getGlobalDeclaration(java.lang.String namespace, java.lang.String name) throws XBRLException
getGlobalDeclaration
in interface Store
namespace
- 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(String, String)
public java.util.List<RoleType> getRoleTypes() throws XBRLException
getRoleTypes
in interface Store
XBRLException
public java.util.List<RoleType> getRoleTypes(java.lang.String uri) throws XBRLException
getRoleTypes
in interface Store
XBRLException
Store.getRoleTypes(String)
public java.util.List<ArcroleType> getArcroleTypes() throws XBRLException
getArcroleTypes
in interface Store
XBRLException
Store.getArcroleTypes()
public java.util.List<ArcroleType> getArcroleTypes(java.lang.String uri) throws XBRLException
getArcroleTypes
in interface Store
XBRLException
Store.getArcroleTypes(String)
public java.util.List<java.lang.String> getResourceRoles() throws XBRLException
getResourceRoles
in interface Store
XBRLException
Store.getResourceRoles()
public java.util.Set<java.net.URI> getMinimumDocumentSet(java.net.URI uri) throws XBRLException
Store
getMinimumDocumentSet
in interface Store
uri
- 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 java.util.Set<java.net.URI> getMinimumDocumentSet(java.util.Collection<java.net.URI> starters) throws XBRLException
getMinimumDocumentSet
in interface Store
starters
- 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 java.util.List<ExtendedLink> getExtendedLinks(java.lang.String linkrole) throws XBRLException
getExtendedLinks
in interface Store
linkrole
- The required linkrole value.XBRLException
Store.getExtendedLinks(String)
public Networks getMinimalNetworksWithArcrole(Fragment fragment, java.lang.String arcrole) throws XBRLException
Store
getMinimalNetworksWithArcrole
in interface Store
XBRLException
Store.getMinimalNetworksWithArcrole(Fragment, String)
public Networks getMinimalNetworksWithArcrole(java.util.Set<Fragment> fragments, java.lang.String arcrole) throws XBRLException
Store
getMinimalNetworksWithArcrole
in interface Store
fragments
- The fragments to analyse.arcrole
- The required arcrole.XBRLException
Store.getMinimalNetworksWithArcrole(Set, String)
public void augmentNetworksForFragment(Fragment fragment, java.lang.String arcrole, Networks networks) throws XBRLException
Store
augmentNetworksForFragment
in interface Store
fragment
- 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.XBRLException
Store.augmentNetworksForFragment(Fragment, String, Networks)
public void augmentNetworkForFragment(Fragment fragment, Network network) throws XBRLException
Store
augmentNetworkForFragment
in interface Store
fragment
- The fragment to use as the target for the relationships to be added to the networks.network
- The network that is to be augmented.XBRLException
Store.augmentNetworkForFragment(Fragment, Network)
public Network getMinimalNetwork(java.util.Set<Fragment> fragments, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getMinimalNetwork
in interface Store
fragments
- The set of target node fragments in the network.linkRole
- The network link role value.arcrole
- The network arcrole value.XBRLException
Store.getMinimalNetwork(Set, String, String)
public java.util.Set<java.lang.String> getArcroles() throws XBRLException
getArcroles
in interface Store
XBRLException
Store.getArcroles()
public java.util.Set<java.lang.String> getLinkRoles() throws XBRLException
getLinkRoles
in interface Store
XBRLException
Store.getLinkRoles()
public java.util.Set<java.lang.String> getLinkRoles(java.lang.String arcrole) throws XBRLException
getLinkRoles
in interface Store
arcrole
- The arcrole determining the extended links that are to be examined for
linkroles that are used on links containing arcs with the required arcrole.XBRLException
Store.getLinkRoles(String)
public java.util.Set<java.lang.String> getArcroles(java.lang.String linkRole) throws XBRLException
getArcroles
in interface Store
linkRole
- the specified linkrole to use in selecting arcroles.XBRLException
- if any of the arcroles is not a valid URI.Store.getArcroles(String)
public <F extends Fragment> java.util.List<F> getTargets(java.lang.String sourceIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getTargets
in interface Store
F
- The type of fragment.sourceIndex
- The index of the source fragment.linkRole
- The XLink link role.arcrole
- The XLink arcrole.XBRLException
Store.getTargets(String, String, String)
public <F extends Fragment> java.util.List<F> getSources(java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getSources
in interface Store
F
- The type of fragment.targetIndex
- The index of the target fragment.linkRole
- The XLink link role.arcrole
- The XLink arcrole.XBRLException
Store.getSources(String, String, String)
public java.util.Set<java.lang.String> getSourceIndices(java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getSourceIndices
in interface Store
targetIndex
- The index of the target fragment.linkRole
- The XLink link role.arcrole
- The XLink arcrole.XBRLException
Store.getSourceIndices(String, String, String)
public java.util.SortedSet<Relationship> getRelationshipsFrom(java.lang.String sourceIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
Store
getRelationshipsFrom
in interface Store
sourceIndex
- The source fragment indexlinkRole
- The XLink link rolearcrole
- The XLink arcroleXBRLException
Store.getRelationshipsFrom(String,String,String)
public boolean hasAllRelationships(java.net.URI document) throws XBRLException
hasAllRelationships
in interface Store
document
- The document URI.XBRLException
Store.hasAllRelationships(URI)
public java.util.SortedSet<Relationship> getRelationshipsTo(java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRelationshipsTo
in interface Store
targetIndex
- The target fragment indexlinkRole
- The XLink link rolearcrole
- The XLink arcroleXBRLException
Store.getRelationshipsTo(String, String, String)
public Networks getNetworksFrom(java.lang.String sourceIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getNetworksFrom
in interface Store
sourceIndex
- The source fragment indexlinkRole
- The XLink link rolearcrole
- The XLink arcroleXBRLException
Store.getNetworksFrom(String,String,String)
public Networks getNetworksTo(java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
Store
getNetworksTo
in interface Store
targetIndex
- 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 soughtXBRLException
Store.getNetworksTo(String,String,String)
public Analyser getAnalyser()
getAnalyser
in interface Store
Store.getAnalyser()
public void setAnalyser(Analyser analyser)
setAnalyser
in interface Store
analyser
- 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 Store
Store.isPersistingRelationships()
public Networks getNetworksFrom(java.lang.String sourceIndex, java.lang.String arcrole) throws XBRLException
Store
Store.getNetworksFrom(String,String,String)
.getNetworksFrom
in interface Store
sourceIndex
- The source fragment indexarcrole
- The XLink arcroleXBRLException
Store.getNetworksFrom(java.lang.String, String)
public Networks getNetworksFrom(java.lang.String sourceIndex) throws XBRLException
Store
Store.getNetworksFrom(String,String,String)
.getNetworksFrom
in interface Store
sourceIndex
- The source fragment indexXBRLException
Store.getNetworksFrom(String)
public Networks getNetworksTo(java.lang.String targetIndex, java.lang.String arcrole) throws XBRLException
Store
Store.getNetworksTo(String,String,String)
.getNetworksTo
in interface Store
targetIndex
- The target fragment indexarcrole
- The XLink arcroleXBRLException
Store.getNetworksTo(String, String)
public Networks getNetworksTo(java.lang.String targetIndex) throws XBRLException
Store
Store.getNetworksTo(String,String,String)
.getNetworksTo
in interface Store
targetIndex
- The target fragment indexXBRLException
Store.getNetworksTo(String)
public java.util.Set<java.net.URI> getMissingDocumentURIs() throws XBRLException
getMissingDocumentURIs
in interface Store
XBRLException
Store.getMissingDocumentURIs()
public boolean requestLoadingRightsFor(Loader loader, java.net.URI document) throws XBRLException
Store
requestLoadingRightsFor
in interface Store
loader
- The loader claiming loading rights.document
- The URI of the document that a loader is about
to start loading.XBRLException
Store.requestLoadingRightsFor(Loader, URI)
public void recindLoadingRightsFor(Loader loader, java.net.URI document)
Store
recindLoadingRightsFor
in interface Store
loader
- The loader recinding loading rights.document
- The URI of the document whose loading rights are being recinded.Store.recindLoadingRightsFor(Loader, URI)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public boolean isLoading()
isLoading
in interface Store
Store.isLoading()
public void startLoading(Loader loader)
startLoading
in interface Store
loader
- The loader that has started to use
this store for data loading.Store.startLoading(Loader)
public void stopLoading(Loader loader)
stopLoading
in interface Store
loader
- The loader that has stopped using
this store for data loading.Store.stopLoading(Loader)
public <F extends SchemaContent> F getSchemaContent(java.lang.String namespace, java.lang.String name) throws XBRLException
getSchemaContent
in interface Store
namespace
- The target namespace of the schema with the desired content.name
- The name given to the schema component.XBRLException
Store.getSchemaContent(String, String)
public Schema getSchema(java.lang.String targetNamespace) throws XBRLException
getSchema
in interface Store
targetNamespace
- 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(String)
public java.util.Set<java.lang.String> getFactIndices() throws XBRLException
getFactIndices
in interface Store
XBRLException
Store.getFactIndices()
public java.util.Set<java.lang.String> getAllFactIndices() throws XBRLException
getAllFactIndices
in interface Store
XBRLException
Store.getAllFactIndices()
public java.util.Set<java.lang.String> getRootFragmentIndices(java.lang.String interfaceName) throws XBRLException
getRootFragmentIndices
in interface Store
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.XBRLException
Store.getRootFragmentIndices(String)
public java.util.List<Fact> getFacts(java.lang.String namespace, java.lang.String localname) throws XBRLException
getFacts
in interface Store
namespace
- The namespace of the facts to select.localname
- The local name of the facts to select.XBRLException
- if either parameter is null.Store.getFacts(String, String)
public java.util.List<Fact> getFacts(Concept concept) throws XBRLException
getFacts
in interface Store
concept
- The concept to get the facts for.XBRLException
- if the parameter is null.Store.getFacts(Concept)