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 LocatorIFbaselocprotected TopicMapBuilderIFbuilderprotected DeclarationContextIFdcprotected Set<TopicIF>dsCandidatesprotected Object[]entityObjectsprotected Collection<Object>[]extentsprotected static intMAX_DSCANDIDATESprotected Collection<Object>newObjectsprotected Collection<Object>oldObjectsprotected Map<Object,List<?>[]>oldValuesprotected QueryProcessorIFqpprotected Relationrelationprotected RelationMappingrmappingprotected TopicMapIFtopicmap
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcharacteristicsChanged(TopicIF topic)voidclose()LocatorIFgetBaseLocator()INTERNAL: Gets the base locator currently in use.protected TopicMapBuilderIFgetBuilder()INTERNAL: Gets the topic map builder currently in use.DeclarationContextIFgetDeclarationContext()protected ObjectgetEntityObjectById(String id)INTERNAL: Gets the entity object by idRelationMappinggetMapping()INTERNAL: Gets the relation mapping currently in use.QueryProcessorIFgetQueryProcessor()INTERNAL: Gets the topic map query processor currently in use.TopicMapIFgetTopicMap()INTERNAL: Gets the topic map currently in use.voidloadExtents()protected voidmergeTopics(TopicIF target, TopicIF source)INTERNAL: Merge two topics.protected booleanregisterNewObject(Object object)INTERNAL: Register an object as a new topic map object (created by db2tm).protected voidregisterOldFieldValues(Object object, List<?>[] values)INTERNAL: Register the existing field values of an old object.protected booleanregisterOldObject(Object object)INTERNAL: Register an object as an existing topic map object.voidremoveExtentObjects()protected voidremoveOldValues()protected ObjectreuseOldFieldValue(Object object, int fieldIndex)INTERNAL: Return the existing field values of an old object.voidsetBaseLocator(LocatorIF baseloc)INTERNAL: Sets the current base locator.protected voidsetEntityObject(int ix, Object object)INTERNAL: Sets the current entity object.voidsetMapping(RelationMapping rmapping)INTERNAL: Sets the current relation mapping.voidsetRelation(Relation relation)INTERNAL: Sets the current relation.voidsetTopicMap(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()
-
-