Package jade.content.abs
Class AbsReference
- java.lang.Object
-
- jade.content.abs.AbsObjectImpl
-
- jade.content.abs.AbsReference
-
- All Implemented Interfaces:
AbsObject,AbsTerm,Term,Serializable,Serializable
public class AbsReference extends AbsObjectImpl implements AbsTerm
A term representing a reference to an object or an attribute of an object typically expressed as &OBJECT_TYPE#name where name may be either an ObjectID or have the form ObjectID.attribute- Author:
- Caire
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringREFERENCE_ATTRIBUTE_SEPARATORstatic StringREFERENCE_NAME_SEPARATORstatic StringREFERENCE_PREFIX-
Fields inherited from interface jade.content.abs.AbsObject
ABS_AGENT_ACTION, ABS_AGGREGATE, ABS_CONCEPT, ABS_CONCEPT_SLOT_FUNCTION, ABS_CONTENT_ELEMENT_LIST, ABS_IRE, ABS_PREDICATE, ABS_PRIMITIVE, ABS_REFERENCE, ABS_VARIABLE, UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description AbsReference()Construct an Abstract descriptor to hold a referenceAbsReference(String name, String valueType)Construct an AbsReference with the given name and value type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringasString(String type, String name)static StringasString(String type, String id, String attribute)intgetAbsType()StringgetAttribute()StringgetInstanceId()static ClassgetJavaClass()StringgetName()Gets the name of this reference.StringgetType()Gets the type of the referenced object.booleanisAttribute()booleanisGrounded()Redefine theisGrounded()method in order to always returnfalse.booleanisInstance()static AbsReferenceparse(String referenceStr)Create an AbsReference from its String representation.voidsetName(String name)Sets the name of this reference.voidsetType(String type)Sets the type of the referenced object-
Methods inherited from class jade.content.abs.AbsObjectImpl
equals, getAbsObject, getAbsObject, getCount, getNames, getTypeName, getValues, hashCode, set, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jade.content.abs.AbsObject
getAbsObject, getCount, getNames, getTypeName
-
-
-
-
Field Detail
-
REFERENCE_PREFIX
public static final String REFERENCE_PREFIX
- See Also:
- Constant Field Values
-
REFERENCE_NAME_SEPARATOR
public static final String REFERENCE_NAME_SEPARATOR
- See Also:
- Constant Field Values
-
REFERENCE_ATTRIBUTE_SEPARATOR
public static final String REFERENCE_ATTRIBUTE_SEPARATOR
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static AbsReference parse(String referenceStr)
Create an AbsReference from its String representation. The latter can have the form &OBJECT_TYPE#name or OBJECT_TYPE#name.
-
setName
public void setName(String name)
Sets the name of this reference.- Parameters:
name- The new name of this reference.
-
setType
public void setType(String type)
Sets the type of the referenced object- Parameters:
type- The type of the referenced object
-
getName
public String getName()
Gets the name of this reference.- Returns:
- The name of this reference.
-
getType
public String getType()
Gets the type of the referenced object.- Returns:
- The type of the referenced object.
-
isGrounded
public boolean isGrounded()
Redefine theisGrounded()method in order to always returnfalse.- Specified by:
isGroundedin interfaceAbsObject- Overrides:
isGroundedin classAbsObjectImpl- Returns:
trueif the object is grounded.- See Also:
AbsObject.isGrounded()
-
getJavaClass
public static Class getJavaClass()
-
getAbsType
public int getAbsType()
- Specified by:
getAbsTypein interfaceAbsObject- Overrides:
getAbsTypein classAbsObjectImpl
-
getAttribute
public String getAttribute()
-
getInstanceId
public String getInstanceId()
-
isInstance
public boolean isInstance()
-
isAttribute
public boolean isAttribute()
-
-