|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkaos.core.util.MethodCallRequestHandler
kaos.spatial.SpatialDB
kaos.spatial.LocalSpatialDB
public class LocalSpatialDB
This class implements functionality of the local spatial database conected to the central database
Nested Class Summary | |
---|---|
protected static class |
LocalSpatialDB.OperationWaiter
This class is used as a helper class to block Threads invoking the various SpatialDB operations. |
Field Summary |
---|
Fields inherited from class kaos.spatial.SpatialDB |
---|
myAlternativeNames, mySpatialObjects, mySpatialObjectsAlternativeNames, mySpatialObjectsBoundingPoints, mySpatialObjectsLocations, mySpatialObjectsOccupiedSpaces, mySpatialObjectsOntologyTypes, mySpatialObjectsOrientations, SPATIAL_DB |
Fields inherited from class kaos.core.util.MethodCallRequestHandler |
---|
_agentDescription, _helper, _mts, _nickName, DEFAULT_NICKNAME, myLocator, myMessageReceiver, myMessageSender |
Method Summary | |
---|---|
protected java.lang.Object |
callDS(MethodCallRequestMsg request)
|
void |
deregisterSpatialObject(java.lang.String objectID)
Deregister object identified by the given objectID and its spatial properties in the SpatialReasoner. |
java.util.Vector |
findUsingAlternativeName(java.lang.String objectAlternativeName)
This method finds the spatial objects with the given alternative name |
java.util.Vector<SpatialObject> |
getAllSpatialObjects()
This method allows to obtain a vector of all registered spatial object. |
java.util.Vector |
getAlternativeNames(java.lang.String objectID)
This method get the alternative names of the spatial object. |
java.util.Vector<Location3D> |
getBoundingPoints(java.lang.String objectID)
This method allows to obtain a vector of locations of the corners of the area bounding the object. |
static LocalSpatialDB |
getLSRInstance(java.lang.String transportName)
Retrieve an instance of LocalSpatialDB. |
Location3D |
getObjectLocation(java.lang.String objectID)
This method allows to obtain location of a known spatial object. |
java.util.Set |
getObjectOntologicalTypes(java.lang.String objectID)
This method allows to obtain location of a known spatial object. |
Orientation3D |
getObjectOrientation(java.lang.String objectID)
This method allows to obtain orientation of a known spatial object. |
Block3D |
getOccupiedSpace(java.lang.String objectID)
This method allows to obtain aproximation of the occupied space of a known spatial object. |
protected MethodCallResultMsg |
getResult(MethodCallRequestMsg msgOut)
Wrap the MethodCallRequestMsg into a TransportMessage message and send it to the global SpatialDB. |
SpatialObject |
getSpatialObject(java.lang.String objectID)
This method allows to obtain spatial object. |
protected void |
handleMsgContent(Msg aMsg)
|
void |
registerSpatialObject(java.lang.String objectID,
java.util.Set objectOntologyType,
Location3D objectLocation,
Orientation3D objectOrientation,
Block3D objectOccupedSpace)
This method allows to add information about a new spatial object. |
void |
registerSpatialObject(java.lang.String objectID,
java.util.Set objectOntologyType,
Orientation3D objectOrientation,
java.util.Vector<Location3D> boundingPoints)
This method allows to add information about a new spatial object. |
void |
setAlternativeName(java.lang.String objectID,
java.lang.String objectAlternativeName)
This method set the alternative name of the spatial object. |
void |
updateSpatialObject(java.lang.String objectID,
Location3D objectLocation,
Orientation3D objectOrientation,
Block3D objectOccupedSpace)
This method allows to modify information about a known spatial object. |
void |
updateSpatialObject(java.lang.String objectID,
Orientation3D objectOrientation,
java.util.Vector<Location3D> boundingPoints)
This method allows to modify information about a known spatial object. |
protected MethodCallResultMsg |
waitForReply(java.lang.String operationID,
java.lang.String operationName)
This method is called immediately after a Directory operation is requested and a message containing the MethodCallRequestMsg is sent to the DM. |
Methods inherited from class kaos.spatial.SpatialDB |
---|
getInstance, initVars |
Methods inherited from class kaos.core.util.MethodCallRequestHandler |
---|
bindToTransport, handleObjContent, initialize, receiveMessage |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static LocalSpatialDB getLSRInstance(java.lang.String transportName) throws java.lang.Exception
java.lang.Exception
public java.util.Vector<SpatialObject> getAllSpatialObjects()
SpatialDatabase
getAllSpatialObjects
in interface SpatialDatabase
getAllSpatialObjects
in class SpatialDB
public SpatialObject getSpatialObject(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getSpatialObject
in interface SpatialDatabase
getSpatialObject
in class SpatialDB
objectID
- - id of the object
NotRegisteredException
- when the object is not registered in the spatial databasepublic java.util.Set getObjectOntologicalTypes(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getObjectOntologicalTypes
in interface SpatialDatabase
getObjectOntologicalTypes
in class SpatialDB
objectID
- - id of the object
NotRegisteredException
- when the object is not registered in the spatial databasepublic Location3D getObjectLocation(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getObjectLocation
in interface SpatialDatabase
getObjectLocation
in class SpatialDB
objectID
- - id of the object
return @see Location3D - object containg location coordinates as xyz
NotRegisteredException
- when the object is not registered in the spatial databasepublic Orientation3D getObjectOrientation(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getObjectOrientation
in interface SpatialDatabase
getObjectOrientation
in class SpatialDB
objectID
- - id of the object
return @see Orientation3D - object containg orientation as xyz radiuses
NotRegisteredException
- when the object is not registered in the spatial databasepublic Block3D getOccupiedSpace(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getOccupiedSpace
in interface SpatialDatabase
getOccupiedSpace
in class SpatialDB
objectID
- - id of the object
return @see Block3D - object containg inforationas about an occupied space as a 3d block
NotRegisteredException
- when the object is not registered in the spatial databasepublic java.util.Vector<Location3D> getBoundingPoints(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getBoundingPoints
in interface SpatialDatabase
getBoundingPoints
in class SpatialDB
objectID
- - id of the object
return @see Block3D - object containg inforationas about an occupied space as a 3d block
NotRegisteredException
- when the object is not registered in the spatial databasepublic java.util.Vector findUsingAlternativeName(java.lang.String objectAlternativeName) throws NotRegisteredException
SpatialDatabase
findUsingAlternativeName
in interface SpatialDatabase
findUsingAlternativeName
in class SpatialDB
objectAlternativeName
- - the alternative name of the object
return Vector - id of the found object
NotRegisteredException
- when the object is not registered in the spatial databasepublic java.util.Vector getAlternativeNames(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
getAlternativeNames
in interface SpatialDatabase
getAlternativeNames
in class SpatialDB
objectID
- - id of the updated object
return Vector - the alternative names of the object
NotRegisteredException
- when the object is not registered in the spatial databasepublic void registerSpatialObject(java.lang.String objectID, java.util.Set objectOntologyType, Location3D objectLocation, Orientation3D objectOrientation, Block3D objectOccupedSpace) throws AlreadyRegisteredException
SpatialDatabase
registerSpatialObject
in interface SpatialDatabase
registerSpatialObject
in class SpatialDB
objectID
- - id of the registered objectobjectLocation
- - initial location of the object represnted as @see Location3DobjectOrientation
- - initial orientation of the object represnted as @see Orientation3DobjectOccupedSpace
- - initial space occupied by the object represnted as @see Block3D
AlreadyRegisteredException
- when the object is already registered in the spatial databasepublic void registerSpatialObject(java.lang.String objectID, java.util.Set objectOntologyType, Orientation3D objectOrientation, java.util.Vector<Location3D> boundingPoints) throws AlreadyRegisteredException
SpatialDatabase
registerSpatialObject
in interface SpatialDatabase
registerSpatialObject
in class SpatialDB
objectID
- - id of the registered objectobjectOntologyType
- - set of string representing URI in the OWL ontology file to the definition of the object classobjectOrientation
- - initial orientation of the object represnted as @see Orientation3DboundingPoints
- - vector with locations of the corners of the area bounding the object
AlreadyRegisteredException
- when the object is already registered in the spatial databasepublic void deregisterSpatialObject(java.lang.String objectID) throws NotRegisteredException
SpatialDatabase
deregisterSpatialObject
in interface SpatialDatabase
deregisterSpatialObject
in class SpatialDB
objectID
- String uniquely identifying registering object in the SpatialReasoner.
NotRegisteredException
- if the registering object has not been registered in the SpatialReasoner.public void updateSpatialObject(java.lang.String objectID, Location3D objectLocation, Orientation3D objectOrientation, Block3D objectOccupedSpace) throws NotRegisteredException
SpatialDatabase
updateSpatialObject
in interface SpatialDatabase
updateSpatialObject
in class SpatialDB
objectID
- - id of the updated objectobjectLocation
- - new location of the object represnted as @see Location3DobjectOrientation
- - new orientation of the object represnted as @see Orientation3DobjectOccupedSpace
- - new space occupied by the object represnted as @see Block3D
NotRegisteredException
- when the object is not registered in the spatial databasepublic void updateSpatialObject(java.lang.String objectID, Orientation3D objectOrientation, java.util.Vector<Location3D> boundingPoints) throws NotRegisteredException
SpatialDatabase
updateSpatialObject
in interface SpatialDatabase
updateSpatialObject
in class SpatialDB
objectID
- - id of the updated objectobjectOrientation
- - new orientation of the object represnted as @see Orientation3DboundingPoints
- - vector with locations of the corners of the area bounding the object
NotRegisteredException
- when the object is not registered in the spatial databasepublic void setAlternativeName(java.lang.String objectID, java.lang.String objectAlternativeName) throws NotRegisteredException
SpatialDatabase
setAlternativeName
in interface SpatialDatabase
setAlternativeName
in class SpatialDB
objectID
- - id of the updated objectobjectAlternativeName
- - the alternative name of the object
NotRegisteredException
- when the object is not registered in the spatial databaseprotected void handleMsgContent(Msg aMsg)
handleMsgContent
in class MethodCallRequestHandler
protected java.lang.Object callDS(MethodCallRequestMsg request) throws NotRegisteredException
NotRegisteredException
protected MethodCallResultMsg getResult(MethodCallRequestMsg msgOut) throws ServiceFailure
ServiceFailure
protected MethodCallResultMsg waitForReply(java.lang.String operationID, java.lang.String operationName) throws ServiceFailure
ServiceFailure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |