net.ontopia.topicmaps.impl.rdbms
Class TopicMapBuilder

java.lang.Object
  extended by net.ontopia.topicmaps.impl.rdbms.TopicMapBuilder
All Implemented Interfaces:
java.io.Serializable, TopicMapBuilderIF

public class TopicMapBuilder
extends java.lang.Object
implements TopicMapBuilderIF, java.io.Serializable

INTERNAL: The default topic map builder implementation.

See Also:
Serialized Form

Field Summary
protected  TopicMapIF tm
           
protected  TransactionIF txn
           
 
Constructor Summary
TopicMapBuilder(TransactionIF txn, TopicMapIF tm)
           
 
Method Summary
protected  void addScope(ScopedIF scoped, java.util.Collection scope)
           
protected  void checkCollection(java.util.Collection objects)
           
 TopicMapIF getTopicMap()
          PUBLIC: Returns the topic map to which this builder belongs.
 AssociationIF makeAssociation(TopicIF assoc_type)
          PUBLIC: Makes a new association with the given type in the current topic map.
 AssociationIF makeAssociation(TopicIF assoc_type, TopicIF role_type, TopicIF player)
          PUBLIC: Makes a new unary association with the given type in the current topic map.
 AssociationRoleIF makeAssociationRole(AssociationIF assoc, TopicIF role_type, TopicIF player)
          PUBLIC: Makes a new association role with the given type and player for the specified association.
 OccurrenceIF makeOccurrence(TopicIF topic, TopicIF occurs_type, LocatorIF locator)
          PUBLIC: Makes a new external occurrence with the given type and locator for the given topic.
 OccurrenceIF makeOccurrence(TopicIF topic, TopicIF occurs_type, java.io.Reader value, long length, LocatorIF datatype)
          PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.
 OccurrenceIF makeOccurrence(TopicIF topic, TopicIF occurs_type, java.lang.String value)
          PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.
 OccurrenceIF makeOccurrence(TopicIF topic, TopicIF occurs_type, java.lang.String value, LocatorIF datatype)
          PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.
 TopicIF makeTopic()
          PUBLIC: Makes a new topic for the current topic map.
 TopicIF makeTopic(java.util.Collection topic_types)
          PUBLIC: Makes a new topic of the given types for the current topic map.
 TopicIF makeTopic(TopicIF topic_type)
          PUBLIC: Makes a new topic of the given type for the current topic map.
 TopicNameIF makeTopicName(TopicIF topic, java.lang.String value)
          PUBLIC: Makes a new untyped topic name with the given value for the given topic.
 TopicNameIF makeTopicName(TopicIF topic, TopicIF bntype, java.lang.String value)
          PUBLIC: Makes a new topic name with the given type and value for the given topic.
 VariantNameIF makeVariantName(TopicNameIF name, LocatorIF locator)
          DEPRECATED: Makes a new variant name with the given locator for the specified topic name.
 VariantNameIF makeVariantName(TopicNameIF name, LocatorIF locator, java.util.Collection scope)
          PUBLIC: Makes a new variant name with the given locator for the specified topic name in the given scope.
 VariantNameIF makeVariantName(TopicNameIF name, java.io.Reader value, long length, LocatorIF datatype)
          DEPRECATED: Makes a new variant name with the specified name value reader and datatype for the specified topic name.
 VariantNameIF makeVariantName(TopicNameIF name, java.io.Reader value, long length, LocatorIF datatype, java.util.Collection scope)
          PUBLIC: Makes a new variant name with the specified name value reader and datatype for the specified topic name in the given scope.
 VariantNameIF makeVariantName(TopicNameIF name, java.lang.String variant_name)
          DEPRECATED: Makes a new variant name with the specified name value for the specified topic name.
 VariantNameIF makeVariantName(TopicNameIF name, java.lang.String value, java.util.Collection scope)
          PUBLIC: Makes a new variant name with the specified name value for the specified topic name in the given scope.
 VariantNameIF makeVariantName(TopicNameIF name, java.lang.String value, LocatorIF datatype)
          DEPRECATED: Makes a new variant name with the specified name value and datatype for the specified topic name.
 VariantNameIF makeVariantName(TopicNameIF name, java.lang.String value, LocatorIF datatype, java.util.Collection scope)
          PUBLIC: Makes a new variant name with the specified name value and datatype for the specified name in the given scope.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

txn

protected TransactionIF txn

tm

protected TopicMapIF tm
Constructor Detail

TopicMapBuilder

public TopicMapBuilder(TransactionIF txn,
                       TopicMapIF tm)
Method Detail

getTopicMap

public TopicMapIF getTopicMap()
Description copied from interface: TopicMapBuilderIF
PUBLIC: Returns the topic map to which this builder belongs.

Specified by:
getTopicMap in interface TopicMapBuilderIF
Returns:
An object implementing TopicMapIF.

makeTopic

public TopicIF makeTopic()
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new topic for the current topic map.

Specified by:
makeTopic in interface TopicMapBuilderIF
Returns:
An object implementing TopicIF, and belonging to the given topic map.

makeTopic

public TopicIF makeTopic(TopicIF topic_type)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new topic of the given type for the current topic map.

Specified by:
makeTopic in interface TopicMapBuilderIF
Parameters:
topic_type - The type of the created topic, an object implementing TopicIF.
Returns:
An object implementing TopicIF, and belonging to the current topic map.

makeTopic

public TopicIF makeTopic(java.util.Collection topic_types)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new topic of the given types for the current topic map.

Specified by:
makeTopic in interface TopicMapBuilderIF
Parameters:
topic_types - A collection of topics defining the type of the created topic, all objects implementing TopicIF.
Returns:
An object implementing TopicIF, and belonging to the current topic map.

makeTopicName

public TopicNameIF makeTopicName(TopicIF topic,
                                 java.lang.String value)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new untyped topic name with the given value for the given topic.

Specified by:
makeTopicName in interface TopicMapBuilderIF
Parameters:
topic - A topic; an object implementing TopicIF.
value - A string which is the value of the topic name.
Returns:
An object implementing TopicNameIF, having the given value, and belonging to the given topic.

makeTopicName

public TopicNameIF makeTopicName(TopicIF topic,
                                 TopicIF bntype,
                                 java.lang.String value)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new topic name with the given type and value for the given topic.

Specified by:
makeTopicName in interface TopicMapBuilderIF
Parameters:
topic - A topic; an object implementing TopicIF.
bntype - The type of the created topic name; an object implementing TopicIF.
value - A string which is the value of the topic name.
Returns:
An object implementing TopicNameIF, having the given value, and belonging to the given topic.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.lang.String variant_name)
Description copied from interface: TopicMapBuilderIF
DEPRECATED: Makes a new variant name with the specified name value for the specified topic name.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
variant_name - A string which is the value of the variant name.
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     LocatorIF locator)
Description copied from interface: TopicMapBuilderIF
DEPRECATED: Makes a new variant name with the given locator for the specified topic name.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
locator - The locator for the variant name.
Returns:
An object implementing VariantNameIF.

makeOccurrence

public OccurrenceIF makeOccurrence(TopicIF topic,
                                   TopicIF occurs_type,
                                   java.lang.String value)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.

Specified by:
makeOccurrence in interface TopicMapBuilderIF
Parameters:
topic - The given topic; an object implementing TopicIF.
occurs_type - The type of the created occurrence; an object implementing TopicIF.
value - The value of the occurrence;
Returns:
An object implementing OccurrenceIF, having the given type and value, and belonging to the given topic.

makeOccurrence

public OccurrenceIF makeOccurrence(TopicIF topic,
                                   TopicIF occurs_type,
                                   LocatorIF locator)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new external occurrence with the given type and locator for the given topic.

Specified by:
makeOccurrence in interface TopicMapBuilderIF
Parameters:
topic - The given topic; an object implementing TopicIF.
occurs_type - The role type of the created occurrence; an object implementing TopicIF.
locator - The locator of the occurrence; an object implementing LocatorIF.
Returns:
An object implementing OccurrenceIF, having the given type and locator, and belonging to the given topic.

makeAssociation

public AssociationIF makeAssociation(TopicIF assoc_type)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new association with the given type in the current topic map.

Specified by:
makeAssociation in interface TopicMapBuilderIF
Parameters:
assoc_type - The association type; an object implementing TopicIF.
Returns:
An object implementing AssociationIF, having the given type, and belonging to the current topic map.

makeAssociationRole

public AssociationRoleIF makeAssociationRole(AssociationIF assoc,
                                             TopicIF role_type,
                                             TopicIF player)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new association role with the given type and player for the specified association.

Specified by:
makeAssociationRole in interface TopicMapBuilderIF
Parameters:
assoc - The given association; an object implementing AssociationIF.
role_type - The given type; an object implementing TopicIF.
player - The given role player; an object implementing TopicIF.
Returns:
An object implementing AssociationRoleIF, of the given type, and belonging to the given association.

checkCollection

protected void checkCollection(java.util.Collection objects)

addScope

protected void addScope(ScopedIF scoped,
                        java.util.Collection scope)

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.lang.String value,
                                     java.util.Collection scope)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new variant name with the specified name value for the specified topic name in the given scope.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
value - A string which is the value of the variant name.
scope - The scope in which this variant name is applicable.
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     LocatorIF locator,
                                     java.util.Collection scope)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new variant name with the given locator for the specified topic name in the given scope.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
locator - The locator for the variant name.
scope - The scope in which this variant name is applicable.
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.lang.String value,
                                     LocatorIF datatype)
Description copied from interface: TopicMapBuilderIF
DEPRECATED: Makes a new variant name with the specified name value and datatype for the specified topic name.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given name; an object implmenting TopicNameIF.
value - A string which is the value of the variant name.
datatype - The datatype of the value
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.lang.String value,
                                     LocatorIF datatype,
                                     java.util.Collection scope)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new variant name with the specified name value and datatype for the specified name in the given scope.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
value - A string which is the value of the variant name.
datatype - The datatype of the value
scope - The scope in which this variant name is applicable.
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.io.Reader value,
                                     long length,
                                     LocatorIF datatype)
Description copied from interface: TopicMapBuilderIF
DEPRECATED: Makes a new variant name with the specified name value reader and datatype for the specified topic name.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
value - A reader which contains the value of the variant name.
length - The length of the reader value.
datatype - The datatype of the value
Returns:
An object implementing VariantNameIF.

makeVariantName

public VariantNameIF makeVariantName(TopicNameIF name,
                                     java.io.Reader value,
                                     long length,
                                     LocatorIF datatype,
                                     java.util.Collection scope)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new variant name with the specified name value reader and datatype for the specified topic name in the given scope.

Specified by:
makeVariantName in interface TopicMapBuilderIF
Parameters:
name - The given topic name; an object implmenting TopicNameIF.
value - A reader which contains the value of the variant name.
length - The length of the reader value.
datatype - The datatype of the value
scope - The scope in which this variant name is applicable.
Returns:
An object implementing VariantNameIF.

makeOccurrence

public OccurrenceIF makeOccurrence(TopicIF topic,
                                   TopicIF occurs_type,
                                   java.lang.String value,
                                   LocatorIF datatype)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.

Specified by:
makeOccurrence in interface TopicMapBuilderIF
Parameters:
topic - The given topic; an object implementing TopicIF.
occurs_type - The type of the created occurrence; an object implementing TopicIF.
value - The value of the occurrence;
datatype - The datatype of the value.
Returns:
An object implementing OccurrenceIF, having the given type and value, and belonging to the given topic.

makeOccurrence

public OccurrenceIF makeOccurrence(TopicIF topic,
                                   TopicIF occurs_type,
                                   java.io.Reader value,
                                   long length,
                                   LocatorIF datatype)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new internal occurrence with the given type and value for the given topic.

Specified by:
makeOccurrence in interface TopicMapBuilderIF
Parameters:
topic - The given topic; an object implementing TopicIF.
occurs_type - The type of the created occurrence; an object implementing TopicIF.
value - The reader that contains the value of the occurrence;
length - The length of the reader value.
datatype - The datatype of the value.
Returns:
An object implementing OccurrenceIF, having the given type and value, and belonging to the given topic.

makeAssociation

public AssociationIF makeAssociation(TopicIF assoc_type,
                                     TopicIF role_type,
                                     TopicIF player)
Description copied from interface: TopicMapBuilderIF
PUBLIC: Makes a new unary association with the given type in the current topic map.

Specified by:
makeAssociation in interface TopicMapBuilderIF
Parameters:
assoc_type - The association type; an object implementing TopicIF.
role_type - The role type of the first role.
player - The player of the first role.
Returns:
An object implementing AssociationIF, having the given type, a single role and belonging to the current topic map.


Copyright © 2000-2012 Ontopia.