kaos.policy.util
Class KAoSConditionBuilder

java.lang.Object
  extended by kaos.policy.util.KAoSConditionBuilder

public class KAoSConditionBuilder
extends java.lang.Object

Class building an Ontology (DAML or OWL) Condition representation within com.hp.hpl.jena.ontology.OntModel


Constructor Summary
KAoSConditionBuilder()
           
KAoSConditionBuilder(PolicyMsg msg)
          Constructor.
 
Method Summary
 OntologyConditionContainer getCondition()
          Return the built condition as OntModels in a container.
 java.lang.String getConditionAsText()
          Return the built condition as text.
 java.lang.String getConditionClassName()
          Get the name of the current Condition class.
 java.lang.String getConditionDesc()
          Get the value of the Condition description for the current Condition.
 SerializableOntModelImpl getConditionModel()
          Return the model of the condition.
 KAoSRoleValueMapContainer getConditionRVMContainer()
           
 ActionHistoryBuilder getPertinentHistoryClass()
          Get the pertinent history class of this condition.
 KAoSRoleValueMapContainer getPertinentHistoryRVMContainer()
           
 KAoSClassBuilderImpl getPertinentStateClass()
          Get the pertinent state class of this condition.
 KAoSRoleValueMapContainer getPertinentStateRVMContainer()
           
 void readFromOntologyConditionContainer(OntologyConditionContainer occ)
           
 void resetConditionBuilding()
          Starts building the new condition, delete any existing state of the previously built condition.
 void setConditionClassName(java.lang.String className)
          Set the class name of the defined condition.
 void setConditionDesc(java.lang.String desc)
          Set the description of the defined Condition.
 void setPertinentHistoryClass(ActionHistoryBuilder history)
          Set the pertinent history class If the it is already set, it will be replaced by the given one.
 void setPertinentHistoryRVMContainer(KAoSRoleValueMapContainer container)
           
 void setPertinentStateClass(KAoSClassBuilderImpl state)
          Set the pertinent state class for this condition.
 void setPertinentStateRVMContainer(KAoSRoleValueMapContainer container)
           
 void showCondition()
          A utility method to print the condition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KAoSConditionBuilder

public KAoSConditionBuilder()

KAoSConditionBuilder

public KAoSConditionBuilder(PolicyMsg msg)
Constructor. Constructs this object from a PolicyMsg that contains models for policy data and its actions

Method Detail

resetConditionBuilding

public void resetConditionBuilding()
Starts building the new condition, delete any existing state of the previously built condition.


getCondition

public OntologyConditionContainer getCondition()
                                        throws ConditionBuildingNotCompleted
Return the built condition as OntModels in a container.

Returns:
SerializableOntModelImpl containg the Ontology condition
Throws:
ConditionBuildingNotCompleted - if the current condition is not fully specified

getConditionAsText

public java.lang.String getConditionAsText()
Return the built condition as text.

Returns:
string containg the condition
Throws:
ConditionBuildingNotCompleted - if the current policy is not fully specified

getConditionModel

public SerializableOntModelImpl getConditionModel()
Return the model of the condition.

Returns:
Throws:
ConditionBuildingNotCompleted - if the current policy is not fully specified

setConditionClassName

public void setConditionClassName(java.lang.String className)
Set the class name of the defined condition. Currently there is no method to change the class name; in this case a new condition should be build or the current condition reset.

Parameters:
className - the name of the condition class

getConditionRVMContainer

public KAoSRoleValueMapContainer getConditionRVMContainer()
Returns:
the container with role-value-map constraints for Condition Class

getConditionClassName

public java.lang.String getConditionClassName()
                                       throws ValueNotSet
Get the name of the current Condition class.

Returns:
the name of the Condition
Throws:
ValueNotSet - if the name is not known

setConditionDesc

public void setConditionDesc(java.lang.String desc)
Set the description of the defined Condition. If the desc is already set, it will be replaced by the given desc.

Parameters:
desc - description of the Condition

getConditionDesc

public java.lang.String getConditionDesc()
                                  throws ValueNotSet
Get the value of the Condition description for the current Condition.

Returns:
the description of the Condition
Throws:
ValueNotSet - if desc is not known

setPertinentHistoryClass

public void setPertinentHistoryClass(ActionHistoryBuilder history)
Set the pertinent history class If the it is already set, it will be replaced by the given one.

Parameters:
history - the class describing pertinent history

getPertinentHistoryClass

public ActionHistoryBuilder getPertinentHistoryClass()
Get the pertinent history class of this condition.

Returns:
the pertinent history class

setPertinentHistoryRVMContainer

public void setPertinentHistoryRVMContainer(KAoSRoleValueMapContainer container)

getPertinentHistoryRVMContainer

public KAoSRoleValueMapContainer getPertinentHistoryRVMContainer()
Returns:
the container with role-value-map constraints for Pertinent History

setPertinentStateClass

public void setPertinentStateClass(KAoSClassBuilderImpl state)
Set the pertinent state class for this condition. If the class is already set, it will be replaced by the given one.

Parameters:
state - the class describing pertinent state.

getPertinentStateClass

public KAoSClassBuilderImpl getPertinentStateClass()
Get the pertinent state class of this condition.

Returns:
the pertinent state class

getPertinentStateRVMContainer

public KAoSRoleValueMapContainer getPertinentStateRVMContainer()
Returns:
the container with role-value-map constraints for state

setPertinentStateRVMContainer

public void setPertinentStateRVMContainer(KAoSRoleValueMapContainer container)

showCondition

public void showCondition()
A utility method to print the condition.


readFromOntologyConditionContainer

public void readFromOntologyConditionContainer(OntologyConditionContainer occ)