|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KAoSPolicyBuilder
Class building a DAML Policy representation within com.hp.hpl.jena.daml.DAMLModel
Method Summary | |
---|---|
void |
addAgentInstance(java.lang.String actorName)
Add the provided Actor instance to the class being the range of the actors controlled by this policy. |
void |
addBaseActionType(java.lang.String actionBaseClassName)
Add the base Action class to be controlled by this policy. |
void |
addBaseActionTypeComplement(java.lang.String actionBaseClassName)
Add the complement of the base Action class to be controlled by this policy. |
void |
addTargetInstance(java.lang.String targetRoleName,
java.lang.String targetName)
Add the provided Target instance to the class being the range of the tarets of this policy for the provided role. |
void |
copyActorFromOtherPolicy(KAoSPolicyBuilder sourcePolicy)
Copies the actor data to the current policy from the provided source policy |
void |
copyTargetFromOtherPolicy(KAoSPolicyBuilder sourcePolicy,
java.lang.String targetRoleName)
Copies the target data for the specified role to the current policy from the provided source policy |
java.lang.String[] |
getAgentInstance()
Get the list of instances of the Actor class controlled by the current policy. |
java.util.Vector |
getBaseActionTypes()
Get the superclasses of the Action controlled by the current policy. |
java.lang.String |
getBaseActorClass()
If the current actor class is a complement, then get the name of the base actor class of which the current class is a complement; else get the name of the current actor class. |
java.lang.String |
getBaseTargetClass(java.lang.String targetRoleName)
If the current target class is a complement, then get the name of the base target class of which the current class is a complement; else get the name of the current target class. |
java.lang.String |
getCurrentActorClass()
Get the name of the current actor class that denotes the range of actors controlled by the this policy. |
java.lang.String |
getCurrentTargetClass(java.lang.String targetRoleName)
Get the name of the current target class that denotes the range of targets controlled by the this policy. |
java.lang.String |
getHasSiteOfEnforcement()
Get the site of enforcment for the current policy. |
java.lang.String |
getModalityType()
Get the value of the modality type for the current policy. |
SerializableOntModelImpl |
getPolicy()
Return the build policy as DAMLModel. |
java.lang.String |
getPolicyAsText()
Return the build policy as text. |
java.lang.String |
getPolicyDesc()
Get the value of the policy description for the current policy. |
java.lang.String |
getPolicyID()
Get the id of the current policy. |
java.lang.String |
getPolicyName()
Get the value of the policy name for the current policy. |
int |
getPriority()
Get the priority for the current policy. |
java.lang.String[] |
getTargetInstance(java.lang.String targetRoleName)
Get the instances of the Target class being the range of target for the provided role name. |
java.util.Vector |
getTargetRoleNames()
Get the names of all targets. |
java.lang.Long |
getUpdateTimeStamp()
Get the value of the time stamp for the current policy. |
boolean |
isActorComplement()
Check if the range of the actor is a complement. |
boolean |
isActorRangeBasedOnClass()
Check if a class or instances of the Actor class are based for the range of actors controlled by this policy. |
boolean |
isTargetComplement(java.lang.String targetRoleName)
Check if the range of the target is a complement. |
boolean |
isTargetRangeBasedOnClass(java.lang.String targetRoleName)
Check if the class for a target role is based on a class or on a list of instances. |
void |
makeActorComplement(java.lang.String className)
Make the range of the actor complement of the current range. |
void |
makeTargetComplement(java.lang.String targetRoleName,
java.lang.String targetName)
Make the range of the target complement of the current range. |
void |
readFromModel(SerializableOntModelImpl dm)
A method to recreate a DAMLPolicyBuilder object by reading from a DAMLModel object |
void |
removeActorClass()
Remove the value of 'toClass' restriction on performedBy property |
void |
removeAgentInstance(java.lang.String actorClassName)
Remove the given Actor instance from the class containing instances of the actors controlled by this policy. |
void |
removeBaseActionType(java.lang.String actionBaseClassName)
Remove the provided Action class from the list of superclasses of the given class. |
void |
removeTargetClass(java.lang.String targetRoleName)
Remove the value of 'toClass' restriction on the given property |
void |
removeTargetInstance(java.lang.String targetRoleName,
java.lang.String targetName)
Remove the given Target instance from the class being the range of the tarets of this policy for the provided role. |
void |
resetPolicyBuilding()
Starts building the new policy, delete any existing state of the previously build policy. |
void |
setActorClass(java.lang.String actorClassName)
Set the range of the actors controlled by this policy to the specified subclass of the Actor class. |
void |
setActorClassDifference(java.lang.String actorClassName1,
java.lang.String actorClassName2)
Set the range of the actors controlled by this policy to the difference of specified subclasses of the Actor class. |
void |
setActorClassIntersection(java.lang.String actorClassName1,
java.lang.String actorClassName2)
Set the range of the actors controlled by this policy to the intersection of specified subclasses of the Actor class. |
void |
setHasSiteOfEnforcement(java.lang.String _siteName)
Set the site of enforcment for the build policy. |
void |
setPolicyDesc(java.lang.String desc)
Set the description of the defined policy. |
void |
setPolicyIDAndModalityType(java.lang.String policyID,
java.lang.String modalityType)
Set the ID of the defined policy and its modality type. |
void |
setPolicyName(java.lang.String pName)
Set the name of the defined policy. |
void |
setPriority(int priority)
Set the priority for the build policy. |
void |
setTargetClass(java.lang.String targetRoleName,
java.lang.String targetClassName)
Set the range of the named performOn subpoperty of the action controlled by this policy to the specified class of the Target. |
void |
setTargetClassDifference(java.lang.String targetRoleName,
java.lang.String targetClassName1,
java.lang.String targetClassName2)
Set the range of the named |
void |
setTargetClassIntersection(java.lang.String targetRoleName,
java.lang.String targetClassName1,
java.lang.String targetClassName2)
Set the range of the named |
void |
showPolicy()
A utility method to print the policy. |
Method Detail |
---|
void resetPolicyBuilding()
SerializableOntModelImpl getPolicy() throws PolicyBuildingNotCompleted
PolicyBuildingNotCompleted
- if the current policy is not fully specifiedjava.lang.String getPolicyAsText()
PolicyBuildingNotCompleted
- if the current policy is not fully specifiedjava.lang.Long getUpdateTimeStamp() throws ValueNotSet
ValueNotSet
- if value of the time stamp is not knownvoid setPolicyIDAndModalityType(java.lang.String policyID, java.lang.String modalityType) throws SpecifiedModalityTypeNotExists
policyName
- the name of the policymodalityType
- the name (url) of the class representing the modality type of policy, one of:
PosAuthorizationPolicy
NegAuthorizationPolicy
PosObligationPolicy
NegObligationPolicy
SpecifiedModalityTypeNotExists
- if the modality type does not existkaos.ontology.PolicyConcepts
java.lang.String getPolicyID() throws ValueNotSet
ValueNotSet
- if value of the policy ID is not knownjava.lang.String getModalityType() throws ValueNotSet
ValueNotSet
- if value of the modalitytype is not knownvoid setPolicyName(java.lang.String pName)
pName
- the name of the policyjava.lang.String getPolicyName() throws ValueNotSet
ValueNotSet
- if value of the modalitytype is not knownvoid setPolicyDesc(java.lang.String desc)
desc
- description of the policyjava.lang.String getPolicyDesc() throws ValueNotSet
ValueNotSet
- if value of the modalitytype is not knownvoid addBaseActionType(java.lang.String actionBaseClassName) throws DisjointClassWithAlreadyAdded, PolicyNameNotSet
actionBaseClassName
- the name of the action superclass
PolicyNameNotSet
- if the policy name has not been set before
DisjointClassWithAlreadyAdded
- if the provided Action class is disjoint with the classes already addedvoid addBaseActionTypeComplement(java.lang.String actionBaseClassName) throws DisjointClassWithAlreadyAdded, PolicyNameNotSet
actionBaseClassName
- the name of the action superclass whose complemet
is to be taken
PolicyNameNotSet
- if the policy name has not been set before
DisjointClassWithAlreadyAdded
- if the provided Action class is disjoint with the classes already addedvoid removeBaseActionType(java.lang.String actionBaseClassName) throws ClassNotSuperClass
actionBaseClassName
- the name of the Action class
ClassNotSuperClass
- if the class was not previously addedjava.util.Vector getBaseActionTypes() throws ValueNotSet
ValueNotSet
- if Action superclasses are not knownboolean isActorRangeBasedOnClass() throws ValueNotSet
ValueNotSet
- if the range is not setvoid setActorClass(java.lang.String actorClassName) throws ValueNotSet, PolicyNameNotSet
actorClassName
- the name of the Actor subclass
PolicyNameNotSet
- if the policy name has not been set before
RangeIsBasedOnInstances
- if the actor range was already initiatied with instances of actors
ValueNotSet
void setActorClassIntersection(java.lang.String actorClassName1, java.lang.String actorClassName2) throws ValueNotSet, PolicyNameNotSet
actorClassName1
- the name of the Actor subclassactorClassName2
- the name of the Actor subclass
PolicyNameNotSet
- if the policy name has
not been set before
ValueNotSet
void setActorClassDifference(java.lang.String actorClassName1, java.lang.String actorClassName2) throws ValueNotSet, PolicyNameNotSet
actorClassName1
- the name of the Actor subclassactorClassName2
- the name of the Actor subclass
PolicyNameNotSet
- if the policy name has
not been set before
ValueNotSet
void removeActorClass() throws ValueNotSet
ValueNotSet
- if the restriciton, the property
or the 'toClass' value is nulljava.lang.String getBaseActorClass() throws ValueNotSet, RangeIsBasedOnInstances
ValueNotSet
- if current Actor class is not
a complement
RangeIsBasedOnInstances
- if the restriction
is based on instancesjava.lang.String getCurrentActorClass() throws ValueNotSet
ValueNotSet
- if current Actor class is instance
basedvoid addAgentInstance(java.lang.String actorName) throws RangeIsBasedOnAClass, ValueNotSet, PolicyNameNotSet
actorClassName
- the name of the Actor instance
PolicyNameNotSet
- if the policy name has not been set before
RangeIsBasedOnAClass
- if the actor range was already set to class
ValueNotSet
void removeAgentInstance(java.lang.String actorClassName) throws RangeIsBasedOnAClass, InstanceNotInThisRange
actorClassName
- the name of the Actor instance
InstanceNotInThisRange
- if the instance was not previously added
RangeIsBasedOnAClass
- if the actor range was already set to classvoid copyActorFromOtherPolicy(KAoSPolicyBuilder sourcePolicy)
sourcePolicy
- KAoSPolicyBuilder containing the source policyjava.lang.String[] getAgentInstance() throws ValueNotSet, RangeIsBasedOnAClass
ValueNotSet
- if Actor instances are not known
RangeIsBasedOnAClass
void makeActorComplement(java.lang.String className) throws AlreadyComplement
AlreadyComplement
- if property range was already made complementboolean isActorComplement() throws AlreadyComplement
AlreadyComplement
- if property range was already made complementboolean isTargetRangeBasedOnClass(java.lang.String targetRoleName) throws ValueNotSet
targetRoleName
- the name of the role
ValueNotSet
- if the range is not setvoid setTargetClass(java.lang.String targetRoleName, java.lang.String targetClassName) throws ActionTypeNotSet
targetRoleName
- the name of the roletargetClassName
- the name of the class
ActionTypeNotSet
- if the action name has not been set before
RangeIsBasedOnInstances
- if the given target range was already initiatied with instances of targetvoid setTargetClassIntersection(java.lang.String targetRoleName, java.lang.String targetClassName1, java.lang.String targetClassName2) throws ActionTypeNotSet, ValueNotSet
targetRoleName
- the name of the roletargetClassName1
- the name of the Target subclasstargetClassName1
- the name of the Target subclass
ActionTypeNotSet
- if the action name has
not been set before
ValueNotSet
void setTargetClassDifference(java.lang.String targetRoleName, java.lang.String targetClassName1, java.lang.String targetClassName2) throws ActionTypeNotSet, ValueNotSet, PolicyNameNotSet
targetRoleName
- the name of the roletargetClassName1
- the name of the Target subclasstargetClassName1
- the name of the Target subclass
ActionTypeNotSet
- if the action name has
not been set before
ValueNotSet
PolicyNameNotSet
void removeTargetClass(java.lang.String targetRoleName) throws ValueNotSet
targetRoleName
- the name of the property.
ValueNotSet
- if the restriciton, the property
or the 'toClass' value is nulljava.lang.String getBaseTargetClass(java.lang.String targetRoleName) throws ValueNotSet, RangeIsBasedOnInstances
targetRoleName
- the name of the role
ValueNotSet
- if current target class is not
a complement
RangeIsBasedOnInstances
- if the restriction
is based on instancesjava.lang.String getCurrentTargetClass(java.lang.String targetRoleName) throws ValueNotSet
targetRoleName
- the name of the role
ValueNotSet
- if current target class is nullvoid addTargetInstance(java.lang.String targetRoleName, java.lang.String targetName) throws RangeIsBasedOnAClass, ActionTypeNotSet
targetRoleName
- the name of the roletargetName
- the name of the target instance to define a range ot possible values for this role
ActionTypeNotSet
- if the action name has not been set before
RangeIsBasedOnAClass
- if the target range was already set to classvoid removeTargetInstance(java.lang.String targetRoleName, java.lang.String targetName) throws RangeIsBasedOnAClass, InstanceNotInThisRange
targetRoleName
- the name of the roletargetName
- the name of the target instance to define a range ot possible values for this role
InstanceNotInThisRange
- if the instance was not previously added
RangeIsBasedOnAClass
- if the target range was already set to classvoid copyTargetFromOtherPolicy(KAoSPolicyBuilder sourcePolicy, java.lang.String targetRoleName)
sourcePolicy
- KAoSPolicyBuilder containing the source policytargetRoleName
- the name of the rolejava.lang.String[] getTargetInstance(java.lang.String targetRoleName) throws ValueNotSet
targetRoleName
- the name of the role
ValueNotSet
- if Target instances are not knownvoid makeTargetComplement(java.lang.String targetRoleName, java.lang.String targetName) throws AlreadyComplement
targetRoleName
- the name of the roletargetName
- the name of the target class that will be
subclassed
AlreadyComplement
- if property range was already made complementboolean isTargetComplement(java.lang.String targetRoleName) throws AlreadyComplement
targetRoleName
- the name of the target role
AlreadyComplement
- if property range was already made complementjava.util.Vector getTargetRoleNames()
void setPriority(int priority) throws PriorityNotValid, PolicyNameNotSet
_priority
- the value of the priority
PolicyNameNotSet
- if the name of the policy was not set yet; the construction of the policy was not really started
PriorityNotValid
- if value is not higher than zeroint getPriority() throws ValueNotSet
ValueNotSet
- if value of the priority is not knownvoid setHasSiteOfEnforcement(java.lang.String _siteName) throws PolicyNameNotSet, SiteOfEnforcementTypeNotExists
_siteId
- the name (url) of the class representing the site of policy enforcment, currently one of:
ActorSite
TargetSite
AnySite
PolicyNameNotSet
- if the name of the policy was not set yet; the construction of the policy was not really started
SpecifiedSiteOfEnforcementTypeNotExists
- if the value of the site of enforcement does not exist
SiteOfEnforcementTypeNotExists
kaos.ontology.PolicyConcepts
java.lang.String getHasSiteOfEnforcement() throws ValueNotSet
ValueNotSet
- if value of the site of enforcment is not knownvoid showPolicy()
void readFromModel(SerializableOntModelImpl dm)
dm
- the model from which to read
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |