Class Node
- Object
-
- Node
-
- Direct Known Subclasses:
FileSystemNode
public class Node extends Object
- Author:
- Tommaso Nolli
-
-
Field Summary
Fields Modifier and Type Field Description protected int
numShapesId
protected int[]
shapesId
protected List<Node>
subNodes
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addShapeId(int id)
Add a shape idvoid
addSubNode(Node node)
void
clean()
To be used only against in memory nodes, allows to start over on rebuilding this nodevoid
clearSubNodes()
void
close()
Clears up whatever resources the node is hanging ontoNode
copy()
Envelope
getBounds()
int
getNumShapeIds()
int
getNumSubNodes()
int
getShapeId(int pos)
Gets a shape idint[]
getShapesId()
Node
getSubNode(int pos)
Gets the Node at the requested positionboolean
isChildrenVisited()
boolean
isVisited()
void
pack()
boolean
removeSubNode(Node node)
Removes a subnodevoid
setBounds(Envelope bounds)
void
setChildrenVisited(boolean childrenVisited)
void
setShapesId(int[] ids)
Sets the shape idsvoid
setShapesId(Node other)
void
setVisited(boolean visited)
-
-
-
Constructor Detail
-
Node
public Node(Envelope bounds)
-
-
Method Detail
-
getBounds
public Envelope getBounds()
- Returns:
- Returns the bounds.
-
setBounds
public void setBounds(Envelope bounds)
- Parameters:
bounds
- The bounds to set.
-
getNumSubNodes
public int getNumSubNodes()
- Returns:
- Returns the numSubNodes.
-
getNumShapeIds
public int getNumShapeIds()
- Returns:
- Returns the number of records stored.
-
addSubNode
public void addSubNode(Node node)
- Parameters:
node
-
-
removeSubNode
public boolean removeSubNode(Node node)
Removes a subnode- Parameters:
node
- The subnode to remove- Returns:
- true if the subnode has been removed
-
clearSubNodes
public void clearSubNodes()
-
getSubNode
public Node getSubNode(int pos) throws StoreException
Gets the Node at the requested position- Parameters:
pos
- The position- Returns:
- A Node
- Throws:
StoreException
-
addShapeId
public void addShapeId(int id)
Add a shape id
-
getShapeId
public int getShapeId(int pos)
Gets a shape id- Parameters:
pos
- The position- Returns:
- The shape id (or recno) at the requested position
-
setShapesId
public void setShapesId(int[] ids)
Sets the shape ids
-
setShapesId
public void setShapesId(Node other)
-
getShapesId
public int[] getShapesId()
- Returns:
- Returns the shapesId.
-
isVisited
public boolean isVisited()
-
setVisited
public void setVisited(boolean visited)
-
isChildrenVisited
public boolean isChildrenVisited()
-
setChildrenVisited
public void setChildrenVisited(boolean childrenVisited)
-
copy
public Node copy() throws IOException
- Throws:
IOException
-
close
public void close()
Clears up whatever resources the node is hanging onto
-
clean
public void clean()
To be used only against in memory nodes, allows to start over on rebuilding this node
-
pack
public void pack()
-
-