|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateManager
This interface defines a manager used to track the properties of a given state for a particular entity. Methods are provided for sensors to update the state and for interested parties to query the state.
Method Summary | |
---|---|
void |
deregisterState(java.lang.String stateId)
This method is used to remove a state instance |
java.util.Set<java.lang.String> |
getPropertyValueForState(java.lang.String stateId,
java.lang.String propertyName)
This method is used to get the property value for a particular state |
OntInstanceDescription |
getStateInstance(java.lang.String stateId)
This method is used to get the OntInstanceDescription for a state instance |
java.util.Collection<OntInstanceDescription> |
getStates()
This method will return a list of OntInstanceDescriptions representing known state |
java.util.List<OntInstanceDescription> |
getStatesOfClass(java.lang.String stateClassName)
This method will return a list of OntInstanceDescriptions that contain the state class name |
java.util.Set<java.lang.String> |
getSubjectWithState(OntClassDescription state)
This method is used to get the subjects with a particular state |
boolean |
isStateSatisfied(OntClassDescription state)
This method check if the state class is satisfied (matched) by any of the actual state in the state manger |
void |
registerAsListenerForState(StateUpdateListener listener)
register as a listener for all state changes |
void |
registerAsListenerForStateClass(java.lang.String stateClass,
StateUpdateListener listener)
register as a listener for a particular state |
void |
registerAsListenerForStateInstance(java.lang.String stateID,
StateUpdateListener listener)
register as a listener for a particular state |
void |
registerInterest(OntClassDescription policyConditionDesc)
|
void |
registerState(OntInstanceDescription stateInstance)
This method is used to add a new state to the database (and its properties if included) |
void |
registerState(java.lang.String stateId,
java.lang.String stateClassName)
This method is used to add a new state to the database |
void |
removePropertyFromState(java.lang.String stateId,
java.lang.String propertyName)
This method is used to remove a property from a state |
void |
updateStateProperties(java.lang.String stateId,
java.util.List<OntPropertyDescription> updatedproperties)
This method is used to add or update properties of a state |
void |
updateStateProperty(java.lang.String stateId,
OntPropertyDescription updatedproperty)
This method is used to add or update properties of a state |
Methods inherited from interface kaos.core.csi.extension.KAoSExtensionComponentManager |
---|
changeComponentEnabledStatus, deregisterComponent, getAllKAoSExtensionComponents, getComponent, getComponentEnabledStatus, getRepositoryManagerType, getRepositoryTableInformation, loadConfiguration, registerComponent, removeAllKAoSExtensionComponents |
Method Detail |
---|
void registerState(OntInstanceDescription stateInstance)
stateInstance
- the description of the state instance to addvoid registerState(java.lang.String stateId, java.lang.String stateClassName) throws java.net.URISyntaxException
stateId
- the unique identifier of the instancestateClassName
- the class of the instance
java.net.URISyntaxException
- is URI is invalidvoid deregisterState(java.lang.String stateId)
stateId
- the unique identifier of the state instance to removevoid updateStateProperty(java.lang.String stateId, OntPropertyDescription updatedproperty) throws java.lang.Exception
stateId
- the unique instance idpropertyName
- the name of the propertypropertyValue
- the value of the property
java.lang.Exception
- if no state with that stateId is registeredvoid updateStateProperties(java.lang.String stateId, java.util.List<OntPropertyDescription> updatedproperties) throws java.lang.Exception
stateId
- the unique instance idproperties
- map of property name -> value
java.lang.Exception
- if no state with that stateId is registeredvoid removePropertyFromState(java.lang.String stateId, java.lang.String propertyName) throws java.lang.Exception
stateId
- the unique identifier of the state instancepropertyName
- t-remove property property to remove
java.lang.Exception
- if no state of that stateId is registeredjava.util.Collection<OntInstanceDescription> getStates()
java.util.List<OntInstanceDescription> getStatesOfClass(java.lang.String stateClassName)
stateClassName
- name of the class of interest
OntInstanceDescription getStateInstance(java.lang.String stateId)
stateId
- the unique identifier of the state instance
java.util.Set<java.lang.String> getPropertyValueForState(java.lang.String stateId, java.lang.String propertyName) throws java.lang.Exception
stateId
- the unique identifier of the state instancepropertyName
- the name of the property of interest
java.lang.Exception
- if state or property does not existboolean isStateSatisfied(OntClassDescription state)
state
- the state class to by matched with existing states
java.util.Set<java.lang.String> getSubjectWithState(OntClassDescription state)
state
- the state class to by matched with existing states
void registerAsListenerForState(StateUpdateListener listener)
listener
- interface of recipient of updatevoid registerAsListenerForStateClass(java.lang.String stateClass, StateUpdateListener listener)
stateClass
- String representing state class of interestlistener
- interface of recipient of updatesvoid registerAsListenerForStateInstance(java.lang.String stateID, StateUpdateListener listener)
stateID
- String representing instance id of the state of interestlistener
- interface of recipient of updatesvoid registerInterest(OntClassDescription policyConditionDesc)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |