|
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.XBRLStoreImpl
org.xbrlapi.data.xindice.StoreImpl
public class StoreImpl
Implementation of the Xindice based data store for the XBRLAPI.
| Field Summary |
|---|
| Fields inherited from class org.xbrlapi.data.BaseStoreImpl |
|---|
logger, matcher, namespaceBindings, storeDOM |
| Constructor Summary | |
|---|---|
StoreImpl(DBConnectionImpl connection,
String storeParentPath,
String dataCollectionName)
Initialise the database connection. |
|
| Method Summary | ||
|---|---|---|
void |
addIndex(String name,
String type,
String pattern)
Adds an index to the collection containing the DTS. |
|
void |
close()
Close the data store by closing the data and metadata collections. |
|
void |
delete()
Delete and close the data store. |
|
void |
deleteIndex(String name)
Deletes an index to the collection containing the DTS. |
|
Fragment |
getFragment(String index)
Retrieves a fragment from an XBRL API data store. |
|
boolean |
hasFragment(String index)
Test if a store contains a specific fragment, as identified by its index. |
|
|
query(String query)
Run a query against the collection of all fragments in the DTS. |
|
Map<String,String> |
queryForIndices(String query)
Run a query against the collection of all fragments in the store. |
|
void |
removeFragment(String index)
Remove a fragment from the DTS. |
|
void |
storeFragment(Fragment fragment)
Add a fragment to the data store. |
|
| Methods inherited from class org.xbrlapi.data.XBRLStoreImpl |
|---|
getArcRoles, getArcroleTypes, getArcroleTypes, getConcept, getExtendedLinksWithRole, getFacts, getFacts, getItems, getItems, getLinkRoles, getLinkRoles, getMinimalNetworksWithArcrole, getMinimalNetworksWithArcrole, getMinimumDocumentSet, getMinimumDocumentSet, getNetworkRoots, getNetworkRoots, getResourceRoles, getRoleTypes, getRoleTypes, getTuples, getTuples |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xbrlapi.data.XBRLStore |
|---|
getArcRoles, getArcroleTypes, getArcroleTypes, getConcept, getExtendedLinksWithRole, getFacts, getFacts, getItems, getItems, getLinkRoles, getLinkRoles, getMinimalNetworksWithArcrole, getMinimalNetworksWithArcrole, getMinimumDocumentSet, getMinimumDocumentSet, getNetworkRoots, getNetworkRoots, getResourceRoles, getRoleTypes, getRoleTypes, getTuples, getTuples |
| Constructor Detail |
|---|
public StoreImpl(DBConnectionImpl connection,
String storeParentPath,
String dataCollectionName)
throws XBRLException
connection - The live connection to the Xindice database.storeParentPath - The full path to the container collection, which is the
collection that will hold the data collection when it are created.dataCollectionName - The name of the data collection.
XBRLException - if the database connection is null or if the data or metadata collections
could not be created or accessed or the indexes could not be created or the XPath services
could not be established or if the storeParentPath does not end in a delimiter: /.| Method Detail |
|---|
public void close()
throws XBRLException
close in interface Storeclose in class BaseStoreImplXBRLException
public void delete()
throws XBRLException
Store
delete in interface StoreXBRLException - if the data store cannot be deleted.Store.delete()
public void storeFragment(Fragment fragment)
throws XBRLException
storeFragment in interface Storefragment - The fragment to be added to the DTS store.
XBRLException - if the fragment is in the store already or
the process of inserting its data and metadata fails or if the fragment
properties cannot be updated as required to reflect that its data has been
stored.
public boolean hasFragment(String index)
throws XBRLException
hasFragment in interface Storeindex - The index of the fragment to test for.
XBRLException - If the test cannot be conducted.
public Fragment getFragment(String index)
throws XBRLException
getFragment in interface Storeindex - The index of the fragment.
XBRLException - if the fragment cannot be retrieved.
public void removeFragment(String index)
throws XBRLException
removeFragment in interface Storeindex - The index of the fragment to be removed from the DTS store.
XBRLException - if the fragment cannot be removed from the store.
public <F extends Fragment> FragmentList<F> query(String query)
throws XBRLException
query in interface Storequery - The XPath query to run against the set of fragments in the
DTS.
XBRLException - if the query cannot be executed.
public Map<String,String> queryForIndices(String query)
throws XBRLException
Store
queryForIndices in interface Storequery - The XPath query to run against the set of fragments.
XBRLException - if the query cannot be executed.Store.queryForIndices(String)
public void addIndex(String name,
String type,
String pattern)
throws XBRLException
name - The name of the index.type - The type of the index ('name' or 'value').pattern - The pattern for the index (like the match attribute value in XSLT template elements.).
XBRLException - if the index cannot be added.
public void deleteIndex(String name)
throws XBRLException
name - The name of the index to be deleted.
XBRLException - if the index cannot be added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||