📄 store.java
字号:
* Creates a single DOM structure from all documents in the * data store and saves this single XML structure in the * specified file. * @param file The file to save the Store content to. * @throws XBRLException if the documents in the store cannot be * saved to the single file. */ public void saveStoreAsSingleDocument(File file) throws XBRLException; /** * Returns the root element of the subtree starting with the * fragment with the specified index. All subtrees for a given store * instance are produced from the one XML DOM and so can be appended * to eachother as required. * @param f The fragment at the root of the subtree. * @return The root element of the subtree headed by the fragment * with the specified index. * @throws XBRLException if the subtree cannot be constructed. */ public Element getSubtree(Fragment f) throws XBRLException; /** * Get all data in the store as a single XML DOM object. * @return the XML DOM representation of the XBRL information in the * data store. * @throws XBRLException if the DOM cannot be constructed. */ public Document getStoreAsDOM() throws XBRLException; /** * Get all data in the store as a single XML DOM object including * the annotations used in the * <a href="http://www.sourceforge.net/xbrlcomposer/">XBRLComposer</a> project. * @return the composed data store as a DOM object. * @throws XBRLException if the composed data store cannot be constructed. */ public Document formCompositeDocument() throws XBRLException; /** * Get a list of the URLs that have been stored. * @return a list of the URLs in the data store. * @throws XBRLException if the list cannot be constructed. */ public List<String> getStoredURLs() throws XBRLException; /** * Test if a particular URL is already in the data store. * @param url the string representation of the URL to be tested for. * @return true if the document is in the store and false otherwise. * @throws XBRLException if the document cannot be constructed as a DOM. */ public boolean hasDocument(String url) throws XBRLException; /** * Stores the state of the document discovery process. * @param documents The list of URLs of the documents remaining to be * discovered. * @throws XBRLException */ public void storeLoaderState(List<String> documents) throws XBRLException; /** * Get the next fragment ID to use when extending a DTS, instead of starting at 1 again * and corrupting the DTS data store with duplicate fragment IDs. * @return The next ID to use for the next fragment to be added to the DTS. * @throws XBRLException */ public String getNextFragmentId() throws XBRLException; /** * @return the list of URLs of the documents remaining to be analysed. * @throws XBRLException if any of the document URLs are malformed. */ public List<URL> getDocumentsToDiscover() throws XBRLException; /** * @return a list of stub fragments (Those fragments indicating a * document that needs to be added to the data store). * @throws XBRLException */ public FragmentList<Fragment> getStubs() throws XBRLException; /** * @param url The string value of the URL of the document to get the stub for. * @return the stub fragment or null if none exists. * @throws XBRLException if there is more than one stub. */ public Fragment getStub(String url) throws XBRLException; /** * @param document The document to store a stub for. * @throws XBRLException */ public void storeStub(String document) throws XBRLException; /** * @param url The URL of the document for which * the stub fragment is to be removed from the data store. * @throws XBRLException */ public void removeStub(String url) throws XBRLException; /** * Utility method to return a list of fragments in a data store * that have a type corresponding to the specified fragment interface name. * @param 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. * @return a list of fragments with the given fragment type. * @throws XBRLException */ public <F extends Fragment> FragmentList<F> getFragments(String interfaceName) throws XBRLException; /** * @param 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. * @param parentIndex The index of the parent fragment. * @return a list of fragments with the given fragment type and with the given parent fragment. * @throws XBRLException */ public <F extends Fragment> FragmentList<F> getChildFragments(String interfaceName, String parentIndex) throws XBRLException; /** * get the collection of networks expressed using arcs that involve this * arc role. */ public Networks getNetworks(String arcRole) throws XBRLException; /** * 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 URL. * @param url The URL of the document to get the fragments from. * @param 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. * @return a list of fragments with the given fragment type and in the given document. * @throws XBRLException */ public <F extends Fragment> FragmentList<F> getFragmentsFromDocument(URL url, String interfaceName) throws XBRLException; /** * @param <F> The fragment extension class * @param url The URL of the document to get the root fragment for. * @return the root fragment of the document with the given URL or null if no * root fragment is available for the given URL. * @throws XBRLException if more than one root fragment is found in the data store. */ public <F extends Fragment> F getRootFragmentForDocument(String url) throws XBRLException; /** * @param <F> The fragment extension class * @return the list of root fragments of the documents in the store. * @throws XBRLException if more than one root fragment is found in the data store. */ public <F extends Fragment> FragmentList<F> getRootFragments() throws XBRLException; /** * Delete and close the data store. * @throws XBRLException if the data store cannot be deleted. */ public void delete() throws XBRLException; /** * @param document The string representation of the document content. * @return the hash value for the string representing the * content of the document. * @throws XBRLException */ public String getDocumentId(String document) throws XBRLException; /** * @param encoding The code identifying the language that the name of the * language is expressed in. * @param code The code that identifies the language being named. * @return the Language fragment that specifies the name of the language * for the given code, expressed in the language identified by the encoding or * null if either parameter is null or if there is no matching language name * in the data store. The input parameters are converted to upper case before * processing. * @throws XBRLException */ public Language getLanguage(String encoding, String code) throws XBRLException; /** * Sets the matcher for the store to use. Care should be taken to ensure * that the one matcher is used for all documents in the store. * @param matcher the matcher to use to identify identical resources. * @throws XBRLException if the matcher is null; */ public void setMatcher(Matcher matcher) throws XBRLException; /** * @return the matcher used by the store to identify identical resources. */ public Matcher getMatcher();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -