jcreek.representation.cbr
Class URLEntity

java.lang.Object
  extended byjcreek.representation.Entity
      extended byjcreek.representation.EntityType
          extended byjcreek.representation.cbr.URLEntity
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class URLEntity
extends EntityType

A particular type of entity that encapsulates an instance of URL.

Version:
1.0
Author:
Elise Bakke

Constructor Summary
URLEntity(Entity ent)
          Creates a URLEntity from an existing Entity.
URLEntity(KnowledgeModel model, java.net.URL url, Entity type)
          Creates a new URLEntity that is a value of a supplied entity.
URLEntity(KnowledgeModel model, java.net.URL url, java.lang.String description)
          Creates a new URLEntity.
 
Method Summary
 java.net.URL asURL()
          Returns the encapsulated url.
static boolean matches(Entity ent)
          An Entity is of type URLEntity if and only if it encapsulates an object that is an instance of java.net.URL.
 void setURL(java.net.URL url)
          Changes the encapsulated url of this entity.
 
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

URLEntity

public URLEntity(KnowledgeModel model,
                 java.net.URL url,
                 java.lang.String description)
Creates a new URLEntity.

Parameters:
model - The KnowledgeModel to create the new entity in.
url - The url to encapsulate in this entity.
description - The description of the entity.

URLEntity

public URLEntity(KnowledgeModel model,
                 java.net.URL url,
                 Entity type)
Creates a new URLEntity that is a value of a supplied entity.

Parameters:
model - The KnowledgeModel to create a new entity in
url - The url to encapsulate in this entity.

URLEntity

public URLEntity(Entity ent)
          throws EntityTypeNotMatchedException
Creates a URLEntity from an existing Entity.

Parameters:
ent - The Entity to make the URLEntity from.
Method Detail

setURL

public void setURL(java.net.URL url)
Changes the encapsulated url of this entity.

Parameters:
url - The new URL.

asURL

public java.net.URL asURL()
Returns the encapsulated url.


matches

public static boolean matches(Entity ent)
An Entity is of type URLEntity if and only if it encapsulates an object that is an instance of java.net.URL.



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