|
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
org.xbrlapi.data.dom.StoreImpl
public class StoreImpl
| Field Summary |
|---|
| Fields inherited from class org.xbrlapi.data.BaseStoreImpl |
|---|
domImplementation, matcher, namespaceBindings, storeDOM |
| Constructor Summary | |
|---|---|
StoreImpl()
Initialise the data store. |
|
| Method Summary | ||
|---|---|---|
void |
close()
Does nothing. |
|
void |
delete()
The store is in memory so no actions are required to remove the data store from persistent storage. |
|
boolean |
equals(Object obj)
The two stores are equal if they have equal caches and matchers and if they have the same number of fragments with the same indices. |
|
int |
getSize()
|
|
Document |
getStoreAsDOM()
Get the actual DOM that is used to hold the data store. |
|
|
getXMLResource(String index)
Retrieves an XML Resource from a data store. |
|
int |
hashCode()
|
|
boolean |
hasXMLResource(String index)
Test if a store contains a specific fragment, as identified by its index. |
|
void |
persist(XML xml)
Store a fragment. |
|
long |
queryCount(String query)
This method must be synchronised |
|
Set<String> |
queryForIndices(String query)
Run a query against the collection of all fragments in the store. |
|
Set<String> |
queryForStrings(String query)
Run a query that is required to return a sequence of strings. |
|
|
queryForXMLResources(String query)
Run a query against the collection of all fragments in the store. |
|
void |
remove(String index)
Remove a fragment from the store. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StoreImpl()
throws XBRLException
XBRLException - if the loader state cannot be initialised
or the XML DOM builder cannot be instantiated.| Method Detail |
|---|
public void close()
throws XBRLException
BaseStoreImpl
close in interface Storeclose in class BaseStoreImplXBRLExceptionStore.close()
public void delete()
throws XBRLException
delete in interface StoreXBRLException - if the data store cannot be deleted.Store.delete()
public int getSize()
throws XBRLException
getSize in interface StoreXBRLException - if the number of fragments cannot be determined.Store.persist(XML)
public void persist(XML xml)
throws XBRLException
Store
persist in interface Storexml - The fragment to be added to the store.
XBRLException - if the fragment cannot be added to the store.Store.persist(XML)
public boolean hasXMLResource(String index)
throws XBRLException
Store
hasXMLResource in interface Storeindex - The index of the fragment to test for.
XBRLException - If the test cannot be conducted.Store.hasXMLResource(String)
public <F extends XML> F getXMLResource(String index)
throws XBRLException
Store
getXMLResource in interface Storeindex - The index of the XML resource.
XBRLException - if the XML resource cannot be retrieved.Store.getXMLResource(String)
public void remove(String index)
throws XBRLException
remove in interface Storeindex - The index of the fragment to be removed from the store.
XBRLException - if the fragment exists but cannot be removed from the store.public Document getStoreAsDOM()
getStoreAsDOM in interface StoregetStoreAsDOM in class BaseStoreImplStore.getStoreAsDOM()
public <F extends XML> List<F> queryForXMLResources(String query)
throws XBRLException
queryForXMLResources in interface Storequery - The XPath query to run.
XBRLException - if the query cannot be executed.
public long queryCount(String query)
throws XBRLException
Store
queryCount in interface Storequery - The XQuery to run.
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.Store.queryCount(String)
public Set<String> queryForIndices(String query)
throws XBRLException
Store
queryForIndices 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.
The query MUST return a sequence of XML resource metadata root elements
matching the query. Otherwise, results from the query will be unpredictable.
XBRLException - if the query cannot be executed.Store.queryForIndices(String)
public Set<String> queryForStrings(String query)
throws XBRLException
Store
queryForStrings 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 results are not strings.Store.queryForStrings(String)public int hashCode()
hashCode in class BaseStoreImplObject.hashCode()public boolean equals(Object obj)
equals in class BaseStoreImplObject.equals(java.lang.Object)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||