Package org.cdlib.mrt.cloud
Class ManifestSAX
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.cdlib.mrt.cloud.ManifestSAX
- All Implemented Interfaces:
ContentHandler,DTDHandler,EntityResolver,ErrorHandler
This object imports the formatTypes.xml and builds a local table of supported format types.
Note, that the ObjectFormat is being deprecated and replaced by a single format id (fmtid).
This change is happening because formatName is strictly a description and has no functional
use. The scienceMetadata flag is being dropped because the ORE Resource Map is more flexible
and allows for a broader set of data type.
- Author:
- dloy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ArrayList<FileComponent> protected Propertiesprotected FileComponentprotected Stringprotected LoggerInfprotected ManInfoprotected SAXParserprotected Stringprotected VersionMap -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VersionMapbuildMap(InputStream inStream, LoggerInf logger) voidcharacters(char[] ch, int start, int length) voidendElement(String uri, String localName, String qName) static voidstatic voidmainOriginal(String[] args) static voidmainTestBadMan(String[] args) voidprocess(InputStream input) protected voidsetFile(FileComponent fileComponent) protected voidvoidstartElement(String uri, String localName, String qName, Attributes attributes) protected DateStateprotected Identifierprotected intprotected longprotected DateStatetoPropDate(String inkey) protected Identifierprotected intprotected longtoPropLong(String inkey) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warningMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
versionMap
-
logger
-
saxParser
-
currentProp
-
manInfo
-
fileComponent
-
components
-
key
-
value
-
-
Constructor Details
-
ManifestSAX
- Throws:
TException
-
-
Method Details
-
main
- Throws:
TException
-
mainTestBadMan
- Throws:
TException
-
mainOriginal
- Throws:
TException
-
buildMap
- Throws:
TException
-
process
- Throws:
TException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException - Specified by:
startElementin interfaceContentHandler- Overrides:
startElementin classDefaultHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Overrides:
endElementin classDefaultHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Overrides:
charactersin classDefaultHandler- Throws:
SAXException
-
setObject
protected void setObject() -
setFile
-
toPropInt
-
toPropLong
-
toPropID
-
toPropDate
-
toInt
-
toLong
-
toID
-
toDate
-
getVersionMap
-