|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.spatial.SpatialReasoner
public class SpatialReasoner
This class implements interfaces:
SpatialDatabase,
SpatialQuery| Field Summary | |
|---|---|
protected java.util.Vector |
knownBasicRelations
|
protected java.util.Vector |
knownReferencedRelations
|
| Constructor Summary | |
|---|---|
protected |
SpatialReasoner()
Default constructor |
| Method Summary | |
|---|---|
void |
deregisterSpatialObject(java.lang.String objectID)
Deregister object identified by the given objectID and its spatial properties in the SpatialReasoner. |
java.util.Vector<Location3D> |
findLocationReferencedBy(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String referenceObjectID,
double distance)
This method returns a location of the subject object which is in the given relation with the reference object |
java.util.Vector |
findObjectsInRelation(java.util.Vector relationNames,
java.lang.String subjectObjectID,
float maxDistance)
This method returns a vector of the IDs of objects being in the specified relation to the subject object, but in the specified maximum distance. |
java.util.Vector |
findObjectsInRelationReferencedBy(java.util.Vector relationNames,
java.lang.String subjectObjectID,
java.lang.String referenceObjectID,
float maxDistance)
This method returns objects being in the specified relations to the subject object in regards to the referenced object, but in the specified maximum distance. |
java.util.Vector |
findSpatialRelationsBetween(java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
This method returns spatial relations between two objects from the perspective of the first subject object. |
java.util.Vector |
findSpatialRelationsReferencedBy(java.lang.String subjectObjectID,
java.lang.String relatedObjectID,
java.lang.String referencedObjectID)
This method returns spatial relations between two objects from the perspective of the first subject object in regards to the reference object. |
java.util.Vector<Location3D> |
findSpecificSideOfObject(java.lang.String objectID,
java.lang.String sideOrientation)
This method finds the alternative name of the spatial object. |
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. |
double |
getDistanceBetween(java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
This method returns a value of the distance between two objects |
static SpatialReasoner |
getInstance(java.lang.String transportName,
boolean central)
Retrieve an instance of SpatialReasoner. |
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. |
SpatialObject |
getSpatialObject(java.lang.String objectID)
This method allows to obtain spatial object. |
double |
getValueOfOrientationRelation(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
This method returns a value of rotation, in radius, requqired to directly face the given object being in the given initial spatial relation It is important to remember that this value is calculated based on the orientation and location associated with the subject object. |
protected void |
initVars()
|
void |
registerSpatialObject(java.lang.String objectID,
java.util.Set objectOntologyTypes,
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. |
boolean |
testSpatialRelationBetween(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
This method tests the given spatial relation between two objects from the perspective of the subject object. |
boolean |
testSpatialRelationsReferencedBy(java.lang.String relationName,
java.lang.String relatedObjectID,
java.lang.String subjectObjectID,
java.lang.String referencedObjectID)
This method test spatial relation between two objects from the perspective of the subject object in regards to the referenced 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Vector knownBasicRelations
protected java.util.Vector knownReferencedRelations
| Constructor Detail |
|---|
protected SpatialReasoner()
| Method Detail |
|---|
public static SpatialReasoner getInstance(java.lang.String transportName,
boolean central)
throws java.lang.Exception
java.lang.Exception
public java.util.Vector findObjectsInRelation(java.util.Vector relationNames,
java.lang.String subjectObjectID,
float maxDistance)
throws NotRegisteredException,
UnknownConceptException
SpatialQuery
findObjectsInRelation in interface SpatialQueryrelationNames - - URIs in the OWL ontology file(s) to the relation definition, for instance left, down, etc.subjectObjectID - - id of the subject objectmaxDistance - - meximum distance of the search
NotRegisteredException - when the subject is not registered in the spatial database
UnknownConceptException - when the spatial relation is unknown
public java.util.Vector findObjectsInRelationReferencedBy(java.util.Vector relationNames,
java.lang.String subjectObjectID,
java.lang.String referenceObjectID,
float maxDistance)
throws NotRegisteredException,
UnknownConceptException
SpatialQuery
findObjectsInRelationReferencedBy in interface SpatialQueryrelationNames - - URIs in the OWL ontology file(s) to the relation definition, for instance further-left, less-down, etc.subjectObjectID - - id of the subject objectmaxDistance - - maximum distance of the search
NotRegisteredException - when the objects are not registered in spatial database
UnknownConceptException - when the spatial relation is unknown
public java.util.Vector findSpatialRelationsBetween(java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
throws NotRegisteredException
SpatialQuery
findSpatialRelationsBetween in interface SpatialQuerysubjectObjectID - - id of the subject objectrelatedObjectID - - id of the related object
NotRegisteredException - when the objects are not registered in spatial database
public java.util.Vector findSpatialRelationsReferencedBy(java.lang.String subjectObjectID,
java.lang.String relatedObjectID,
java.lang.String referencedObjectID)
throws NotRegisteredException
SpatialQuery
findSpatialRelationsReferencedBy in interface SpatialQuerysubjectObjectID - - id of the subject objectrelatedObjectID - - id of the related objectreferencedObjectID - - id of the reference object
NotRegisteredException - when the objects are not registered in the spatial database
public java.util.Vector<Location3D> findSpecificSideOfObject(java.lang.String objectID,
java.lang.String sideOrientation)
throws NotRegisteredException
SpatialQuery
findSpecificSideOfObject in interface SpatialQueryobjectID - - id of the objectsideOrientation - - the orientation of the searched side
return VectorNotRegisteredException - when the object is not registered in the spatial database
public java.util.Vector<Location3D> findLocationReferencedBy(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String referenceObjectID,
double distance)
throws NotRegisteredException,
UnknownConceptException
SpatialQuery
findLocationReferencedBy in interface SpatialQueryrelationName - - URI of relation definition, for instance left, behind, etc.subjectObjectID - - id of the subject objectdistance - - the distance of the object outside
NotRegisteredException - when the objects are not registered in spatial database
UnknownConceptException - when the spatial relation is unknown
public boolean testSpatialRelationBetween(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
throws NotRegisteredException,
UnknownConceptException
SpatialQuery
testSpatialRelationBetween in interface SpatialQueryrelationName - - URI in the OWL ontology file to the relation definition to be tested, for instance: inside, on-the-left, etc.subjectObjectID - - id of the subject objectrelatedObjectID - - id of the related object
NotRegisteredException - when the objects are not registered in spatial database
UnknownConceptException - when the spatial relation is unknown
public boolean testSpatialRelationsReferencedBy(java.lang.String relationName,
java.lang.String relatedObjectID,
java.lang.String subjectObjectID,
java.lang.String referencedObjectID)
throws NotRegisteredException,
UnknownConceptException
SpatialQuery
testSpatialRelationsReferencedBy in interface SpatialQueryrelationName - - URI in the OWL ontology file to the relation definition to be tested, for instance further-left, less-down, etc.relatedObjectID - - id of the related objectsubjectObjectID - - id of the subject objectreferencedObjectID - - id of the referenced object
NotRegisteredException - when the objects are not registered in spatial database
UnknownConceptException - when the spatial relation is unknown
public double getValueOfOrientationRelation(java.lang.String relationName,
java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
throws NotRegisteredException,
UnknownConceptException,
UnsatisfiedOrientationRelation
SpatialQuery
getValueOfOrientationRelation in interface SpatialQueryrelationName - - URI in the OWL ontology file to the relation definition, for instance left, down, etc.subjectObjectID - - id of the subject objectrelatedObjectID - - id of the related object
NotRegisteredException - when the subject is not registered in the spatial database
UnknownConceptException - when the spatial relation is unknown
UnsatisfiedOrientationRelation
public double getDistanceBetween(java.lang.String subjectObjectID,
java.lang.String relatedObjectID)
throws NotRegisteredException
SpatialQuery
getDistanceBetween in interface SpatialQuerysubjectObjectID - - id of the subject objectrelatedObjectID - - id of the related object
NotRegisteredException - when the subject is not registered in the spatial databasepublic java.util.Vector<SpatialObject> getAllSpatialObjects()
SpatialDatabase
getAllSpatialObjects in interface SpatialDatabase
public SpatialObject getSpatialObject(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getSpatialObject in interface SpatialDatabaseobjectID - - id of the object
NotRegisteredException - when the object is not registered in the spatial database
public java.util.Set getObjectOntologicalTypes(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getObjectOntologicalTypes in interface SpatialDatabaseobjectID - - id of the object
NotRegisteredException - when the object is not registered in the spatial database
public Location3D getObjectLocation(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getObjectLocation in interface SpatialDatabaseobjectID - - id of the object
return @see Location3D - object containg location coordinates as xyz
NotRegisteredException - when the object is not registered in the spatial database
public Orientation3D getObjectOrientation(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getObjectOrientation in interface SpatialDatabaseobjectID - - id of the object
return @see Orientation3D - object containg orientation as xyz radiuses
NotRegisteredException - when the object is not registered in the spatial database
public Block3D getOccupiedSpace(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getOccupiedSpace in interface SpatialDatabaseobjectID - - 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 database
public java.util.Vector<Location3D> getBoundingPoints(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getBoundingPoints in interface SpatialDatabaseobjectID - - 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 database
public java.util.Vector findUsingAlternativeName(java.lang.String objectAlternativeName)
throws NotRegisteredException
SpatialDatabase
findUsingAlternativeName in interface SpatialDatabaseobjectAlternativeName - - the alternative name of the object
return Vector - id of the found object
NotRegisteredException - when the object is not registered in the spatial database
public java.util.Vector getAlternativeNames(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
getAlternativeNames in interface SpatialDatabaseobjectID - - id of the updated object
return Vector - the alternative names of the object
NotRegisteredException - when the object is not registered in the spatial database
public void registerSpatialObject(java.lang.String objectID,
java.util.Set objectOntologyTypes,
Location3D objectLocation,
Orientation3D objectOrientation,
Block3D objectOccupedSpace)
throws AlreadyRegisteredException
SpatialDatabase
registerSpatialObject in interface SpatialDatabaseobjectID - - 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 database
public void registerSpatialObject(java.lang.String objectID,
java.util.Set objectOntologyType,
Orientation3D objectOrientation,
java.util.Vector<Location3D> boundingPoints)
throws AlreadyRegisteredException
SpatialDatabase
registerSpatialObject in interface SpatialDatabaseobjectID - - 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 database
public void deregisterSpatialObject(java.lang.String objectID)
throws NotRegisteredException
SpatialDatabase
deregisterSpatialObject in interface SpatialDatabaseobjectID - 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 SpatialDatabaseobjectID - - 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 database
public void updateSpatialObject(java.lang.String objectID,
Orientation3D objectOrientation,
java.util.Vector<Location3D> boundingPoints)
throws NotRegisteredException
SpatialDatabase
updateSpatialObject in interface SpatialDatabaseobjectID - - 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 database
public void setAlternativeName(java.lang.String objectID,
java.lang.String objectAlternativeName)
throws NotRegisteredException
SpatialDatabase
setAlternativeName in interface SpatialDatabaseobjectID - - id of the updated objectobjectAlternativeName - - the alternative name of the object
NotRegisteredException - when the object is not registered in the spatial databaseprotected void initVars()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||