jade.content.onto
Class ConceptSlotFunction

java.lang.Object
  extended by jade.content.abs.AbsObjectImpl
      extended by jade.content.abs.AbsPrimitiveSlotsHolder
          extended by jade.content.abs.AbsConcept
              extended by jade.content.abs.AbsConceptSlotFunction
                  extended by 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

Field Summary
 
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_VARIABLE, UNKNOWN
 
Method Summary
 java.lang.Object apply()
           
 java.lang.Object apply(Concept c)
           
 void fill(Concept c, java.lang.Object val)
           
 void fill(java.lang.Object val)
           
 AbsObject getAbsObject(java.lang.String name)
          Gets the value of an attribute of the object held by this abstract descriptor.
 Concept getConcept()
           
 int getCount()
          Gets the number of attributes.
 java.lang.String[] getNames()
           
 java.lang.String getSlotName()
           
 boolean isGrounded()
          Tests if the object is grounded, i.e., if no one of its attributes is associated with a variable
 
Methods inherited from class jade.content.abs.AbsConceptSlotFunction
getAbsType
 
Methods inherited from class jade.content.abs.AbsConcept
getAbsTerm, getJavaClass, set
 
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 jade.content.abs.AbsObjectImpl
equals, getTypeName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jade.content.abs.AbsObject
getTypeName
 

Method Detail

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