|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface Loader
Loader defines the functions required to get a DTS into the data store ready for interactions via the XBRL API. In many regards, this performs a similar role to an XML parser in that it triggers the exploration process and eventually populates a data structure.
| Method Summary | |
|---|---|
void |
add(Fragment fragment,
ElementState state)
Push a new fragment onto the stack of fragments that are being built by the loader. |
void |
cancelInterrupt()
Cancels a request for an interrupt. |
void |
discover()
Begin the XBRL DTS discovery process with the URIs that are already in the loading/discovery queue. |
void |
discover(List<URI> startingURIs)
Begin the XBRL DTS discovery process with the specified URIs given in the provided list. |
void |
discover(String uri)
Trigger the discovery process given a single URI. |
void |
discover(URI uri)
Trigger the discovery process given a single URI. |
void |
discover(URI uri,
String xml)
Perform a discovery starting with an XML document that is represented as a string. |
void |
discoverNext()
Parses the next document in the queue of documents to be discovered. |
Document |
getBuilderDOM()
|
Cache |
getCache()
|
String |
getCurrentFragmentId()
Returns the current fragment index (the one before the next fragment index) |
List<URI> |
getDocumentsStillToAnalyse()
|
URI |
getDocumentURI()
Get the URI for the document being parsed. |
EntityResolver |
getEntityResolver()
Return the entity resolver being used by the loader. |
Fragment |
getFragment()
|
History |
getHistory()
|
String |
getNextFragmentId()
Also increments the fragment index as a side-effect. |
Store |
getStore()
Get the DTS storage implementation |
XLinkProcessor |
getXlinkProcessor()
Get the XLink processor |
boolean |
hasHistory()
|
boolean |
isBuildingAFragment()
|
boolean |
isDiscovering()
|
void |
replaceCurrentFragment(Fragment replacement)
This is particularly useful when you can only fully determine the fragment type by reading in the complex element content of the data corresponding to the fragment. |
void |
requestInterrupt()
Interrupts the loading process once the current document discovery has been completed. |
void |
setCache(Cache cache)
This method specifies a cache to use when loading data into the data store. |
void |
setEntityResolver(EntityResolver resolver)
Set the resolver for the resolution of entities found during the loading and XLink processing |
void |
setHistory(History history)
|
void |
setSchemaLocationAttributeUsage(boolean useThem)
|
void |
stashURI(URI uri)
Stash a URI to await loading into DTS. |
void |
stashURIs(List<URI> uris)
|
void |
storeDocumentsToAnalyse()
Stores the stubs for the documents still to be analysed in the data store being used by the loader. |
void |
updateState(ElementState state)
If a fragment is completed, remove the fragment from the stack being maintained by the loader, store it in the data store and make the necessary update to the stack of child counts for the fragments. |
boolean |
useSchemaLocationAttributes()
The default behaviour is to ignore the content of XML Schema instance schemaLocation attributes. |
| Method Detail |
|---|
Store getStore()
XLinkProcessor getXlinkProcessor()
void setEntityResolver(EntityResolver resolver)
resolver - An entity resolver implementation or null if
the loader is to use a default entity resolver that does not
allow for caching.void setCache(Cache cache)
cache - The cache to use in the loader.
Cache getCache()
throws XBRLException
XBRLException - if the cache is null.
Document getBuilderDOM()
throws XBRLException
XBRLExceptionList<URI> getDocumentsStillToAnalyse()
void discover()
throws XBRLException
XBRLException - if the discovery process fails.
void discoverNext()
throws XBRLException
XBRLException - if the discovery process fails.
void discover(URI uri,
String xml)
throws XBRLException
uri - The URI to be used for the document that is supplied as a string.xml - The string representation of the XML document to be parsed.
XBRLException - if the discovery process fails.
void discover(List<URI> startingURIs)
throws XBRLException
startingURIs - The starting point URIs for the DTS
discovery process
Trigger the discovery process given the starting URIs.
XBRLException - if the input list contains objects
other than java.net.URIs.
void discover(URI uri)
throws XBRLException
uri - The URI to discover.
XBRLException
void discover(String uri)
throws XBRLException
uri - The URI to discover.
XBRLException
void stashURI(URI uri)
throws XBRLException
uri - The absolute URI to be stashed (any relative
URI gets resolved against the Base URI before stashing.
XBRLException - if the URI cannot be stored for
later exploration or if the URI is not absolute.
void stashURIs(List<URI> uris)
throws XBRLException
uris - The list of URIs to be stashed.
XBRLException
Fragment getFragment()
throws XBRLException
XBRLException
void replaceCurrentFragment(Fragment replacement)
throws XBRLException
replacement - the fragment to replace the current fragment being build with.
XBRLException - if there is no current fragment.boolean isBuildingAFragment()
boolean isDiscovering()
void add(Fragment fragment,
ElementState state)
throws XBRLException
fragment - The fragment to be added to the stack of fragments
being built by the loader.state - The state of the element that is the root of the fragment.
XBRLException
void updateState(ElementState state)
throws XBRLException
state - The element state for the element currently being parsed.
XBRLException
String getNextFragmentId()
throws XBRLException
XBRLException
String getCurrentFragmentId()
throws XBRLException
XBRLExceptionURI getDocumentURI()
EntityResolver getEntityResolver()
boolean useSchemaLocationAttributes()
void setSchemaLocationAttributeUsage(boolean useThem)
useThem - must be set to true if you want to discover documents identified
in XML Schema instance schemaLocation attributes and false otherwise.void requestInterrupt()
void cancelInterrupt()
void storeDocumentsToAnalyse()
throws XBRLException
XBRLExceptionvoid setHistory(History history)
history - The history recording system
to use for all new documents being loaded.
If this is null then the history is set to a
naive history that just logs the historic
information.History getHistory()
boolean hasHistory()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||