Package 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,Serializable,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 conceptPersonwith a slotnameand a slotage, 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 theuseConceptSlotsAsFunctionsmethod of theOntologyclass.- 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_REFERENCE, ABS_VARIABLE, UNKNOWN
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectapply()Objectapply(Concept c)voidfill(Concept c, Object val)voidfill(Object val)AbsObjectgetAbsObject(String name)Gets the value of an attribute of the object held by this abstract descriptor.ConceptgetConcept()intgetCount()Gets the number of attributes.String[]getNames()StringgetSlotName()booleanisGrounded()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, getAbsObject, getTypeName, getValues, 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 String getSlotName()
-
getConcept
public Concept getConcept()
-
getAbsObject
public AbsObject getAbsObject(String name)
Description copied from class:AbsObjectImplGets the value of an attribute of the object held by this abstract descriptor.- Specified by:
getAbsObjectin interfaceAbsObject- Overrides:
getAbsObjectin classAbsObjectImpl- Parameters:
name- The name of the attribute.- Returns:
- value The value of the attribute.
- See Also:
AbsObject.getAbsObject(String)
-
getNames
public String[] getNames()
- Specified by:
getNamesin interfaceAbsObject- Overrides:
getNamesin classAbsObjectImpl- Returns:
- the name of all attributes.
- See Also:
AbsObject.getNames()
-
isGrounded
public boolean isGrounded()
Description copied from class:AbsObjectImplTests if the object is grounded, i.e., if no one of its attributes is associated with a variable- Specified by:
isGroundedin interfaceAbsObject- Overrides:
isGroundedin classAbsObjectImpl- Returns:
trueif the object is grounded.- See Also:
AbsObject.isGrounded()
-
getCount
public int getCount()
Description copied from class:AbsObjectImplGets the number of attributes.- Specified by:
getCountin interfaceAbsObject- Overrides:
getCountin classAbsObjectImpl- Returns:
- the number of attributes.
- See Also:
AbsObject.getCount()
-
apply
public Object apply() throws OntologyException
- Throws:
OntologyException
-
apply
public Object apply(Concept c) throws OntologyException
- Throws:
OntologyException
-
fill
public void fill(Object val) throws OntologyException
- Throws:
OntologyException
-
fill
public void fill(Concept c, Object val) throws OntologyException
- Throws:
OntologyException
-
-