org.tm4j.topicmap.utils .XTMBuilder

Description

Implementation of the TopicMapBuilder interface which supports the parsing of topic map information from XML files conforming to the XTM 1.0 DTD and specification.

Properties supported by this implementation are:

http://www.tm4j.org/tm4j/xtmbuilder/validation [XTMBuilder.OPTION_VALIDATION]
Specifies whether parsing should use a validating parser or a non-validating parser. If the value of this property is 'true', then a validating parser will be applied to the input stream, otherwise a non-validating parser will be applied. Default value is 'false'.
http://www.tm4j.org/tm4j/xtmbuilder/failonveto [XTMBuilder.OPTION_FAIL_ON_VETO]
Specifies whether parsing should be abandoned if a PropertyVetoException is encountered while populating the topic map. If the value of this property is 'true', then parsing will be abandoned if such an exception is raised, otherwise the builder will attempt to continue, ignoring the vetoed change. Default value is 'true'

Inheritance Hierarchy

Field Summary
DEFAULT_BASE_URL
OPTION_FAIL_ON_VETO A convenience constant defining the property name http://www.tm4j.org/tm4j/xtmbuilder/failonveto If this property is set to true, then the parser will throw an exception if a PropertyVetoException prevents the creation or update of a TopicMapObject.
OPTION_FULL_XML_BASE A constant defining the property name http://www.tm4j.org/tm4j/xtmbuilder/fullxmlbase If this property is set to true, then xml:base attributes will be honoured wherever they appear in the XTM file If this property is set to false, then only the xml:base attribute on the root topicMap element will be honoured.
OPTION_USE_DEFAULT_CATALOG A constant defining the property http://www.tm4j.org/tm4j/xtmbuilder/usedefaultcatalog.
OPTION_VALIDATION A convenience constant defining the property name http://www.tm4j.org/tm4j/xtmbuilder/validation If this property is true, the builder will attempt to locate and use a validating XML parser.
m_catalogResolver Reusable XML catalog resolution service. XML catalog resolution service.
Method Summary
void addThemes(org.tm4j.topicmap.ScopedObject sco)
java.lang.String assignID(java.lang.String elementID)
java.lang.String assignID(org.tm4j.net.Locator loc)
java.lang.String assignID(org.tm4j.net.Locator loc,java.lang.String id)
void baseNameString(java.lang.String id,java.lang.String value)
Indicates a base name string event.
void build(java.io.InputStream source,org.tm4j.net.Locator base,org.tm4j.topicmap.TopicMap existing,org.tm4j.topicmap.Topic[] addedThemes)
void build(java.io.InputStream src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm)
void build(java.io.InputStream src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm,org.tm4j.topicmap.TopicMapProvider provider)
void build(java.io.InputStream src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm,org.tm4j.topicmap.TopicMapProvider provider,org.tm4j.topicmap.Topic[] addedThemes)
void build(java.io.InputStream src,org.tm4j.topicmap.TopicMap tm,org.tm4j.topicmap.TopicMapProvider provider)
void build(java.io.Reader source,org.tm4j.net.Locator base,org.tm4j.topicmap.TopicMap existing,org.tm4j.topicmap.TopicMapProvider provider,org.tm4j.topicmap.Topic[] addedThemes)
void build(java.io.Reader source,org.tm4j.net.Locator base,org.tm4j.topicmap.TopicMap existing,org.tm4j.topicmap.Topic[] addedThemes)
void build(java.io.Reader src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm)
void build(java.io.Reader src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm,org.tm4j.topicmap.TopicMapProvider provider)
void build(org.xml.sax.InputSource src,org.tm4j.net.Locator srcLoc,org.tm4j.topicmap.TopicMap tm)
void endAssociation()
Indicates the end of an association event.
void endBaseName()
Indicates the end of a topic base name event.
void endInstanceOf()
Indicates the end of an instanceOf event.
void endMember()
Indicates the end of an association member event.
void endMergeMap()
Indicates the end of a mergeMap event.
void endOccurrence()
Indicates the end of an occurrence event.
void endParameters()
Indicates the end of a variant parameters event.
void endRoleSpec()
Indicates the end of an association role specification event.
void endScope()
Indicates the end of a scope event.
void endSubjectIdentity()
Indicates the end of a subject identity event.
void endTopic()
Indicates the start of a topic event.
void endTopicMap()
Indicates the end of a topic map event.
void endVariant()
Indicates the end of a base name variant event.
void endVariantName()
Indicates the end of a variant name event.
java.lang.String expandID(java.lang.String id)
java.lang.String expandRef(java.lang.String ref)
org.tm4j.net.Locator expandRef(org.tm4j.net.Locator loc,org.tm4j.net.Locator baseLoc)
java.lang.String expandResourceID(java.lang.String id)
java.lang.String generateID()
org.apache.xml.resolver.tools.CatalogResolver getCatalogResolver()
Return the CatalogResolver used by this XTMBuilder, null if not available.
org.tm4j.topicmap.Topic getTopicBySourceLocator(org.tm4j.net.Locator resourceLocator)
org.tm4j.topicmap.Topic getTopicBySubject(org.tm4j.net.Locator resource)
org.tm4j.topicmap.Topic getTopicBySubjectIndicator(java.lang.String indicator)
org.tm4j.topicmap.TopicMap getTopicMap()
Return the TopicMap built by this XTMBuilder.
void init()
void isSupportedProperty(java.lang.String propertyName)
void peekPurpose()
void popPurpose()
void pushPurpose(int purpose)
void ref(java.lang.String id,int refType,java.lang.String refValue,java.lang.String xmlBase)
Indicates a reference event.
void ref(java.lang.String id,int refType,org.tm4j.net.Locator refValue,org.tm4j.net.Locator base)
Indicates a reference event.
void reportWarning(java.lang.String msg)
void resourceData(java.lang.String id,java.lang.String data)
Indicates a resource data event.
org.tm4j.net.Locator resourceLocatorForID(java.lang.String id)
void scopeClassInstanceAssociation(org.tm4j.topicmap.Topic classTopic,org.tm4j.topicmap.Topic instTopic)
void setAddedThemes(org.tm4j.topicmap.Topic[] addedThemes)
Sets the collection of Topics to be added to the scope of every Association, Occurrence and BaseName built by this class.
void setProperty(java.lang.String propertyName,java.lang.Object value)
void setResourceID(org.tm4j.topicmap.TopicMapObject tmo,java.lang.String id)
void setResourceURL(java.net.URL url)
void setSourceLocator(org.tm4j.net.Locator loc)
Set the Locator of the built TopicMap to loc.
void startAssociation(java.lang.String id)
Indicates the start of an association event.
void startBaseName(java.lang.String id)
Indicates the start of a topic base name event.
void startInstanceOf(java.lang.String id)
Indicates the start of an instanceOf event.
void startMember(java.lang.String id)
Indicates the start of an association member event.
void startMergeMap(java.lang.String id,java.lang.String mergeMapURI,java.lang.String base)
Indicates the start of a mergeMap event.
void startOccurrence(java.lang.String id)
Indicates the start of an occurrence event.
void startParameters(java.lang.String id)
Indicates the start of a variant parameters event.
void startRoleSpec(java.lang.String id)
Indicates the start of an association role specification event.
void startScope(java.lang.String id)
Indicates the start of a scope event.
void startSubjectIdentity(java.lang.String id)
Indicates the start of a subject identity event.
void startTopic(java.lang.String id)
Indicates the start of a topic event.
void startTopicMap(java.lang.String id,java.lang.String xmlBase)
Indicates the start of a topic map event.
void startVariant(java.lang.String id)
Indicates the start of a base name variant event.
void startVariantName(java.lang.String id)
Indicates the start of a variant name event.
void variantName(java.lang.String id,java.lang.String value)
Indicates a variant name event.

Related Topics

Imports