Package net.ontopia.topicmaps.db2tm
Class Context
- java.lang.Object
-
- net.ontopia.topicmaps.db2tm.Context
-
public class Context extends Object
INTERNAL: Object used to hold contextual information while processing tuples. Note that mapping, relation, topicMap and baseLocator are all required properties.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocatorIF
baseloc
protected TopicMapBuilderIF
builder
protected DeclarationContextIF
dc
protected Set<TopicIF>
dsCandidates
protected Object[]
entityObjects
protected Collection<Object>[]
extents
protected static int
MAX_DSCANDIDATES
protected Collection<Object>
newObjects
protected Collection<Object>
oldObjects
protected Map<Object,List<?>[]>
oldValues
protected QueryProcessorIF
qp
protected Relation
relation
protected RelationMapping
rmapping
protected TopicMapIF
topicmap
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
characteristicsChanged(TopicIF topic)
void
close()
LocatorIF
getBaseLocator()
INTERNAL: Gets the base locator currently in use.protected TopicMapBuilderIF
getBuilder()
INTERNAL: Gets the topic map builder currently in use.DeclarationContextIF
getDeclarationContext()
protected Object
getEntityObjectById(String id)
INTERNAL: Gets the entity object by idRelationMapping
getMapping()
INTERNAL: Gets the relation mapping currently in use.QueryProcessorIF
getQueryProcessor()
INTERNAL: Gets the topic map query processor currently in use.TopicMapIF
getTopicMap()
INTERNAL: Gets the topic map currently in use.void
loadExtents()
protected void
mergeTopics(TopicIF target, TopicIF source)
INTERNAL: Merge two topics.protected boolean
registerNewObject(Object object)
INTERNAL: Register an object as a new topic map object (created by db2tm).protected void
registerOldFieldValues(Object object, List<?>[] values)
INTERNAL: Register the existing field values of an old object.protected boolean
registerOldObject(Object object)
INTERNAL: Register an object as an existing topic map object.void
removeExtentObjects()
protected void
removeOldValues()
protected Object
reuseOldFieldValue(Object object, int fieldIndex)
INTERNAL: Return the existing field values of an old object.void
setBaseLocator(LocatorIF baseloc)
INTERNAL: Sets the current base locator.protected void
setEntityObject(int ix, Object object)
INTERNAL: Sets the current entity object.void
setMapping(RelationMapping rmapping)
INTERNAL: Sets the current relation mapping.void
setRelation(Relation relation)
INTERNAL: Sets the current relation.void
setTopicMap(TopicMapIF topicmap)
INTERNAL: Sets the current topic map.
-
-
-
Field Detail
-
rmapping
protected RelationMapping rmapping
-
relation
protected Relation relation
-
topicmap
protected TopicMapIF topicmap
-
baseloc
protected LocatorIF baseloc
-
builder
protected TopicMapBuilderIF builder
-
qp
protected QueryProcessorIF qp
-
dc
protected DeclarationContextIF dc
-
entityObjects
protected Object[] entityObjects
-
extents
protected Collection<Object>[] extents
-
newObjects
protected Collection<Object> newObjects
-
oldObjects
protected Collection<Object> oldObjects
-
MAX_DSCANDIDATES
protected static final int MAX_DSCANDIDATES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getMapping
public RelationMapping getMapping()
INTERNAL: Gets the relation mapping currently in use.
-
setMapping
public void setMapping(RelationMapping rmapping)
INTERNAL: Sets the current relation mapping.
-
setRelation
public void setRelation(Relation relation)
INTERNAL: Sets the current relation.
-
getTopicMap
public TopicMapIF getTopicMap()
INTERNAL: Gets the topic map currently in use.
-
setTopicMap
public void setTopicMap(TopicMapIF topicmap)
INTERNAL: Sets the current topic map.
-
getQueryProcessor
public QueryProcessorIF getQueryProcessor()
INTERNAL: Gets the topic map query processor currently in use.
-
getDeclarationContext
public DeclarationContextIF getDeclarationContext()
-
getBaseLocator
public LocatorIF getBaseLocator()
INTERNAL: Gets the base locator currently in use.
-
setBaseLocator
public void setBaseLocator(LocatorIF baseloc)
INTERNAL: Sets the current base locator.
-
getBuilder
protected TopicMapBuilderIF getBuilder()
INTERNAL: Gets the topic map builder currently in use. This builder is retrieved from the current topic map, so this is primarily a convenience method.
-
setEntityObject
protected void setEntityObject(int ix, Object object)
INTERNAL: Sets the current entity object.
-
getEntityObjectById
protected Object getEntityObjectById(String id)
INTERNAL: Gets the entity object by id
-
mergeTopics
protected void mergeTopics(TopicIF target, TopicIF source)
INTERNAL: Merge two topics. This method will replace all references to the old topic with references to the new one.
-
registerOldObject
protected boolean registerOldObject(Object object)
INTERNAL: Register an object as an existing topic map object. The method will return true if this is the first time we've seen it.
-
registerNewObject
protected boolean registerNewObject(Object object)
INTERNAL: Register an object as a new topic map object (created by db2tm). The method will return true if this is the first time we've seen it.
-
registerOldFieldValues
protected void registerOldFieldValues(Object object, List<?>[] values)
INTERNAL: Register the existing field values of an old object.
-
reuseOldFieldValue
protected Object reuseOldFieldValue(Object object, int fieldIndex)
INTERNAL: Return the existing field values of an old object.
-
removeOldValues
protected void removeOldValues()
-
loadExtents
public void loadExtents()
-
removeExtentObjects
public void removeExtentObjects()
-
characteristicsChanged
protected void characteristicsChanged(TopicIF topic)
-
close
public void close()
-
-