|
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.vocab.LoadMetadataOPML
public class LoadMetadataOPML
Loads metadata groups from files specified by a given XML configuration file.
Constructor Summary | |
---|---|
LoadMetadataOPML(boolean debug)
Constructor for the LoadMetadataVocabs object that does nothing (uses getMetadataVocabInstance() method to load and retrieve an instance of a vocab). |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
(SAX) Element data (characters between tags) |
void |
endDocument()
(SAX) Required by SAX, but not used here |
void |
endElement(String namespaceURI,
String localName,
String qName)
(SAX) Invoked upon closing tag of an XML element |
void |
endPrefixMapping(String prefix)
(SAX) Required by SAX, but not used here |
String |
getConfigFile()
Gets the configFile attribute of the LoadMetadataVocabs object |
static String |
getDateStamp()
Return a string for the current time and date, sutiable for display in log files and output to standout: |
String |
getMessage()
Gets the message attribute of the LoadMetadataVocabs object |
static MetadataVocab |
getMetadataVocabInstance(String configFile)
Gets the metadataVocabInstance attribute of the LoadMetadataOPML class |
static void |
getMetadataVocabInstance(String configFile,
String contextAttributeName,
ServletContext servletContext,
String vocabTextFile,
boolean debug)
Loads an instance of a MetadataVocab object and sets it as a servlet context attribute. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
(SAX) Reports any whitespace that is ignored because it falls outside of the DTD or schema definition--usefull for re-generating the file with indents intact, though. |
void |
load()
Load (or reload) the vocabulary |
void |
processingInstruction(String target,
String data)
(SAX) Required by SAX, but not used here |
void |
setDocumentLocator(Locator locator)
(SAX) Sets the SAX locator, which indicates the current position of the parser within the document (line number, column number). |
void |
skippedEntity(String name)
(SAX) Required by SAX, but not used here |
void |
startDocument()
(SAX) Required by SAX, but not used here |
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
(SAX) Invoked upon opening tag of an XML element |
void |
startPrefixMapping(String prefix,
String uri)
(SAX) Required by SAX, but not used here |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LoadMetadataOPML(boolean debug)
debug
- Method Detail |
---|
public static void getMetadataVocabInstance(String configFile, String contextAttributeName, ServletContext servletContext, String vocabTextFile, boolean debug)
servletContext
- The java servlet context in which to store the
loaded vocabulariesvocabTextFile
- Optional (can be NULL) file where vocabs get
listed as text strings (for use by log analysis/reporting)contextAttributeName
- The MetadataVocab instance is stored in app
scope as thisconfigFile
- Base loader file (lists groups/fields
listings)debug
- public static MetadataVocab getMetadataVocabInstance(String configFile)
configFile
-
public void load()
public String getMessage()
public String getConfigFile()
public void setDocumentLocator(Locator locator)
setDocumentLocator
in interface ContentHandler
locator
- The new documentLocator valuepublic void startDocument() throws SAXException
startDocument
in interface ContentHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
SAXException
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
prefix
- uri
-
SAXException
public void endPrefixMapping(String prefix) throws SAXException
endPrefixMapping
in interface ContentHandler
prefix
-
SAXException
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
namespaceURI
- XML namespacelocalName
- local tag nameqName
- fully qualified tag nameatts
- tag attributes
SAXException
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
namespaceURI
- XML namespacelocalName
- local tag nameqName
- fully qualified tag name
SAXException
public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
ch
- character arraystart
- starting index of character datalength
- length of character data
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ch
- start
- length
-
SAXException
public void processingInstruction(String target, String data) throws SAXException
processingInstruction
in interface ContentHandler
target
- data
-
SAXException
public void skippedEntity(String name) throws SAXException
skippedEntity
in interface ContentHandler
name
-
SAXException
public static String getDateStamp()
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |