GATE
Version 3.1-2270

gate.creole.gazetteer
Class NodePosition

java.lang.Object
  extended by gate.creole.gazetteer.NodePosition

public class NodePosition
extends Object

Title: NodePosition.java

Description: This class is used to store the information about the changes in the text and the addition or the substraction of the spaces. It is used by FlexibleGazetteer.

Version:
1.0
Author:
Niraj Aswani

Constructor Summary
NodePosition()
          Constructor
NodePosition(long osn, long oen, long nsn, long nen, long space)
          constructor
 
Method Summary
 long getDeductedSpaces()
          Returns the total deducted spaces
 long getNewEndNode()
          Returns the new end offset
 long getNewStartNode()
          Returns new start offset
 long getOldEndNode()
          Returns the old end offset
 long getOldStartNode()
          Returns the old start offset
 void setDeductedSpaces(long space)
          Sets the deducted spaces
 void setNewEndNode(long node)
          Sets the new end offset
 void setNewStartNode(long node)
          sets the new start offset
 void setOldEndNode(long node)
          Sets the old end offset
 void setOldStartNode(long node)
          Sets the old start offset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodePosition

public NodePosition()
Constructor


NodePosition

public NodePosition(long osn,
                    long oen,
                    long nsn,
                    long nen,
                    long space)
constructor

Parameters:
osn - - old start offset
oen - - old end offset
nsn - - new start offset
nen - - new end offset
space - - total deducted spaces due to change in the text before the start offset in the document
Method Detail

getOldStartNode

public long getOldStartNode()
Returns the old start offset

Returns:
a long value.

getOldEndNode

public long getOldEndNode()
Returns the old end offset

Returns:
a long value.

getNewStartNode

public long getNewStartNode()
Returns new start offset

Returns:
a long value.

getNewEndNode

public long getNewEndNode()
Returns the new end offset

Returns:
a long value.

setOldStartNode

public void setOldStartNode(long node)
Sets the old start offset

Parameters:
node -

setOldEndNode

public void setOldEndNode(long node)
Sets the old end offset

Parameters:
node -

setNewStartNode

public void setNewStartNode(long node)
sets the new start offset

Parameters:
node -

setNewEndNode

public void setNewEndNode(long node)
Sets the new end offset

Parameters:
node -

setDeductedSpaces

public void setDeductedSpaces(long space)
Sets the deducted spaces

Parameters:
space -

getDeductedSpaces

public long getDeductedSpaces()
Returns the total deducted spaces

Returns:
a long value.

GATE
Version 3.1-2270