|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.ArrayList
gate.corpora.RepositioningInfo
public class RepositioningInfo
RepositioningInfo keep information about correspondence of positions between the original and extracted document content. With this information this class could be used for computing of this correspondence in the strict way (return -1 where is no correspondence) or in "flow" way (return near computable position)
Nested Class Summary | |
---|---|
class |
RepositioningInfo.PositionInfo
Just information keeper inner class. |
Field Summary |
---|
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
RepositioningInfo()
Default constructor |
Method Summary | |
---|---|
void |
addPositionInfo(long origPos,
long origLength,
long currPos,
long currLength)
Create a new position information record. |
void |
correctInformation(long originalPos,
long origLen,
long newLen)
Correct the RepositioningInfo structure for shrink/expand changes. |
void |
correctInformationOriginalMove(long originalPos,
long moveLen)
Correct the original position information in the records. |
long |
getExtractedPos(long absPos)
Compute position in extracted content by position in the original content. |
long |
getExtractedPosFlow(long absPos)
Not finished yet |
int |
getIndexByOriginalPosition(long absPos)
Return the position info index containing @param absPos If there is no such position info return -1. |
int |
getIndexByOriginalPositionFlow(long absPos)
Return the position info index containing @param absPos or the index of record before this position. |
long |
getOriginalPos(long relPos)
|
long |
getOriginalPos(long relPos,
boolean afterChar)
Compute position in original content by position in the extracted content. |
long |
getOriginalPosFlow(long relPos)
Not finished yet |
Methods inherited from class java.util.ArrayList |
---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
equals, hashCode, iterator, listIterator, listIterator, subList |
Methods inherited from class java.util.AbstractCollection |
---|
containsAll, removeAll, retainAll, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList |
Constructor Detail |
---|
public RepositioningInfo()
Method Detail |
---|
public void addPositionInfo(long origPos, long origLength, long currPos, long currLength)
public long getExtractedPos(long absPos)
public long getOriginalPos(long relPos)
public long getOriginalPos(long relPos, boolean afterChar)
public long getExtractedPosFlow(long absPos)
public long getOriginalPosFlow(long relPos)
public int getIndexByOriginalPosition(long absPos)
public int getIndexByOriginalPositionFlow(long absPos)
public void correctInformation(long originalPos, long origLen, long newLen)
m_currPos -= origLen - newLen;
originalPos
- Position of changed text in the original content.origLen
- Length of changed peace of text in the original content.newLen
- Length of new peace of text substiting the original peace.public void correctInformationOriginalMove(long originalPos, long moveLen)
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |