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, Term, java.io.Serializable
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 expressions 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 class:
AbsObjectImpl
- 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.
- See Also:
AbsObject.getAbsObject(String)
getNames
public java.lang.String[] getNames()
- Specified by:
getNames in interface AbsObject- Overrides:
getNames in class AbsObjectImpl
- Returns:
- the name of all attributes.
- See Also:
AbsObject.getNames()
isGrounded
public boolean isGrounded()
- Description copied from class:
AbsObjectImpl
- 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.- See Also:
AbsObject.isGrounded()
getCount
public int getCount()
- Description copied from class:
AbsObjectImpl
- Gets the number of attributes.
- Specified by:
getCount in interface AbsObject- Overrides:
getCount in class AbsObjectImpl
- Returns:
- the number of attributes.
- See Also:
AbsObject.getCount()
apply
public java.lang.Object apply()
throws OntologyException
- Throws:
OntologyException
apply
public java.lang.Object apply(Concept c)
throws OntologyException
- Throws:
OntologyException
fill
public void fill(java.lang.Object val)
throws OntologyException
- Throws:
OntologyException
fill
public void fill(Concept c,
java.lang.Object val)
throws OntologyException
- Throws:
OntologyException
These are the official JADE API. For these API backward compatibility is guaranteed accross JADE versions