org.tm4j.topicmap.utils
Class TopicMapCopier
java.lang.Object
org.tm4j.topicmap.utils.TopicMapCopier
- Direct Known Subclasses:
- TopicMapFragment
- public class TopicMapCopier
- extends java.lang.Object
Encapsulates an algorithm for copying topics and associations between topic
maps while ensuring that copied references do not result in multiple topic copies.
For complex copying operations, the operations in this class should be preferred
to the TopicMapFactory copy() methods.
- Author:
- Kal Ahmed (kal@techquila.com)
Method Summary |
Association |
copy(Association src,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
protected BaseName |
copy(BaseName src,
Topic destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
protected Locator |
copy(Locator src)
|
protected Member |
copy(Member src,
Association destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
protected Occurrence |
copy(Occurrence src,
Topic destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
Topic |
copy(Topic src,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
protected Variant |
copy(Variant src,
VariantContainer destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
protected java.lang.String |
copyID(TopicMapObject src,
java.lang.String prefix,
java.lang.String suffix)
|
protected void |
copyScopedObject(ScopedObject src,
ScopedObject dest,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TopicMapCopier
public TopicMapCopier(TopicMap destTM)
copy
public Topic copy(Topic src,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copy
public Association copy(Association src,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copy
protected BaseName copy(BaseName src,
Topic destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copy
protected Variant copy(Variant src,
VariantContainer destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copy
protected Occurrence copy(Occurrence src,
Topic destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copy
protected Member copy(Member src,
Association destParent,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
LocatorFactoryException
copyScopedObject
protected void copyScopedObject(ScopedObject src,
ScopedObject dest,
boolean deep,
java.lang.String idPrefix,
java.lang.String idSuffix,
java.util.HashMap copied)
throws TopicMapProcessingException,
java.beans.PropertyVetoException,
LocatorFactoryException
- Throws:
TopicMapProcessingException
java.beans.PropertyVetoException
LocatorFactoryException
copyID
protected java.lang.String copyID(TopicMapObject src,
java.lang.String prefix,
java.lang.String suffix)
copy
protected Locator copy(Locator src)
throws LocatorFactoryException
- Throws:
LocatorFactoryException