|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcreek.representation.AbstractKnowledgeModel
An abstract implementation of the methods of the KnowledgeModel interface that is not dependent on the mode of storage.
Field Summary | |
protected java.util.ArrayList |
modelChangeListeners
|
Constructor Summary | |
protected |
AbstractKnowledgeModel()
|
|
AbstractKnowledgeModel(KnowledgeModel model)
Creates a new KnowledgeModel by importing the contents of the supplied model. |
Method Summary | |
void |
addModelChangeListener(ModelChangeListener listen)
Registrers a listener that will get notified if there are any changes to the model. |
Constraint[] |
getConstraints()
Returns an array of all constraints in the model. |
Entity[] |
getEntities()
Returns an array of all entities in the model. |
Partition[] |
getPartitions()
Returns an array of all partitions in this KnowledgeModel. |
Relation[] |
getRelations()
Returns an array of all relations in the model. |
RelationType |
getRelationType(java.lang.String name)
Find a relation class in the model of the given name. |
void |
importModel(KnowledgeModel model)
Removes any existing content from the KnowledgeModel and replaces it with the contents of the current model. |
EntityType[] |
matchEntityType(EntityType[] arr)
Returns an array of all entities in the model that match a given EntityType. |
void |
mergeModel(KnowledgeModel model)
This method merges the contents of a given model into the current model. |
void |
removeModelChangeListener(ModelChangeListener listen)
Removes a ModelChangeListener listening to changes to this model. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jcreek.representation.KnowledgeModel |
addContext, entitySize, fireModelChangeEvent, getAuthor, getConstraint, getConstraintIterator, getContexts, getContexts, getDescription, getEntity, getEntityIterator, getInferenceCache, getName, getPartition, getPartitionIterator, getRelation, getRelationIterator, getTitle, hasContext, hasEntity, hasPartition, makeConstraint, makeEntity, makePartition, makeRelation, registerEntity, registerPartition, relationSize, removeContext, setAuthor, setDescription, setName, setTitle, unregisterEntity, unregisterPartition |
Field Detail |
protected transient java.util.ArrayList modelChangeListeners
Constructor Detail |
public AbstractKnowledgeModel(KnowledgeModel model)
model
- The KnowledgeModel to import.protected AbstractKnowledgeModel()
Method Detail |
public void importModel(KnowledgeModel model)
importModel
in interface KnowledgeModel
model
- The KnowledgeModel that will have its contents copied into this model.public void mergeModel(KnowledgeModel model)
mergeModel
in interface KnowledgeModel
model
- The knowledgemodel to merge into this model.public EntityType[] matchEntityType(EntityType[] arr)
matchEntityType
in interface KnowledgeModel
arr
- An array of the type of EntityType to find.public RelationType getRelationType(java.lang.String name)
getRelationType
in interface KnowledgeModel
name
- The name of the relation class to be found
public Relation[] getRelations()
getRelations
in interface KnowledgeModel
public Entity[] getEntities()
getEntities
in interface KnowledgeModel
public Partition[] getPartitions()
getPartitions
in interface KnowledgeModel
public Constraint[] getConstraints()
getConstraints
in interface KnowledgeModel
public void addModelChangeListener(ModelChangeListener listen)
addModelChangeListener
in interface KnowledgeModel
listen
- The ModelChangeListener to add.public void removeModelChangeListener(ModelChangeListener listen)
removeModelChangeListener
in interface KnowledgeModel
listen
- The ModelChangeListener to remove.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |