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 Properties
protected FileComponent
protected String
protected LoggerInf
protected ManInfo
protected SAXParser
protected String
protected VersionMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic VersionMap
buildMap
(InputStream inStream, LoggerInf logger) void
characters
(char[] ch, int start, int length) void
endElement
(String uri, String localName, String qName) static void
static void
mainOriginal
(String[] args) static void
mainTestBadMan
(String[] args) void
process
(InputStream input) protected void
setFile
(FileComponent fileComponent) protected void
void
startElement
(String uri, String localName, String qName, Attributes attributes) protected DateState
protected Identifier
protected int
protected long
protected DateState
toPropDate
(String inkey) protected Identifier
protected int
protected long
toPropLong
(String inkey) Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
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:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
setObject
protected void setObject() -
setFile
-
toPropInt
-
toPropLong
-
toPropID
-
toPropDate
-
toInt
-
toLong
-
toID
-
toDate
-
getVersionMap
-