jcreek.representation
Class EntityType

java.lang.Object
  extended byjcreek.representation.Entity
      extended byjcreek.representation.EntityType
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable
Direct Known Subclasses:
Case, ClassEntity, NumberEntity, RelationType, StringEntity, URLEntity

public abstract class EntityType
extends Entity

Title: EntityType

Description: Represents an encapsulated entity that is a certain type of frame. This class does not really add anything to the representation, but provide an easy way to make Java classes that match different patterns in the representation and provide methods to support them. To create a new EntityType, create a subclass of this class. You can then use the matchEntityType(EntityType[] entityTypeArray) to return an array of all entities in the model that match the pattern represented by this type. Although the supplied constructor will create an EntityType instance from an existing entity, it is encouraged to create new constructors that actually creates new entities of the given type in the model. For exampels of this, see the Case and NumberEntity classes

Version:
1.0
Author:
Frode Sørmo

Constructor Summary
  EntityType(Entity entity)
          Creates a new EntityType encapsulating an existing entity.
protected EntityType(Entity entity, boolean ignore)
           
  EntityType(KnowledgeModel model, java.lang.String name, java.lang.String description)
          Creates a new instance by creating a new node in the semantic network of this particular type.
 
Method Summary
static boolean matches(Entity entity)
          Should return true if the given entity matches the pattern represented by this class of EntityType.
 
Methods inherited from class jcreek.representation.Entity
addConstraint, addRelation, addRelation, addRelation, addRelation, addRelation, addRelation, clone, compareTo, equals, getAllSubclasses, getAllSubclassesCollection, getAllSuperclasses, getAllSuperclassesCollection, getConstraints, getCreationTime, getCurrentPartition, getDescription, getEntityData, getEntityObject, getFrameString, getID, getImmediateSubclasses, getImmediateSubclassesCollection, getImmediateSuperclasses, getImmediateSuperclassesCollection, getInheritedConstraints, getKnowledgeModel, getLocalConstraints, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelation, getLocalRelations, getLocalRelations, getLocalRelations, getLocalRelations, getLocalRelations, getName, getRelation, getRelation, getRelation, getRelation, getRelationNames, getRelations, getRelations, getRelations, getRelations, getRelations, getRelations, getRelations, getRelationTypes, getValueString, hasEntityObject, hashCode, isAssignableFrom, remove, removeConstraint, removeEntityData, setDescription, setEntityObject, setName, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityType

public EntityType(Entity entity)
           throws EntityTypeNotMatchedException
Creates a new EntityType encapsulating an existing entity. Using this constructor implies that the given entity should have a structure that matches the type of frame reprsented by the subclass of this EntityType.

Parameters:
entity - The entity to match to attempt to match this EntityType.

EntityType

public EntityType(KnowledgeModel model,
                  java.lang.String name,
                  java.lang.String description)
           throws NameAlreadyExistException
Creates a new instance by creating a new node in the semantic network of this particular type.


EntityType

protected EntityType(Entity entity,
                     boolean ignore)
Method Detail

matches

public static boolean matches(Entity entity)
Should return true if the given entity matches the pattern represented by this class of EntityType.



Created at IDI, NTNU by the Artificial Intelligence and Learning group