org.security.session.manager.helpers
Class LocationTreeWrapper

Package class diagram package LocationTreeWrapper
java.lang.Object
  extended by org.security.session.manager.helpers.LocationTreeWrapper
Direct Known Subclasses:
UserLocationTree

public class LocationTreeWrapper
extends Object

Some Utility tools missing from the ontology. This class gives a utility model of the Location tree represented by the Location instances. It relies on the data they have, and creates no more information.

Author:
amedrano

Field Summary
protected  Location loc
           
 
Constructor Summary
LocationTreeWrapper(Location l)
          Constructor.
 
Method Summary
 boolean equals(LocationTreeWrapper obj)
          
 Set<LocationTreeWrapper> getChildren()
          Get all children of the Location represented buy this node.
 Location getLocation()
           
 LocationTreeWrapper getParent()
          Get the parent Location of the represented Location in LocationTreeWrapper form.
 LocationTreeWrapper getRoot()
          Get the most generic Location reachable from the Location represented.
 boolean isRoot()
          Check if there are no parents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loc

protected Location loc
Constructor Detail

LocationTreeWrapper

public LocationTreeWrapper(Location l)
Constructor. Model the given Location.

Parameters:
l - the location to be extended.
Method Detail

getLocation

public Location getLocation()
Returns:
The location linked to this element.

getChildren

public Set<LocationTreeWrapper> getChildren()
Get all children of the Location represented buy this node.

Returns:
The children in LocationTreeWrapper form.

getParent

public LocationTreeWrapper getParent()
Get the parent Location of the represented Location in LocationTreeWrapper form.

Returns:
the Parent node, or null if no parent is defined.

getRoot

public LocationTreeWrapper getRoot()
Get the most generic Location reachable from the Location represented.

Returns:
the tree root.

isRoot

public boolean isRoot()
Check if there are no parents. If they are not any parents then this must be the root node of the Location tree.

Returns:

equals

public boolean equals(LocationTreeWrapper obj)



Copyright © 2014 universAAL Consortium. All Rights Reserved.