jade.content.onto
Class ConceptSlotFunction
java.lang.Object
|
+--jade.content.abs.AbsObjectImpl
|
+--jade.content.abs.AbsPrimitiveSlotsHolder
|
+--jade.content.abs.AbsConcept
|
+--jade.content.abs.AbsConceptSlotFunction
|
+--jade.content.onto.ConceptSlotFunction
- All Implemented Interfaces:
- AbsObject, AbsTerm, Concept, Serializable, java.io.Serializable, Term
- public class ConceptSlotFunction
- extends AbsConceptSlotFunction
The ConceptSlotFunction class allows treating the slots of an ontological concept as functions.
For instance, if an ontology defines a concept Person with a slot name and a slot age,
it is possible to create expression such as
(= (age (Person :name John)) 41)
(> (age (Person :name John)) (age (Person :name Bill)))
(iota ?x (= (age (Person :name John)) ?x))
In order to exploit this feature it is necessary to instruct an ontology to use concept slots as functions by means of the
useConceptSlotsAsFunctions method of the Ontology class.
- Since:
- JADE 3.7
- See Also:
- Serialized Form
| Methods inherited from class jade.content.abs.AbsPrimitiveSlotsHolder |
getBoolean, getByteSequence, getDate, getDouble, getFloat, getInteger, getLong, getString, set, set, set, set, set, set, set, set, set |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
getSlotName
public java.lang.String getSlotName()
getConcept
public Concept getConcept()
getAbsObject
public AbsObject getAbsObject(java.lang.String name)
- Description copied from interface:
AbsObject
- Gets the value of an attribute of the object held by this
abstract descriptor.
- Specified by:
getAbsObject in interface AbsObject- Overrides:
getAbsObject in class AbsObjectImpl
- Parameters:
name - The name of the attribute.
- Returns:
- value The value of the attribute.
getNames
public java.lang.String[] getNames()
- Specified by:
getNames in interface AbsObject- Overrides:
getNames in class AbsObjectImpl
- Returns:
- the name of all attributes.
isGrounded
public boolean isGrounded()
- Description copied from interface:
AbsObject
- Tests if the object is grounded, i.e., if no one of its attributes
is associated with a variable
- Specified by:
isGrounded in interface AbsObject- Overrides:
isGrounded in class AbsObjectImpl
- Returns:
true if the object is grounded.
getCount
public int getCount()
- Description copied from interface:
AbsObject
- Gets the number of attributes.
- Specified by:
getCount in interface AbsObject- Overrides:
getCount in class AbsObjectImpl
- Returns:
- the number of attributes.
apply
public java.lang.Object apply()
throws OntologyException
OntologyException
apply
public java.lang.Object apply(Concept c)
throws OntologyException
OntologyException
fill
public void fill(java.lang.Object val)
throws OntologyException
OntologyException
fill
public void fill(Concept c,
java.lang.Object val)
throws OntologyException
OntologyException
JADE