|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.standards.StandardsRegistry
public class StandardsRegistry
Class to manage potentially many ASN standards documents, refered to using
AsnDocKey
instances.
Keys identify a standards Document uniquely, and we load each document, making no attempt to identify versions that may supercede other versions of the same standards doc.
The StandardsRegistry contains AsnDocInfo
instances to represent
each loaded Standards Doc. The hierarchical structure of each ASN
Document is represented as an StandardsDocument
instance. The registry
makes use of a TreeCache
to cache StandardTrees and loads them when
needed, so that many standards documents can be managed.
Method Summary | |
---|---|
void |
compareWithCatDocs()
|
AsnDocInfo |
getAsnDocByPath(String path)
Gets the asnDocByPath attribute of the StandardsRegistry object |
AsnDocInfo |
getDocInfo(String key)
Gets the docInfo attribute of the StandardsRegistry object |
List |
getDocInfos()
Return the AsnDocInfo's for registered standards documents |
static StandardsRegistry |
getInstance()
Gets the singleton StandardsRegistry instance |
String |
getKey(String docId)
Gets the key (e.g., "NSES.Science.1995.D10001D0") corresponding to provided Asn Identifier (i.e, purl) for that Standards Doc. |
Set |
getKeys()
Gets the keys attribute of the StandardsRegistry object |
List |
getRejectedDocs()
Gets the rejectedDocs attribute of the StandardsRegistry object |
AsnStandard |
getStandard(String asnId)
|
AsnStandardsDocument |
getStandardsDocument(String key)
Gets the standardsTree associated with the provided key |
AsnStandardsDocument |
getStandardsDocumentForDocId(String docId)
Gets the standardsTree corresponding to the ASN Document having the ASN identifier (purl) |
AsnStandardsNode |
getStandardsNode(String asnId)
Gets the standardsNode having the provided AsnID |
protected AsnStandardsDocument |
instantiateStandardsDocument(String key)
Create a AsnStandardsDocument by reading the standards file indicated by provided key. |
List |
load(String standardsDirectory)
Load all xml documents found by traversing the specified standardsDirectory recursively |
static void |
main(String[] args)
The main program for the StandardsRegistry class |
String |
matchKey(org.dlese.dpc.schemedit.standards.StandardsRegistry.DocMatchKey docMatchKey)
Find a key for a registered standards doc that matches provided DocKeyMatch instance. |
String |
matchKey(String key)
Find a key for a registered standards doc that matches provided key (which may contain wildcards) |
AsnDocInfo |
register(String path)
Register a Standards Document located at specified path |
void |
report()
Debugging utility |
static void |
setDebug(boolean bool)
Sets the debug attribute of the StandardsRegistry class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static StandardsRegistry getInstance()
public List load(String standardsDirectory) throws Exception
standardsDirectory
- a directory containing standards Documents
Exception
- NOT YET DOCUMENTEDpublic AsnDocInfo register(String path) throws Exception
path
- filepath of xml document to be loaded
Exception
- if unable to register document.public List getRejectedDocs()
protected AsnStandardsDocument instantiateStandardsDocument(String key) throws Exception
key
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic String getKey(String docId)
docId
- full ASN Id for a standards Document
public Set getKeys()
public AsnDocInfo getAsnDocByPath(String path)
path
- NOT YET DOCUMENTED
public AsnDocInfo getDocInfo(String key)
key
- key of form "author.topic.year"
public AsnStandardsDocument getStandardsDocument(String key)
key
- NOT YET DOCUMENTED
public AsnStandardsDocument getStandardsDocumentForDocId(String docId)
docId
- ASN Purl Id
public AsnStandardsNode getStandardsNode(String asnId)
asnId
- an ASN identifier (purl)
public AsnStandard getStandard(String asnId)
public String matchKey(String key)
key
- key to match againsted registred doc
public String matchKey(org.dlese.dpc.schemedit.standards.StandardsRegistry.DocMatchKey docMatchKey)
docMatchKey
- pattern to match against
public List getDocInfos()
public void compareWithCatDocs()
public static void main(String[] args) throws Exception
args
- The command line arguments
Exception
- NOT YET DOCUMENTEDpublic static void setDebug(boolean bool)
bool
- The new debug valuepublic void report()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |