nz.ac.waikato.mcennis.rat.graph.actor
Interface Actor

All Superinterfaces:
java.lang.Comparable, ParsedObject, java.io.Serializable
All Known Implementing Classes:
BasicUser, DBActor

public interface Actor
extends java.io.Serializable, ParsedObject, java.lang.Comparable

Actors are any entity (such as nouns). Also known as nodes. They have properties and participate in links (relations, arcs, edges).


Method Summary
 void add(Page page)
          Add a Page object to this class.
 void add(Property prop)
          Add the given property to this user.
 Actor duplicate()
          Return a copy of this Actor that is equal by compareTo()
 boolean equals(java.lang.Object o)
           
 java.lang.String getID()
          Return the id (unique within its type)
 Page[] getPage()
          Returns the set of all page objects associated with this actor or null if no page objects havee been created
 Page getPage(java.lang.String ID)
          Return the page with the given ID (usually a URI String) or null iuf it doesn't exist
 Property[] getProperty()
          Return an array of all properties associated with this actor.
 Property getProperty(java.lang.String ID)
          Return the property with the given value.
 java.lang.String getType()
          Returns the type (mode) of this actor
 void removeProperty(java.lang.String ID)
          Remove a given property from this actor
 void setID(java.lang.String id)
          Sets an id unique (which must be its type).
 void setType(java.lang.String type)
          Set the type (mode) of this actor.
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getID

java.lang.String getID()
Return the id (unique within its type)

Returns:
ID of this actor

setID

void setID(java.lang.String id)
Sets an id unique (which must be its type).

Parameters:
id - ID this actor should be set to

getProperty

Property[] getProperty()
Return an array of all properties associated with this actor. Returns null if no properties are attached.

Returns:
array of properties

getProperty

Property getProperty(java.lang.String ID)
Return the property with the given value. Returns null if no properties are attached.

Parameters:
ID - key-name for the property.
Returns:
Property object having this key or null

removeProperty

void removeProperty(java.lang.String ID)
Remove a given property from this actor

Parameters:
ID - key-name of property to remove.

add

void add(Property prop)
Add the given property to this user. If a property with this name already exists, it is replaced by this property.

Parameters:
prop - property to be added

getPage

Page[] getPage()
Returns the set of all page objects associated with this actor or null if no page objects havee been created

Returns:
array of Page objects

getPage

Page getPage(java.lang.String ID)
Return the page with the given ID (usually a URI String) or null iuf it doesn't exist

Parameters:
ID - id of the page to be returned
Returns:
page with the given id

add

void add(Page page)
Add a Page object to this class. If another Page with the same ID exists, it is overwritten by this class.

Parameters:
page - Page to be added.

setType

void setType(java.lang.String type)
Set the type (mode) of this actor. User ID's must be unique within a type.

Parameters:
type - new type (mode) of this actor

getType

java.lang.String getType()
Returns the type (mode) of this actor

Returns:
type (mode) of this actor

duplicate

Actor duplicate()
Return a copy of this Actor that is equal by compareTo()

Returns:
new duplicate Actor

equals

boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object