org.tm4j.topicmap.utils
Class XTMParser
java.lang.Object
org.xml.sax.helpers.DefaultHandler
org.tm4j.topicmap.utils.XTMParser
- All Implemented Interfaces:
- org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler
- public class XTMParser
- extends org.xml.sax.helpers.DefaultHandler
- implements org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler
Method Summary |
void |
characters(char[] ch,
int start,
int len)
|
void |
endDocument()
|
void |
endElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName)
|
void |
error(org.xml.sax.SAXParseException exception)
|
void |
fatalError(org.xml.sax.SAXParseException exception)
|
protected java.lang.String |
getXLinkAttribute(java.lang.String localName,
org.xml.sax.Attributes atts)
|
protected java.lang.String |
getXTMAttribute(java.lang.String localName,
org.xml.sax.Attributes atts)
|
protected java.lang.String |
getXTMClass(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
parseAssociation(org.xml.sax.Attributes atts)
|
void |
parseBaseName(org.xml.sax.Attributes atts)
|
void |
parseBaseNameString(org.xml.sax.Attributes atts)
|
void |
parseInstanceOf(org.xml.sax.Attributes atts)
|
void |
parseMember(org.xml.sax.Attributes atts)
|
void |
parseMergeMap(org.xml.sax.Attributes atts)
|
void |
parseOccurrence(org.xml.sax.Attributes atts)
|
void |
parseParameters(org.xml.sax.Attributes atts)
|
void |
parseResourceData(org.xml.sax.Attributes atts)
|
void |
parseResourceRef(org.xml.sax.Attributes atts)
|
void |
parseRoleSpec(org.xml.sax.Attributes atts)
|
void |
parseScope(org.xml.sax.Attributes atts)
|
void |
parseSubjectIdentity(org.xml.sax.Attributes atts)
|
void |
parseSubjectIndicatorRef(org.xml.sax.Attributes atts)
|
void |
parseTopic(org.xml.sax.Attributes atts)
|
void |
parseTopicMap(org.xml.sax.Attributes atts)
|
void |
parseTopicRef(org.xml.sax.Attributes atts)
|
void |
parseVariant(org.xml.sax.Attributes atts)
|
void |
parseVariantName(org.xml.sax.Attributes atts)
|
org.xml.sax.InputSource |
resolveEntity(java.lang.String publicId,
java.lang.String systemId)
Returns an InputSource after resolving the provided public and system
identifiers. |
void |
setDocumentLocator(org.xml.sax.Locator loc)
|
void |
startDocument()
|
void |
startElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
|
void |
warning(org.xml.sax.SAXParseException exception)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
endPrefixMapping, ignorableWhitespace, processingInstruction, skippedEntity, startPrefixMapping |
TOPICMAP
public static final java.lang.String TOPICMAP
- See Also:
- Constant Field Values
TOPIC
public static final java.lang.String TOPIC
- See Also:
- Constant Field Values
SUBJECTIDENTITY
public static final java.lang.String SUBJECTIDENTITY
- See Also:
- Constant Field Values
INSTANCEOF
public static final java.lang.String INSTANCEOF
- See Also:
- Constant Field Values
TOPICREF
public static final java.lang.String TOPICREF
- See Also:
- Constant Field Values
SUBJECTINDICATORREF
public static final java.lang.String SUBJECTINDICATORREF
- See Also:
- Constant Field Values
BASENAME
public static final java.lang.String BASENAME
- See Also:
- Constant Field Values
BASENAMESTRING
public static final java.lang.String BASENAMESTRING
- See Also:
- Constant Field Values
VARIANT
public static final java.lang.String VARIANT
- See Also:
- Constant Field Values
VARIANTNAME
public static final java.lang.String VARIANTNAME
- See Also:
- Constant Field Values
PARAMETERS
public static final java.lang.String PARAMETERS
- See Also:
- Constant Field Values
SCOPE
public static final java.lang.String SCOPE
- See Also:
- Constant Field Values
ASSOCIATION
public static final java.lang.String ASSOCIATION
- See Also:
- Constant Field Values
MEMBER
public static final java.lang.String MEMBER
- See Also:
- Constant Field Values
ROLESPEC
public static final java.lang.String ROLESPEC
- See Also:
- Constant Field Values
OCCURRENCE
public static final java.lang.String OCCURRENCE
- See Also:
- Constant Field Values
RESOURCEREF
public static final java.lang.String RESOURCEREF
- See Also:
- Constant Field Values
RESOURCEDATA
public static final java.lang.String RESOURCEDATA
- See Also:
- Constant Field Values
MERGEMAP
public static final java.lang.String MERGEMAP
- See Also:
- Constant Field Values
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
HREF
public static final java.lang.String HREF
- See Also:
- Constant Field Values
CLASS
public static final java.lang.String CLASS
- See Also:
- Constant Field Values
XTM_NS_URI
public static final java.lang.String XTM_NS_URI
- See Also:
- Constant Field Values
XLINK_NS_URI
public static final java.lang.String XLINK_NS_URI
- See Also:
- Constant Field Values
XTMParser
public XTMParser(TopicMapHandler builder)
resolveEntity
public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
java.lang.String systemId)
throws org.xml.sax.SAXException
- Returns an InputSource after resolving the provided public and system
identifiers. If a catalog resolver is available, it is used, otherwise
an InputSource is created from the system identifier.
- Specified by:
resolveEntity
in interface org.xml.sax.EntityResolver
- Throws:
org.xml.sax.SAXException
characters
public void characters(char[] ch,
int start,
int len)
- Specified by:
characters
in interface org.xml.sax.ContentHandler
startDocument
public void startDocument()
- Specified by:
startDocument
in interface org.xml.sax.ContentHandler
endDocument
public void endDocument()
- Specified by:
endDocument
in interface org.xml.sax.ContentHandler
startElement
public void startElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
throws org.xml.sax.SAXException
- Specified by:
startElement
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
endElement
public void endElement(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
- Specified by:
endElement
in interface org.xml.sax.ContentHandler
- Throws:
org.xml.sax.SAXException
setDocumentLocator
public void setDocumentLocator(org.xml.sax.Locator loc)
- Specified by:
setDocumentLocator
in interface org.xml.sax.ContentHandler
parseTopicMap
public void parseTopicMap(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseTopic
public void parseTopic(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseSubjectIdentity
public void parseSubjectIdentity(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseInstanceOf
public void parseInstanceOf(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseTopicRef
public void parseTopicRef(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseResourceRef
public void parseResourceRef(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseSubjectIndicatorRef
public void parseSubjectIndicatorRef(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseScope
public void parseScope(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseBaseName
public void parseBaseName(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseBaseNameString
public void parseBaseNameString(org.xml.sax.Attributes atts)
parseVariant
public void parseVariant(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseParameters
public void parseParameters(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseVariantName
public void parseVariantName(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseAssociation
public void parseAssociation(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseMember
public void parseMember(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseRoleSpec
public void parseRoleSpec(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseOccurrence
public void parseOccurrence(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
parseResourceData
public void parseResourceData(org.xml.sax.Attributes atts)
parseMergeMap
public void parseMergeMap(org.xml.sax.Attributes atts)
throws TopicMapProcessingException
- Throws:
TopicMapProcessingException
getXTMAttribute
protected java.lang.String getXTMAttribute(java.lang.String localName,
org.xml.sax.Attributes atts)
getXTMClass
protected java.lang.String getXTMClass(java.lang.String nsURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes atts)
getXLinkAttribute
protected java.lang.String getXLinkAttribute(java.lang.String localName,
org.xml.sax.Attributes atts)
error
public void error(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
error
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
fatalError
public void fatalError(org.xml.sax.SAXParseException exception)
throws org.xml.sax.SAXException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXException
warning
public void warning(org.xml.sax.SAXParseException exception)
- Specified by:
warning
in interface org.xml.sax.ErrorHandler