moise.common
Class MoiseElement
java.lang.Object
moise.common.MoiseElement
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable, Identifiable
- Direct Known Subclasses:
- FS, Goal, GoalInstance, Group, GroupInstance, Mission, Norm, NS, OEAgent, OS, Plan, PlanInstance, Role, RoleRel, Scheme, SchemeInstance, SS
public class MoiseElement
- extends java.lang.Object
- implements java.io.Serializable, Identifiable, java.lang.Comparable
Represents a basic Moise+ element which has an Id (a "player" Role, for example).
Some elements may have an id composed by prefix.id
- See Also:
- Serialized Form
Field Summary |
static boolean |
debug
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
debug
public static boolean debug
MoiseElement
public MoiseElement()
MoiseElement
public MoiseElement(java.lang.String id)
getId
public java.lang.String getId()
- Specified by:
getId
in interface Identifiable
setId
public void setId(java.lang.String s)
setOwner
public void setOwner(OEAgent ag)
getOwner
public OEAgent getOwner()
getCreationDate
public java.util.Date getCreationDate()
setPrefix
public void setPrefix(java.lang.String p)
getPrefix
public java.lang.String getPrefix()
- Specified by:
getPrefix
in interface Identifiable
getFullId
public java.lang.String getFullId()
- returns a full id : prefix + "." + id if there is a prefix,
only otherwise.
- Specified by:
getFullId
in interface Identifiable
setProperty
public void setProperty(java.lang.String id,
java.lang.Object value)
getProperty
public java.lang.Object getProperty(java.lang.String id)
getStrProperty
public java.lang.String getStrProperty(java.lang.String id,
java.lang.String defaultReturn)
getBoolProperty
public boolean getBoolProperty(java.lang.String id)
getBoolProperty
public boolean getBoolProperty(java.lang.String id,
boolean defaultReturn)
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
compareTo
public int compareTo(java.lang.Object obj)
- Specified by:
compareTo
in interface java.lang.Comparable
getPrefix
public static java.lang.String getPrefix(java.lang.String s)
- get the prefix part of a string with the format prefix.id,
returns null if there is no prefix
getId
public static java.lang.String getId(java.lang.String s)
- get the id part of a string with the format prefix.id, return "id" if there is no prefix
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
getPropertiesAsDOM
public org.w3c.dom.Element getPropertiesAsDOM(org.w3c.dom.Document document)
getPropertiesAsProlog
public java.lang.String getPropertiesAsProlog()
setPropertiesFromDOM
public void setPropertiesFromDOM(org.w3c.dom.Element parent)