org.tm4j.topicmap.utils
Interface TopicMapBuilder

All Known Implementing Classes:
LTMBuilder, XTMBuilder

public interface TopicMapBuilder

The interface for a process which parses a topic map in a specific syntax and creates TopicMapObjects from it.

Author:
Kal Ahmed, Harald Kuhn (support for Reader)

Field Summary
static java.lang.String OPTION_ADDED_THEMES
          Common TopicMapBuilder property used to set the themes to be added to the scope of all topic characteristics during the parsing process.
 
Method Summary
 void build(java.io.InputStream src, Locator srcLoc, TopicMap tm)
          Build topic map constructs from the specified source stream.
 void build(java.io.InputStream src, Locator srcLoc, TopicMap tm, Topic[] addedThemes)
          Build topic map constructs from the specified source stream.
 void build(java.io.InputStream src, Locator srcLoc, TopicMap tm, TopicMapProvider provider)
          Build topic map constructs from the specified source stream.
 void build(java.io.InputStream src, Locator srcLoc, TopicMap tm, TopicMapProvider provider, Topic[] addedThemes)
           
 void build(java.io.Reader src, Locator srcLoc, TopicMap tm)
          Build topic map constructs from the specified Reader.
 void build(java.io.Reader source, Locator base, TopicMap existing, Topic[] addedThemes)
           
 void build(java.io.Reader src, Locator srcLoc, TopicMap tm, TopicMapProvider provider)
          Build topic map constructs from the specified Reader.
 void build(java.io.Reader source, Locator base, TopicMap existing, TopicMapProvider provider, Topic[] addedThemes)
           
 boolean isSupportedProperty(java.lang.String propertyName)
          Determines whether or not a specific property is supported by the TopicMapBuilder implementation.
 void setProperty(java.lang.String propertyName, java.lang.Object value)
          Set a configuration property for the builder which will be applied to the processing of subsequent invocations of the build() method.
 

Field Detail

OPTION_ADDED_THEMES

public static final java.lang.String OPTION_ADDED_THEMES
Common TopicMapBuilder property used to set the themes to be added to the scope of all topic characteristics during the parsing process.

The value of this property must be a Scope object or null.

See Also:
Constant Field Values
Method Detail

isSupportedProperty

public boolean isSupportedProperty(java.lang.String propertyName)
Determines whether or not a specific property is supported by the TopicMapBuilder implementation.

Parameters:
propertyName - the name of the property to check for support.
Returns:
true if the property is supported and false otherwise.

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value)
                 throws BuilderPropertyNotRecognizedException,
                        BuilderPropertyInvalidException
Set a configuration property for the builder which will be applied to the processing of subsequent invocations of the build() method. A typical use of this method will be to set parser options prior to parsing the input stream.

Parameters:
propertyName - the name of the property to be set. See inidividual implementation classes for details of which properties are recognized by each implementation.
value - the value to be applied to the property.
Throws:
BuilderPropertyNotRecognizedException - if propertyName specifies a property which is not supported by the TopicMapBuilder implementation.
BuilderPropertyInvalidException - if value falls outside the supported range of values for the specified property.

build

public void build(java.io.InputStream src,
                  Locator srcLoc,
                  TopicMap tm,
                  TopicMapProvider provider)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Build topic map constructs from the specified source stream.

Parameters:
src - the source stream to be parsed.
srcLoc - the base address of the source being parsed
tm - the topic map for parsed objects to be added to.
provider - the provider to be used for retrieving any merged topic maps.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.Reader src,
                  Locator srcLoc,
                  TopicMap tm,
                  TopicMapProvider provider)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Build topic map constructs from the specified Reader.

Parameters:
src - the Reader to be parsed.
srcLoc - the base address of the source being parsed
tm - the topic map for parsed objects to be added to.
provider - the provider to be used for retrieving any merged topic maps.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.InputStream src,
                  Locator srcLoc,
                  TopicMap tm)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Build topic map constructs from the specified source stream.

Parameters:
src - the source stream to be parsed.
srcLoc - the base address of the source being parsed
tm - the topic map for parsed objects to be added to.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.InputStream src,
                  Locator srcLoc,
                  TopicMap tm,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Build topic map constructs from the specified source stream.

Parameters:
src - the source stream to be parsed.
srcLoc - the base address of the source being parsed
tm - the topic map for parsed objects to be added to.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.InputStream src,
                  Locator srcLoc,
                  TopicMap tm,
                  TopicMapProvider provider,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.Reader src,
                  Locator srcLoc,
                  TopicMap tm)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Build topic map constructs from the specified Reader.

Parameters:
src - the Reader to be parsed.
srcLoc - the base address of the source being parsed
tm - the topic map for parsed objects to be added to.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.Reader source,
                  Locator base,
                  TopicMap existing,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Parameters:
source -
base -
existing -
addedThemes -
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

build

public void build(java.io.Reader source,
                  Locator base,
                  TopicMap existing,
                  TopicMapProvider provider,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException