org.tm4j.topicmap.utils
Class LTMBuilder

java.lang.Object
  extended byorg.tm4j.topicmap.utils.LTMBuilder
All Implemented Interfaces:
TopicMapBuilder

public class LTMBuilder
extends java.lang.Object
implements TopicMapBuilder

Author:
Kal Ahmed

Field Summary
 
Fields inherited from interface org.tm4j.topicmap.utils.TopicMapBuilder
OPTION_ADDED_THEMES
 
Constructor Summary
LTMBuilder()
           
LTMBuilder(TopicMap baseTM)
           
LTMBuilder(TopicMapProvider provider)
           
 
Method Summary
 void build(java.io.InputStream src, Locator srcLoc, TopicMap baseTM)
          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 baseTM, 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 baseTM)
          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 baseTM, TopicMapProvider provider)
          Build topic map constructs from the specified Reader.
 void build(java.io.Reader source, Locator base, TopicMap existing, TopicMapProvider provider, Topic[] addedThemes)
           
 IDGenerator getIDGenerator()
          Returns the IDGenerator used by this LTMBuilder.
 boolean isSupportedProperty(java.lang.String propertyName)
          Determines whether or not a specific property is supported by the TopicMapBuilder implementation.
 TopicMap read(java.io.File src)
           
 void setIDGenerator(IDGenerator idgen)
          Sets the IDGenerator used by this LTMBuilder (and its LTMParser).
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LTMBuilder

public LTMBuilder(TopicMapProvider provider)

LTMBuilder

public LTMBuilder(TopicMap baseTM)

LTMBuilder

public LTMBuilder()
Method Detail

setIDGenerator

public void setIDGenerator(IDGenerator idgen)
Sets the IDGenerator used by this LTMBuilder (and its LTMParser).


getIDGenerator

public IDGenerator getIDGenerator()
Returns the IDGenerator used by this LTMBuilder.


isSupportedProperty

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

Specified by:
isSupportedProperty in interface TopicMapBuilder
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
Description copied from interface: TopicMapBuilder
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.

Specified by:
setProperty in interface TopicMapBuilder
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.

build

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

Specified by:
build in interface TopicMapBuilder
Parameters:
src - the source stream to be parsed.
srcLoc - the base address of the source being parsed
baseTM - 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 baseTM)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Description copied from interface: TopicMapBuilder
Build topic map constructs from the specified source stream.

Specified by:
build in interface TopicMapBuilder
Parameters:
src - the source stream to be parsed.
srcLoc - the base address of the source being parsed
baseTM - 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 src,
                  Locator srcLoc,
                  TopicMap baseTM,
                  TopicMapProvider provider)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Description copied from interface: TopicMapBuilder
Build topic map constructs from the specified Reader.

Specified by:
build in interface TopicMapBuilder
Parameters:
src - the Reader to be parsed.
srcLoc - the base address of the source being parsed
baseTM - 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 baseTM)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Description copied from interface: TopicMapBuilder
Build topic map constructs from the specified Reader.

Specified by:
build in interface TopicMapBuilder
Parameters:
src - the Reader to be parsed.
srcLoc - the base address of the source being parsed
baseTM - the topic map for parsed objects to be added to.
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException

read

public TopicMap read(java.io.File src)
              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.InputStream src,
                  Locator srcLoc,
                  TopicMap tm,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Description copied from interface: TopicMapBuilder
Build topic map constructs from the specified source stream.

Specified by:
build in interface TopicMapBuilder
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.Reader source,
                  Locator base,
                  TopicMap existing,
                  Topic[] addedThemes)
           throws java.io.IOException,
                  LocatorFactoryException,
                  TopicMapProcessingException,
                  java.beans.PropertyVetoException,
                  TopicMapProviderException
Specified by:
build in interface TopicMapBuilder
Parameters:
source -
base -
existing -
addedThemes -
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
Specified by:
build in interface TopicMapBuilder
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
Specified by:
build in interface TopicMapBuilder
Throws:
java.io.IOException
LocatorFactoryException
TopicMapProcessingException
java.beans.PropertyVetoException
TopicMapProviderException