kaos.core.service.directory
Class OntologyBasedKAoSDirectory

java.lang.Object
  extended by kaos.core.service.directory.OntologyBasedKAoSDirectory
All Implemented Interfaces:
OntologyService

public class OntologyBasedKAoSDirectory
extends java.lang.Object
implements OntologyService

$Revision: 1.91 $


Constructor Summary
OntologyBasedKAoSDirectory(KAoSDirectoryService _myKAoSDirectoryService)
           
 
Method Summary
 void addEntityOntologicalType(java.lang.String entityNameAsString, java.lang.String typeName, java.lang.String damlDesc)
           
 void addFilteredNamespace(java.lang.String namespace)
           
 void addPolicies(java.util.List<PolicyMsg> policies)
           
 void addPolicy(Msg _policy)
           
 void addPolicySet(PolicySetMsg policySet)
           
 void addPolicySets(java.util.List<PolicySetMsg> policySets)
           
 boolean areClassesDisjoint(java.lang.String firstClass, java.lang.String secondClass)
           
 java.util.Set<java.lang.String> askQuery(java.lang.String variableName, java.lang.String multiplyVariablesQuery)
           
 void changedPriority(java.lang.String policyId, int newPriority)
           
 void changePolicies(java.util.List<PolicyMsg> policies)
           
 void changePolicy(PolicyMsg policy)
           
 void changePolicySet(PolicySetMsg policySet)
           
 void changePolicySets(java.util.List<PolicySetMsg> policySets)
           
 void checkAbsolutePermission(java.lang.String checkedActionClass)
           
 AgentDescription createAgentDescription()
           
 void declareInstance(java.lang.String instanceName, java.lang.String className)
           
 void deregister(AgentDescription desc)
           
 java.util.List findConflictingPolicies(java.lang.String policyId)
           
 java.util.List<java.lang.String> findPoliciesMadeRedundant(java.lang.String policyId)
           
 java.util.List<java.lang.String> findPoliciesMakingRedundant(java.lang.String policyId)
           
 java.util.Vector getAbsoluteObligationsForTriggerConditionForAC(java.lang.String triggerAC)
           
 java.util.Set<ActionClassDescription> getActions(java.lang.String forActor)
           
 java.util.Vector getAllAgentsInDirectory()
           
 java.util.Vector getAllAgentsInDomain(java.lang.String domainName)
           
 java.util.Vector getAllDomainsInDirectory()
           
 java.util.Set getAllNamespaces()
           
 java.util.List<PolicyMsg> getAllPoliciesFor(java.lang.String entityId)
           
 java.util.Set<java.lang.String> getClassesDefInNamespace(java.lang.String namespaceName)
           
 java.util.Set<java.lang.String> getClassesOfActors(java.lang.String baseActorClass)
           
 java.util.Set<java.lang.String> getClassesOfActorsCapableOfPerformingActions(java.lang.String actionClass)
           
 java.util.Set<java.lang.String> getClassesOfGroups(java.lang.String baseGroupClass)
           
 java.util.Set<java.lang.String> getClassesOfPlaces(java.lang.String basePlaceClass)
           
 java.util.Set<java.lang.String> getClassesOfTargets(java.lang.String baseTargetClass)
           
 java.util.Vector getConditionalPolicies()
           
 SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId)
          This method retrieves user defined ontology structure identified by the id from the repository.
 java.util.List<SerializableOntModelImpl> getConstructedOntologyStructures()
          This method retrieves all user defined ontology structures in the repository.
 java.util.List<PolicyMsg> getDirectPoliciesFor(java.lang.String id)
           
 DomainDescription getDomainDescription(java.lang.String domainName)
           
 java.util.List getDomainDescriptionsForGuard(java.lang.String guardGUID)
           
 java.util.Vector getDomainNames()
           
 java.util.Map getDomainStructure(java.lang.String domainName)
           
 java.util.Set getFilteredNamespaces()
           
 java.util.List<java.lang.String> getGuardsForActionClass(java.lang.String action)
           
 java.util.List<java.lang.String> getGuardsForActorClass(java.lang.String actorClassName)
           
 java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className)
          Get set of immediate subclasses of the given class (direct children of the class).
 java.util.Set<java.lang.String> getIndividualActors(java.lang.String baseActorClass)
           
 java.util.Set<java.lang.String> getIndividualGroups(java.lang.String baseGroupClass)
           
 java.util.Set<java.lang.String> getIndividualPlaces(java.lang.String basePlaceClass)
           
 java.util.Set<java.lang.String> getIndividualTargets(java.lang.String baseTargetClass)
           
 java.util.Set<java.lang.String> getInstancesDefInNamespace(java.lang.String namespaceName)
           
 java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName)
          Get set of instances of the given concept; if the concept is an instance itself the set contains just this instance.
 java.util.Set getListOfLoadedOntologies()
          This method returns a set of urls depicting ontologies loaded into the Ontology Service
 java.util.Set<java.lang.String> getNamspacesImportedByNamespace(java.lang.String namespaceName)
           
 java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName)
          Get set of urls for the given short concept name.
 java.util.List<PolicyMsg> getPolicies()
           
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,PolicyMsg>> getPoliciesByEntities()
           
 PolicyMsg getPolicy(java.lang.String policyId)
           
 PolicySetMsg getPolicySet(java.lang.String policySetId)
           
 java.util.List<PolicySetMsg> getPolicySets()
           
 java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className)
          Get properties applicable to the given class
 java.util.Set<java.lang.String> getPropertiesDefInNamespace(java.lang.String namespaceName)
           
 java.lang.String getRangeOnPropertyForClass(java.lang.String className, java.lang.String propertyName)
          Get the name of the class defining the range of the specified property for the given class.
 java.util.Set getResourcesWithValueForProperty(java.lang.String property, java.lang.String value)
           
 java.util.Vector getRootDomains()
           
 java.util.List<java.lang.String> getSchema(java.lang.String conceptName)
          Get XML schema of the given concept if such a schema is available
 ServiceProperties getServiceProperties()
           
 java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className)
          Get set of subclasses of the given class.
 java.util.Vector getSubdomains(java.lang.String domainName)
           
 java.util.Set<java.lang.String> getSubPropertiesOf(java.lang.String propertyName)
          Get set of subproperties of the given property.
 java.util.Set<java.lang.String> getSuperClassesOf(java.lang.String className)
           
 java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName)
          Get set of superproperties of the given property.
 java.util.Set getUltimateOntologyTypesOfIndividual(java.lang.String individualName)
          Finds the ultimate Ontology type of the provided individual
 java.lang.String getUniqueValueForProperty(java.lang.String property, java.lang.String subject)
           
 java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property, java.lang.String subject)
          Get the values of a given property for a given subject
 java.util.List<java.lang.String> harmonizePolicy(java.lang.String harmonizedPolicy, java.lang.String harmonizingPolicy)
           
 java.util.List<OntClassPropertyDescription> initiateActionClassTargets(java.lang.String actionClassName, java.lang.String actorClassName)
          Get properties applicable to the action class
 boolean isEntityInDomain(java.lang.String domainName, java.lang.String entityId)
           
 boolean isFullyOverlappedBySecondPolicy(java.lang.String firstPolicyId, java.lang.String secondPolicyId)
           
 boolean isFullyOverlappedByUnionOfPolicies(java.lang.String firstPolicyId, java.util.List listOfPolicies)
           
 boolean isMadeFullyRedundantByPolicyUnion(java.lang.String firstPolicyId, java.util.List listOfPolicies)
           
 boolean isMadeFullyRedundantBySecond(java.lang.String firstPolicyId, java.lang.String secondPolicyId)
           
 boolean isMadeParitallyRedundantBySecond(java.lang.String firstPolicyId, java.lang.String secondPolicyId)
           
 boolean isPartiallyOverlappedBySecondPolicy(java.lang.String firstPolicyId, java.lang.String secondPolicyId)
           
 boolean isPolicyInConflict(java.lang.String policyId)
           
 boolean isPolicyMakingRedundantSomeOtherPolicy(java.lang.String policyId)
           
 boolean isPolicyRedundant(java.lang.String policyId)
           
 void loadOntologies(java.util.List<SerializableOntModelImpl> myOntModels, boolean recursiveLoad)
          Adds ontology included in the provide objects into the ontology repository.
 void loadOntology(SerializableOntModelImpl myOntModel, boolean recursiveLoad)
          Adds ontology included in the provide objects into the ontology repository.
 void loadOntology(java.lang.String loadedOWL)
          Loads ontology in OWL into the repository of the Ontology Service
 void loadOntology(java.lang.String myURL, boolean recursiveLoad)
          Loads ontology in OWL from given URL into the repository of the Ontology Service
 void modify(AgentDescription desc)
           
 void modifyEntityProperties(java.lang.String entityGUID, java.util.List<Property> properties)
           
 void putConstructedOntologyStructures(java.util.List<SerializableOntModelImpl> ontologyStructureList)
           
 void putSchema(java.lang.String conceptName, java.lang.String xmlSchema)
          Add an XML schema for the given concept
 void register(AgentDescription desc)
           
 void removeConstructedOntologyStructure(java.lang.String structureId)
          This method removes a user defined ontology structure identified by the id from the repository.
 void removeConstructedOntologyStructures(java.util.List<java.lang.String> structureIds)
          This method removes multiple user defined ontology structure identified by the id from the repository.
 void removeExecEnv(java.lang.String execEnvID)
           
 void removeFilteredNamespace(java.lang.String namespace)
           
 void removePolicies(java.util.List<PolicyMsg> policies)
           
 void removePolicy(Msg _policy)
           
 void removePolicySet(PolicySetMsg policySet)
           
 void removePolicySets(java.util.List<PolicySetMsg> policySets)
           
 AgentDescription[] search(AgentDescription desc)
           
 AgentDescription[] search(AgentDescription desc, int maxResults)
           
 void setConditionalPolicies(java.util.Vector condPols)
           
 void setServiceProperties(ServiceProperties props)
           
 void setUp()
           
 java.util.List<java.lang.String> splitPolicy(java.lang.String splitPolicy, java.lang.String secondPolicy)
           
 boolean testTrue(java.lang.String statement)
          Test if the KIF statemant is true according to the ontologies in the ontology repository.
 void updateInForceValue(java.lang.String policyId, boolean inForce)
           
 void updateInForceValue(java.lang.String policyId, java.lang.Boolean inForce)
           
 void updatePolicies(java.util.List<PolicyMsg> addedPolicies, java.util.List<PolicyMsg> changedPolicies, java.util.List<PolicyMsg> removedPolicies)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OntologyBasedKAoSDirectory

public OntologyBasedKAoSDirectory(KAoSDirectoryService _myKAoSDirectoryService)
Method Detail

setUp

public void setUp()
           throws OntologyRepository.ReasoningException
Throws:
OntologyRepository.ReasoningException

getServiceProperties

public ServiceProperties getServiceProperties()
                                       throws ServiceException,
                                              ServiceFailure
Throws:
ServiceException
ServiceFailure

setServiceProperties

public void setServiceProperties(ServiceProperties props)
                          throws ServiceException,
                                 ServiceFailure
Throws:
ServiceException
ServiceFailure

createAgentDescription

public AgentDescription createAgentDescription()

deregister

public void deregister(AgentDescription desc)
                throws NotRegisteredException,
                       DirectoryFailure
Throws:
NotRegisteredException
DirectoryFailure

modify

public void modify(AgentDescription desc)
            throws NotRegisteredException,
                   DirectoryFailure
Throws:
NotRegisteredException
DirectoryFailure

register

public void register(AgentDescription desc)
              throws AlreadyRegisteredException,
                     DirectoryFailure
Throws:
AlreadyRegisteredException
DirectoryFailure

addEntityOntologicalType

public void addEntityOntologicalType(java.lang.String entityNameAsString,
                                     java.lang.String typeName,
                                     java.lang.String damlDesc)

search

public AgentDescription[] search(AgentDescription desc)
                          throws SearchException,
                                 DirectoryFailure
Throws:
SearchException
DirectoryFailure

search

public AgentDescription[] search(AgentDescription desc,
                                 int maxResults)
                          throws SearchException,
                                 DirectoryFailure
Throws:
SearchException
DirectoryFailure

modifyEntityProperties

public void modifyEntityProperties(java.lang.String entityGUID,
                                   java.util.List<Property> properties)
                            throws DirectoryFailure,
                                   NotRegisteredException,
                                   ModificationException
Throws:
DirectoryFailure
NotRegisteredException
ModificationException

getGuardsForActorClass

public java.util.List<java.lang.String> getGuardsForActorClass(java.lang.String actorClassName)

getGuardsForActionClass

public java.util.List<java.lang.String> getGuardsForActionClass(java.lang.String action)

isEntityInDomain

public boolean isEntityInDomain(java.lang.String domainName,
                                java.lang.String entityId)

getAllAgentsInDomain

public java.util.Vector getAllAgentsInDomain(java.lang.String domainName)

getAllAgentsInDirectory

public java.util.Vector getAllAgentsInDirectory()

getAllDomainsInDirectory

public java.util.Vector getAllDomainsInDirectory()

getDomainStructure

public java.util.Map getDomainStructure(java.lang.String domainName)

getDomainDescriptionsForGuard

public java.util.List getDomainDescriptionsForGuard(java.lang.String guardGUID)

removeExecEnv

public void removeExecEnv(java.lang.String execEnvID)

getDomainNames

public java.util.Vector getDomainNames()

getRootDomains

public java.util.Vector getRootDomains()

getSubdomains

public java.util.Vector getSubdomains(java.lang.String domainName)

getDomainDescription

public DomainDescription getDomainDescription(java.lang.String domainName)

getListOfLoadedOntologies

public java.util.Set getListOfLoadedOntologies()
Description copied from interface: OntologyService
This method returns a set of urls depicting ontologies loaded into the Ontology Service

Specified by:
getListOfLoadedOntologies in interface OntologyService

getAllNamespaces

public java.util.Set getAllNamespaces()

getFilteredNamespaces

public java.util.Set getFilteredNamespaces()

addFilteredNamespace

public void addFilteredNamespace(java.lang.String namespace)

removeFilteredNamespace

public void removeFilteredNamespace(java.lang.String namespace)

getConstructedOntologyStructures

public java.util.List<SerializableOntModelImpl> getConstructedOntologyStructures()
Description copied from interface: OntologyService
This method retrieves all user defined ontology structures in the repository.

Specified by:
getConstructedOntologyStructures in interface OntologyService
Returns:
list containing SerializableOntModelImpl objects

putConstructedOntologyStructures

public void putConstructedOntologyStructures(java.util.List<SerializableOntModelImpl> ontologyStructureList)
                                      throws OntologyRepository.ReasoningException,
                                             java.io.IOException
Throws:
OntologyRepository.ReasoningException
java.io.IOException

loadOntology

public void loadOntology(SerializableOntModelImpl myOntModel,
                         boolean recursiveLoad)
                  throws OntologyRepository.ReasoningException,
                         java.io.IOException
Description copied from interface: OntologyService
Adds ontology included in the provide objects into the ontology repository.

Specified by:
loadOntology in interface OntologyService
Parameters:
myOntModel - The object of type Jena OntModel containing the added ontology
recursiveLoad - Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
Throws:
OntologyRepository.ReasoningException
java.io.IOException

loadOntologies

public void loadOntologies(java.util.List<SerializableOntModelImpl> myOntModels,
                           boolean recursiveLoad)
                    throws OntologyRepository.ReasoningException,
                           java.io.IOException
Description copied from interface: OntologyService
Adds ontology included in the provide objects into the ontology repository.

Specified by:
loadOntologies in interface OntologyService
recursiveLoad - Indicates if the imported ontologies (by the ontology contained in myOntModel) should also be recursively loaded.
Throws:
OntologyRepository.ReasoningException
java.io.IOException

getConstructedOntologyStructure

public SerializableOntModelImpl getConstructedOntologyStructure(java.lang.String structureId)
                                                         throws OntologyRepository.ReasoningException,
                                                                UnknownConceptException,
                                                                java.io.IOException
Description copied from interface: OntologyService
This method retrieves user defined ontology structure identified by the id from the repository.

Specified by:
getConstructedOntologyStructure in interface OntologyService
Returns:
SerializableOntModelImpl objects
Throws:
OntologyRepository.ReasoningException
UnknownConceptException
java.io.IOException

loadOntology

public void loadOntology(java.lang.String loadedOWL)
                  throws OntologyRepository.ReasoningException,
                         DirectoryFailure
Description copied from interface: OntologyService
Loads ontology in OWL into the repository of the Ontology Service

Specified by:
loadOntology in interface OntologyService
Parameters:
loadedOWL - string containing a syntactically correctly OWL
Throws:
OntologyRepository.ReasoningException - when loading of the ontology failed.
DirectoryFailure

loadOntology

public void loadOntology(java.lang.String myURL,
                         boolean recursiveLoad)
                  throws OntologyRepository.ReasoningException,
                         java.io.IOException
Description copied from interface: OntologyService
Loads ontology in OWL from given URL into the repository of the Ontology Service

Specified by:
loadOntology in interface OntologyService
recursiveLoad - whether to load the OWL imported by the given URI
Throws:
OntologyRepository.ReasoningException - when loading of the ontology failed.
java.io.IOException

getInstancesOf

public java.util.Set<java.lang.String> getInstancesOf(java.lang.String conceptName)
                                               throws UnknownConceptException
Description copied from interface: OntologyService
Get set of instances of the given concept; if the concept is an instance itself the set contains just this instance.

Specified by:
getInstancesOf in interface OntologyService
Parameters:
conceptName - The name of the concept in the Jena format
Returns:
Set of instance ids
Throws:
UnknownConceptException

getUltimateOntologyTypesOfIndividual

public java.util.Set getUltimateOntologyTypesOfIndividual(java.lang.String individualName)
                                                   throws UnknownConceptException
Description copied from interface: OntologyService
Finds the ultimate Ontology type of the provided individual

Specified by:
getUltimateOntologyTypesOfIndividual in interface OntologyService
Parameters:
individualName - the name of the individual
Returns:
the set of names of the Ontology classes being the most narrow ones for the given individual
Throws:
UnknownConceptException - if concept unknown or any problem with JTP approached

getSuperClassesOf

public java.util.Set<java.lang.String> getSuperClassesOf(java.lang.String className)
                                                  throws UnknownConceptException
Throws:
UnknownConceptException

getSubClassesOf

public java.util.Set<java.lang.String> getSubClassesOf(java.lang.String className)
                                                throws UnknownConceptException
Description copied from interface: OntologyService
Get set of subclasses of the given class.

Specified by:
getSubClassesOf in interface OntologyService
Parameters:
className - The name of the class
Returns:
Set of subclasses names
Throws:
UnknownConceptException

getImmediateSubClassesOf

public java.util.Set<java.lang.String> getImmediateSubClassesOf(java.lang.String className)
                                                         throws UnknownConceptException
Description copied from interface: OntologyService
Get set of immediate subclasses of the given class (direct children of the class).

Specified by:
getImmediateSubClassesOf in interface OntologyService
Parameters:
className - The name of the class in Jena format
Returns:
Set of subclasses names in Jena format
Throws:
UnknownConceptException

getSuperPropertiesOf

public java.util.Set<java.lang.String> getSuperPropertiesOf(java.lang.String propertyName)
                                                     throws UnknownConceptException
Description copied from interface: OntologyService
Get set of superproperties of the given property.

Specified by:
getSuperPropertiesOf in interface OntologyService
Parameters:
propertyName - The name of the property
Returns:
Set of superproperties names
Throws:
UnknownConceptException

getSubPropertiesOf

public java.util.Set<java.lang.String> getSubPropertiesOf(java.lang.String propertyName)
                                                   throws UnknownConceptException
Description copied from interface: OntologyService
Get set of subproperties of the given property.

Specified by:
getSubPropertiesOf in interface OntologyService
Parameters:
propertyName - The name of the property
Returns:
Set of subproperties names
Throws:
UnknownConceptException

testTrue

public boolean testTrue(java.lang.String statement)
                 throws QueryFailure
Description copied from interface: OntologyService
Test if the KIF statemant is true according to the ontologies in the ontology repository.

Specified by:
testTrue in interface OntologyService
Parameters:
statement - the statement in KIF to be tested if true
Returns:
true if the statement is true and false in the opposite case
Throws:
QueryFailure

getUniqueValueForProperty

public java.lang.String getUniqueValueForProperty(java.lang.String property,
                                                  java.lang.String subject)
                                           throws QueryFailure
Throws:
QueryFailure

getValuesForProperty

public java.util.Set<java.lang.String> getValuesForProperty(java.lang.String property,
                                                            java.lang.String subject)
                                                     throws QueryFailure
Description copied from interface: OntologyService
Get the values of a given property for a given subject

Specified by:
getValuesForProperty in interface OntologyService
Parameters:
property - - the property for which to lookup values
subject - - the subject to get the property values for
Returns:
Set of property values for the given subject as Strings
Throws:
QueryFailure

getResourcesWithValueForProperty

public java.util.Set getResourcesWithValueForProperty(java.lang.String property,
                                                      java.lang.String value)
                                               throws QueryFailure
Throws:
QueryFailure

getPropertiesApplicableTo

public java.util.List<java.lang.String> getPropertiesApplicableTo(java.lang.String className)
                                                           throws UnknownConceptException
Description copied from interface: OntologyService
Get properties applicable to the given class

Specified by:
getPropertiesApplicableTo in interface OntologyService
Parameters:
className - the name of the class
Returns:
vector of properties names
Throws:
UnknownConceptException

getRangeOnPropertyForClass

public java.lang.String getRangeOnPropertyForClass(java.lang.String className,
                                                   java.lang.String propertyName)
                                            throws UnknownConceptException
Description copied from interface: OntologyService
Get the name of the class defining the range of the specified property for the given class.

Specified by:
getRangeOnPropertyForClass in interface OntologyService
Parameters:
className - the name of the class
propertyName - the name of the property
Returns:
the name of the class defining the range
Throws:
UnknownConceptException

askQuery

public java.util.Set<java.lang.String> askQuery(java.lang.String variableName,
                                                java.lang.String multiplyVariablesQuery)
                                         throws QueryFailure
Throws:
QueryFailure

areClassesDisjoint

public boolean areClassesDisjoint(java.lang.String firstClass,
                                  java.lang.String secondClass)
                           throws QueryFailure
Throws:
QueryFailure

getClassesDefInNamespace

public java.util.Set<java.lang.String> getClassesDefInNamespace(java.lang.String namespaceName)
                                                         throws UnknownNamespaceException
Throws:
UnknownNamespaceException

getPropertiesDefInNamespace

public java.util.Set<java.lang.String> getPropertiesDefInNamespace(java.lang.String namespaceName)
                                                            throws UnknownNamespaceException
Throws:
UnknownNamespaceException

getInstancesDefInNamespace

public java.util.Set<java.lang.String> getInstancesDefInNamespace(java.lang.String namespaceName)
                                                           throws UnknownNamespaceException
Throws:
UnknownNamespaceException

getNamspacesImportedByNamespace

public java.util.Set<java.lang.String> getNamspacesImportedByNamespace(java.lang.String namespaceName)
                                                                throws UnknownNamespaceException
Throws:
UnknownNamespaceException

getOntologyDefinitionForConcept

public java.util.Set<java.lang.String> getOntologyDefinitionForConcept(java.lang.String conceptName)
Description copied from interface: OntologyService
Get set of urls for the given short concept name. Currently it tries to match the concept name with the local name of the ontology definitions url

Specified by:
getOntologyDefinitionForConcept in interface OntologyService
Parameters:
conceptName - A short name of concept, e.g. "Actor"
Returns:
Set of url containing the short concept name

getIndividualActors

public java.util.Set<java.lang.String> getIndividualActors(java.lang.String baseActorClass)
                                                    throws UnknownConceptException
Throws:
UnknownConceptException

getClassesOfActors

public java.util.Set<java.lang.String> getClassesOfActors(java.lang.String baseActorClass)
                                                   throws UnknownConceptException
Throws:
UnknownConceptException

getIndividualPlaces

public java.util.Set<java.lang.String> getIndividualPlaces(java.lang.String basePlaceClass)
                                                    throws UnknownConceptException
Throws:
UnknownConceptException

getClassesOfPlaces

public java.util.Set<java.lang.String> getClassesOfPlaces(java.lang.String basePlaceClass)
                                                   throws UnknownConceptException
Throws:
UnknownConceptException

getIndividualGroups

public java.util.Set<java.lang.String> getIndividualGroups(java.lang.String baseGroupClass)
                                                    throws UnknownConceptException
Throws:
UnknownConceptException

getClassesOfGroups

public java.util.Set<java.lang.String> getClassesOfGroups(java.lang.String baseGroupClass)
                                                   throws UnknownConceptException
Throws:
UnknownConceptException

getIndividualTargets

public java.util.Set<java.lang.String> getIndividualTargets(java.lang.String baseTargetClass)
                                                     throws UnknownConceptException
Throws:
UnknownConceptException

getClassesOfTargets

public java.util.Set<java.lang.String> getClassesOfTargets(java.lang.String baseTargetClass)
                                                    throws UnknownConceptException
Throws:
UnknownConceptException

declareInstance

public void declareInstance(java.lang.String instanceName,
                            java.lang.String className)
                     throws QueryFailure
Throws:
QueryFailure

getActions

public java.util.Set<ActionClassDescription> getActions(java.lang.String forActor)
                                                 throws UnknownConceptException
Throws:
UnknownConceptException

initiateActionClassTargets

public java.util.List<OntClassPropertyDescription> initiateActionClassTargets(java.lang.String actionClassName,
                                                                              java.lang.String actorClassName)
                                                                       throws DirectoryFailure
Description copied from interface: OntologyService
Get properties applicable to the action class

Specified by:
initiateActionClassTargets in interface OntologyService
Parameters:
actionClassName - the name of the action class performing
actorClassName - the name of the actor class performing the action
Returns:
vector of TargetClassDescription
Throws:
DirectoryFailure

getClassesOfActorsCapableOfPerformingActions

public java.util.Set<java.lang.String> getClassesOfActorsCapableOfPerformingActions(java.lang.String actionClass)
                                                                             throws UnknownConceptException,
                                                                                    DirectoryFailure
Throws:
UnknownConceptException
DirectoryFailure

updatePolicies

public void updatePolicies(java.util.List<PolicyMsg> addedPolicies,
                           java.util.List<PolicyMsg> changedPolicies,
                           java.util.List<PolicyMsg> removedPolicies)
                    throws PolicyManagement.OntologyPolicyIncorrect,
                           PoliciesHarmonizedException,
                           PolicyManagement.PrecedenceUndeterminedException
Throws:
PolicyManagement.OntologyPolicyIncorrect
PoliciesHarmonizedException
PolicyManagement.PrecedenceUndeterminedException

addPolicy

public void addPolicy(Msg _policy)
               throws PolicyManagement.OntologyPolicyIncorrect,
                      PoliciesHarmonizedException,
                      PolicyManagement.PrecedenceUndeterminedException
Throws:
PolicyManagement.OntologyPolicyIncorrect
PoliciesHarmonizedException
PolicyManagement.PrecedenceUndeterminedException

addPolicies

public void addPolicies(java.util.List<PolicyMsg> policies)
                 throws PolicyManagement.OntologyPolicyIncorrect,
                        PoliciesHarmonizedException,
                        PolicyManagement.PrecedenceUndeterminedException
Throws:
PolicyManagement.OntologyPolicyIncorrect
PoliciesHarmonizedException
PolicyManagement.PrecedenceUndeterminedException

removePolicy

public void removePolicy(Msg _policy)

removePolicies

public void removePolicies(java.util.List<PolicyMsg> policies)

changePolicy

public void changePolicy(PolicyMsg policy)
                  throws PolicyManagement.OntologyPolicyIncorrect,
                         PoliciesHarmonizedException,
                         PolicyManagement.PrecedenceUndeterminedException
Throws:
PolicyManagement.OntologyPolicyIncorrect
PoliciesHarmonizedException
PolicyManagement.PrecedenceUndeterminedException

changePolicies

public void changePolicies(java.util.List<PolicyMsg> policies)
                    throws PolicyManagement.OntologyPolicyIncorrect,
                           PoliciesHarmonizedException,
                           PolicyManagement.PrecedenceUndeterminedException
Throws:
PolicyManagement.OntologyPolicyIncorrect
PoliciesHarmonizedException
PolicyManagement.PrecedenceUndeterminedException

getPolicy

public PolicyMsg getPolicy(java.lang.String policyId)

getPolicies

public java.util.List<PolicyMsg> getPolicies()

getPoliciesByEntities

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,PolicyMsg>> getPoliciesByEntities()

getDirectPoliciesFor

public java.util.List<PolicyMsg> getDirectPoliciesFor(java.lang.String id)

getAllPoliciesFor

public java.util.List<PolicyMsg> getAllPoliciesFor(java.lang.String entityId)

getConditionalPolicies

public java.util.Vector getConditionalPolicies()

setConditionalPolicies

public void setConditionalPolicies(java.util.Vector condPols)

addPolicySet

public void addPolicySet(PolicySetMsg policySet)

addPolicySets

public void addPolicySets(java.util.List<PolicySetMsg> policySets)

removePolicySet

public void removePolicySet(PolicySetMsg policySet)

removePolicySets

public void removePolicySets(java.util.List<PolicySetMsg> policySets)

changePolicySet

public void changePolicySet(PolicySetMsg policySet)

changePolicySets

public void changePolicySets(java.util.List<PolicySetMsg> policySets)

getPolicySets

public java.util.List<PolicySetMsg> getPolicySets()

getPolicySet

public PolicySetMsg getPolicySet(java.lang.String policySetId)

isPolicyInConflict

public boolean isPolicyInConflict(java.lang.String policyId)

findConflictingPolicies

public java.util.List findConflictingPolicies(java.lang.String policyId)

isFullyOverlappedBySecondPolicy

public boolean isFullyOverlappedBySecondPolicy(java.lang.String firstPolicyId,
                                               java.lang.String secondPolicyId)
                                        throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

isPartiallyOverlappedBySecondPolicy

public boolean isPartiallyOverlappedBySecondPolicy(java.lang.String firstPolicyId,
                                                   java.lang.String secondPolicyId)
                                            throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

isFullyOverlappedByUnionOfPolicies

public boolean isFullyOverlappedByUnionOfPolicies(java.lang.String firstPolicyId,
                                                  java.util.List listOfPolicies)
                                           throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

isPolicyRedundant

public boolean isPolicyRedundant(java.lang.String policyId)

findPoliciesMakingRedundant

public java.util.List<java.lang.String> findPoliciesMakingRedundant(java.lang.String policyId)

isPolicyMakingRedundantSomeOtherPolicy

public boolean isPolicyMakingRedundantSomeOtherPolicy(java.lang.String policyId)

findPoliciesMadeRedundant

public java.util.List<java.lang.String> findPoliciesMadeRedundant(java.lang.String policyId)

isMadeFullyRedundantBySecond

public boolean isMadeFullyRedundantBySecond(java.lang.String firstPolicyId,
                                            java.lang.String secondPolicyId)
                                     throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

isMadeParitallyRedundantBySecond

public boolean isMadeParitallyRedundantBySecond(java.lang.String firstPolicyId,
                                                java.lang.String secondPolicyId)
                                         throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

isMadeFullyRedundantByPolicyUnion

public boolean isMadeFullyRedundantByPolicyUnion(java.lang.String firstPolicyId,
                                                 java.util.List listOfPolicies)
                                          throws PolicyAnalyzes.PriorityConditionNotMet
Throws:
PolicyAnalyzes.PriorityConditionNotMet

changedPriority

public void changedPriority(java.lang.String policyId,
                            int newPriority)

updateInForceValue

public void updateInForceValue(java.lang.String policyId,
                               java.lang.Boolean inForce)

updateInForceValue

public void updateInForceValue(java.lang.String policyId,
                               boolean inForce)

harmonizePolicy

public java.util.List<java.lang.String> harmonizePolicy(java.lang.String harmonizedPolicy,
                                                        java.lang.String harmonizingPolicy)

splitPolicy

public java.util.List<java.lang.String> splitPolicy(java.lang.String splitPolicy,
                                                    java.lang.String secondPolicy)

getAbsoluteObligationsForTriggerConditionForAC

public java.util.Vector getAbsoluteObligationsForTriggerConditionForAC(java.lang.String triggerAC)
                                                                throws ServiceFailure
Throws:
ServiceFailure

checkAbsolutePermission

public void checkAbsolutePermission(java.lang.String checkedActionClass)
                             throws KAoSSecurityException,
                                    java.lang.NullPointerException,
                                    ServiceFailure
Throws:
KAoSSecurityException
java.lang.NullPointerException
ServiceFailure

getSchema

public java.util.List<java.lang.String> getSchema(java.lang.String conceptName)
                                           throws UnknownConceptException,
                                                  DirectoryFailure
Description copied from interface: OntologyService
Get XML schema of the given concept if such a schema is available

Specified by:
getSchema in interface OntologyService
Parameters:
conceptName - uri name of the concept
Returns:
A List containing Strings that define the XML schema of the given concept. The reason it is a vector of strings and not just one string is that the definition can be complex, i.e. derived from multiple more primitive schemas, hence this vector contains definitions for all those schemas too.
Throws:
UnknownConceptException
DirectoryFailure

putSchema

public void putSchema(java.lang.String conceptName,
                      java.lang.String xmlSchema)
               throws DirectoryFailure
Description copied from interface: OntologyService
Add an XML schema for the given concept

Specified by:
putSchema in interface OntologyService
Parameters:
conceptName - uri name of the concept
Throws:
DirectoryFailure
See Also:
OntologyService.putSchema(java.lang.String, java.lang.String)

removeConstructedOntologyStructure

public void removeConstructedOntologyStructure(java.lang.String structureId)
                                        throws DirectoryFailure
Description copied from interface: OntologyService
This method removes a user defined ontology structure identified by the id from the repository.

Specified by:
removeConstructedOntologyStructure in interface OntologyService
Throws:
DirectoryFailure

removeConstructedOntologyStructures

public void removeConstructedOntologyStructures(java.util.List<java.lang.String> structureIds)
                                         throws DirectoryFailure
Description copied from interface: OntologyService
This method removes multiple user defined ontology structure identified by the id from the repository.

Specified by:
removeConstructedOntologyStructures in interface OntologyService
Throws:
DirectoryFailure