kaos.policy.information
Class BasicActionDescription

java.lang.Object
  extended by kaos.policy.information.KAoSInstance
      extended by kaos.policy.information.BasicActionDescription
All Implemented Interfaces:
java.io.Serializable, KAoSInstanceDescription
Direct Known Subclasses:
ActionInstanceDescription

public class BasicActionDescription
extends KAoSInstance
implements java.io.Serializable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class kaos.policy.information.KAoSInstance
KAoSInstance.PropertyNameWithPath
 
Field Summary
 
Fields inherited from class kaos.policy.information.KAoSInstance
_instanceNameURI, _instanceOfClassURI, _originalOWL, _properties, _propertyClasses
 
Constructor Summary
BasicActionDescription()
           
BasicActionDescription(KAoSInstance ki)
           
 
Method Summary
 void addActorInstance(java.lang.Object aname)
           
 void addMultipleTargetInstances(java.lang.String tRoleName, java.util.Collection insts)
           
 void addProperty(KAoSProperty add)
          This method overrides its superclass method so that it can add the property name to its targetRoleNames vector.
 void addTargetInstance(java.lang.String tRoleName, java.lang.Object tname)
          This function adds an instance in the property for the given target role name.
 void addTargetInstanceDescription(java.lang.String tRoleName, java.lang.String instID, KAoSInstance desc)
           
static BasicActionDescription filterBAD(BasicActionDescription bad, BasicActionDescription policy)
          This method filters a given BAD object such that it is allowed by the given A- policy object.
 java.util.List getActionSubclassesOfInterest()
          This method returns all the subclasses of this action, along with the action class name.
 java.util.Set getActionTypes()
           
 java.lang.String getActorRangeClassName()
           
 java.util.Set getAllActorInstances()
           
 java.lang.String getBaseActionClassName()
           
 java.util.List getClassRangesOfInterest()
          This method returns all the classranges of properties in this action.
 KAoSInstance getInstanceDescriptionFor(java.lang.String tRoleName, java.lang.String instID)
           
 java.util.Set getInstancesForTarget(java.lang.String tRoleName)
           
 java.util.List getPropretiesOfInterest()
          This method returns all the properties and their subproperties contained in this action.
 java.lang.String getTargetClassName(java.lang.String tRoleName)
           
 java.util.Vector getTargetRoleNames()
           
 boolean isActorComplement()
           
 boolean isActorInstancePresent(java.lang.Object aname)
           
 boolean isTargetComplement(java.lang.String tRoleName)
           
 boolean isTargetInstancePresent(java.lang.String tRoleName, java.lang.Object tname)
           
 boolean isTargetPresent(java.lang.String tRoleName)
           
 void removeActorInstance(java.lang.Object aname)
           
 void removeAllActorInstances()
           
 void removeAllTargetInstances(java.lang.String tRoleName)
           
 void removeTargetInstance(java.lang.String tRoleName, java.lang.Object tname)
           
 void removeTargetInstanceDescription(java.lang.String tRoleName, java.lang.String instID)
           
 KAoSInstance returnCopy()
          Return a clone of this instance.
 void setActionProperty(KAoSProperty prop)
           
 void setActionTypes(java.util.Vector actions)
           
 void setActorComplement(boolean b)
           
 void setActorProperty(KAoSProperty prop)
           
 void setActorRangeClassName(java.lang.String name)
           
 void setBaseActionClassName(java.lang.String name)
           
 void setMultipleTargetInstances(java.lang.String tRoleName, java.util.Collection insts)
           
 void setTargetClassName(java.lang.String tRoleName, java.lang.String tClassName)
           
 void setTargetComplement(java.lang.String tRoleName, boolean val)
           
 java.lang.String toString()
          Return a string representation of this instance.
 void updateActionSubclasses(java.lang.String className, java.util.Collection subclasses)
          to update the subclasses of this action class.
 
Methods inherited from class kaos.policy.information.KAoSInstance
addProperty, addProperty, compareProperty, comparePropertyOtherWay, getAllProperties, getAllPropertyNames, getAllPropertyValuesWithPaths, getClassNameURI, getInstanceNameURI, getNestedProperty, getNestedPropertyValue, getNestedPropertyValues, getOriginalOWL, getProperty, numberOfProperties, removeProperty, setOriginalOWL, setPropertyValue, setPropertyValues, updateInstancesForClass, updateSubpropertyNamesForProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicActionDescription

public BasicActionDescription()

BasicActionDescription

public BasicActionDescription(KAoSInstance ki)
                       throws ActorNotSet
Throws:
ActorNotSet
Method Detail

setActionTypes

public void setActionTypes(java.util.Vector actions)

updateActionSubclasses

public void updateActionSubclasses(java.lang.String className,
                                   java.util.Collection subclasses)
to update the subclasses of this action class.

Parameters:
className - the action class whose subclasses are updated
subclasses - the collection of updated subclasses

getActionTypes

public java.util.Set getActionTypes()

setActionProperty

public void setActionProperty(KAoSProperty prop)

setBaseActionClassName

public void setBaseActionClassName(java.lang.String name)

getBaseActionClassName

public java.lang.String getBaseActionClassName()

addActorInstance

public void addActorInstance(java.lang.Object aname)

removeActorInstance

public void removeActorInstance(java.lang.Object aname)

removeAllActorInstances

public void removeAllActorInstances()

setActorComplement

public void setActorComplement(boolean b)

isActorComplement

public boolean isActorComplement()

isActorInstancePresent

public boolean isActorInstancePresent(java.lang.Object aname)

getAllActorInstances

public java.util.Set getAllActorInstances()

setActorRangeClassName

public void setActorRangeClassName(java.lang.String name)

getActorRangeClassName

public java.lang.String getActorRangeClassName()

setActorProperty

public void setActorProperty(KAoSProperty prop)

addProperty

public void addProperty(KAoSProperty add)
This method overrides its superclass method so that it can add the property name to its targetRoleNames vector.

Overrides:
addProperty in class KAoSInstance
Parameters:
add - - the KAoSProperty to add to this instance

addTargetInstance

public void addTargetInstance(java.lang.String tRoleName,
                              java.lang.Object tname)
This function adds an instance in the property for the given target role name.


addTargetInstanceDescription

public void addTargetInstanceDescription(java.lang.String tRoleName,
                                         java.lang.String instID,
                                         KAoSInstance desc)

removeTargetInstance

public void removeTargetInstance(java.lang.String tRoleName,
                                 java.lang.Object tname)

removeTargetInstanceDescription

public void removeTargetInstanceDescription(java.lang.String tRoleName,
                                            java.lang.String instID)

addMultipleTargetInstances

public void addMultipleTargetInstances(java.lang.String tRoleName,
                                       java.util.Collection insts)

setMultipleTargetInstances

public void setMultipleTargetInstances(java.lang.String tRoleName,
                                       java.util.Collection insts)

removeAllTargetInstances

public void removeAllTargetInstances(java.lang.String tRoleName)

setTargetComplement

public void setTargetComplement(java.lang.String tRoleName,
                                boolean val)

isTargetComplement

public boolean isTargetComplement(java.lang.String tRoleName)

getTargetRoleNames

public java.util.Vector getTargetRoleNames()

setTargetClassName

public void setTargetClassName(java.lang.String tRoleName,
                               java.lang.String tClassName)

getTargetClassName

public java.lang.String getTargetClassName(java.lang.String tRoleName)

isTargetInstancePresent

public boolean isTargetInstancePresent(java.lang.String tRoleName,
                                       java.lang.Object tname)

isTargetPresent

public boolean isTargetPresent(java.lang.String tRoleName)

getInstancesForTarget

public java.util.Set getInstancesForTarget(java.lang.String tRoleName)

getInstanceDescriptionFor

public KAoSInstance getInstanceDescriptionFor(java.lang.String tRoleName,
                                              java.lang.String instID)

filterBAD

public static BasicActionDescription filterBAD(BasicActionDescription bad,
                                               BasicActionDescription policy)
This method filters a given BAD object such that it is allowed by the given A- policy object. If the poilcy is not applicable, the original BAD object is returned. If the policy completely forbids this object (i.e. if filtering is impossible) a null value is returned.


getPropretiesOfInterest

public java.util.List getPropretiesOfInterest()
This method returns all the properties and their subproperties contained in this action. This excludes _actor and _action because they don't have subproperties, only subclasses.


getClassRangesOfInterest

public java.util.List getClassRangesOfInterest()
This method returns all the classranges of properties in this action. This excludes _action property because it doesn't have a class range.


getActionSubclassesOfInterest

public java.util.List getActionSubclassesOfInterest()
This method returns all the subclasses of this action, along with the action class name.


returnCopy

public KAoSInstance returnCopy()
Description copied from class: KAoSInstance
Return a clone of this instance.

Overrides:
returnCopy in class KAoSInstance
Returns:

toString

public java.lang.String toString()
Description copied from class: KAoSInstance
Return a string representation of this instance.

Overrides:
toString in class KAoSInstance