org.tm4j.topicmap
Interface TopicMapFactory

All Known Implementing Classes:
TopicMapFactoryBase

public interface TopicMapFactory

This interface defines a factory object for copying the whole family of Topic Map objects.

Implementations of this interface may wish to derive from the class org.tm4j.topicmap.TopicMapFactoryBase which provides default implementations of all of the copy() methods.

See Also:
TopicMapFactoryBase

Field Summary
static java.lang.String DEFAULT_BASE_URL
           
 
Method Summary
 Association copy(Association src)
           
 Association copy(Association src, boolean deep)
          Creates a copy of src A deep copy of src returns an Association in which the type and all child Members are deep copied.
 BaseName copy(BaseName src, Topic destTopic)
           
 BaseName copy(BaseName src, Topic destTopic, boolean deep)
          Creates a copy of src as a new child of destTopic A deep copy of src returns a BaseName in which the name string is a duplicate of the name string of src and the child Variants are deep copied.
 Member copy(Member src, Association destAssoc)
           
 Member copy(Member src, Association destAssoc, boolean deep)
          Creates a copy of src as a new child of destAssoc A deep copy of src returns a Member in which the roleSpec and players are all deep copied.
 Occurrence copy(Occurrence src, Topic destTopic)
           
 Occurrence copy(Occurrence src, Topic destTopic, boolean deep)
          Creates a copy of src as a new child of destTopic A deep copy of src returns an Occurrence in which the type topic is deep copied and the child resourceRef or resourceData is a duplicate of the value in the source object.
 Topic copy(Topic src)
           
 Topic copy(Topic src, boolean deep)
          Creates a copy of src.
 TopicMap copy(TopicMap src)
          Returns a deep copy of src
 TopicMap copy(TopicMap src, boolean deep)
          Creates a copy of src.
 VariantName copy(VariantName src, Variant destVariant)
           
 VariantName copy(VariantName src, Variant destVariant, boolean deep)
          Creates a copy of src as a new child of destVariant A deep copy of src returns a VariantName in which the child resourceRef or resourceData is a duplicate of the value in the source object.
 Variant copy(Variant src, VariantContainer destContainer)
           
 Variant copy(Variant src, VariantContainer destContainer, boolean deep)
          Creates a copy of src A deep copy of src returns a Variant in which the child VariantName and Variant objects are deep copied.
 

Field Detail

DEFAULT_BASE_URL

public static final java.lang.String DEFAULT_BASE_URL
See Also:
Constant Field Values
Method Detail

copy

public TopicMap copy(TopicMap src)
              throws TopicMapProcessingException,
                     LocatorFactoryException
Returns a deep copy of src

Throws:
TopicMapProcessingException
LocatorFactoryException
See Also:
copy(TopicMap, boolean)

copy

public Topic copy(Topic src)
           throws TopicMapProcessingException,
                  LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public Association copy(Association src)
                 throws TopicMapProcessingException,
                        LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public Member copy(Member src,
                   Association destAssoc)
            throws TopicMapProcessingException,
                   LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public BaseName copy(BaseName src,
                     Topic destTopic)
              throws TopicMapProcessingException,
                     LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public Variant copy(Variant src,
                    VariantContainer destContainer)
             throws TopicMapProcessingException,
                    LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public VariantName copy(VariantName src,
                        Variant destVariant)
                 throws TopicMapProcessingException
Throws:
TopicMapProcessingException

copy

public Occurrence copy(Occurrence src,
                       Topic destTopic)
                throws TopicMapProcessingException,
                       LocatorFactoryException
Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public TopicMap copy(TopicMap src,
                     boolean deep)
              throws TopicMapProcessingException,
                     LocatorFactoryException
Creates a copy of src. A deep copy of src returns a copy in which all contained Topics and Associations are also deep copied. A shallow copy of src returns a TopicMap in which all contained Topics and Associations are shallow copied.

Throws:
TopicMapProcessingException
LocatorFactoryException
See Also:
copy(Topic, boolean), copy(Association, boolean)

copy

public Topic copy(Topic src,
                  boolean deep)
           throws TopicMapProcessingException,
                  LocatorFactoryException
Creates a copy of src. A deep copy of src returns a Topic in which the types and all the child Occurrences and BaseNames are also deep copied. A shallow copy of src returns a Topic which will merge with src. This is achieved by copying the subject of src, or one of its subject indicators or one of its BaseNames If src has none of these characteristics, a TopicMapProcessingException will be thrown.

Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public Association copy(Association src,
                        boolean deep)
                 throws TopicMapProcessingException,
                        LocatorFactoryException
Creates a copy of src A deep copy of src returns an Association in which the type and all child Members are deep copied. A shallow copy of src returns an Association in which the type and child Members are shallow copied.

Throws:
TopicMapProcessingException
LocatorFactoryException
See Also:
copy(Topic, boolean), copy(Member, Association, boolean)

copy

public Member copy(Member src,
                   Association destAssoc,
                   boolean deep)
            throws TopicMapProcessingException,
                   LocatorFactoryException
Creates a copy of src as a new child of destAssoc A deep copy of src returns a Member in which the roleSpec and players are all deep copied. A shallow copy of src returns a Member in which the roleSpec and the players are shallow copied.

Throws:
TopicMapProcessingException
LocatorFactoryException
See Also:
copy(Topic, boolean)

copy

public BaseName copy(BaseName src,
                     Topic destTopic,
                     boolean deep)
              throws TopicMapProcessingException,
                     LocatorFactoryException
Creates a copy of src as a new child of destTopic A deep copy of src returns a BaseName in which the name string is a duplicate of the name string of src and the child Variants are deep copied. A shallow copy of src returns a BaseName in which the name string is a reference to the name string of src and the child Variants are shallow copied.

Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public Variant copy(Variant src,
                    VariantContainer destContainer,
                    boolean deep)
             throws TopicMapProcessingException,
                    LocatorFactoryException
Creates a copy of src A deep copy of src returns a Variant in which the child VariantName and Variant objects are deep copied. A shallow copy of src returns a Variant in which the child VariantName and Variant objects are shallow copied.

Throws:
TopicMapProcessingException
LocatorFactoryException

copy

public VariantName copy(VariantName src,
                        Variant destVariant,
                        boolean deep)
                 throws TopicMapProcessingException
Creates a copy of src as a new child of destVariant A deep copy of src returns a VariantName in which the child resourceRef or resourceData is a duplicate of the value in the source object. A shallow copy of src returns a VariantName in which the child resourceRef or resourceData is a reference to the value in the source object.

Throws:
TopicMapProcessingException

copy

public Occurrence copy(Occurrence src,
                       Topic destTopic,
                       boolean deep)
                throws TopicMapProcessingException,
                       LocatorFactoryException
Creates a copy of src as a new child of destTopic A deep copy of src returns an Occurrence in which the type topic is deep copied and the child resourceRef or resourceData is a duplicate of the value in the source object. A shallow copy of src returns an Occurrence in which the type topic is shallow copied and the child resourceRef or resourceData is a reference to the value in the source object.

Throws:
TopicMapProcessingException
LocatorFactoryException
See Also:
copy(Topic, boolean)