|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectIndexBlock
@ThreadRestricted final class IndexBlock
Maps between clip indeces and g-indeces.
Nested Class Summary | |
---|---|
(package private) static class |
IndexBlock.SourceParse
Parser results... |
Constructor Summary | |
---|---|
IndexBlock(long clipIndex0,
int size,
File sourceDocumentFile)
Creates an IndexBlock. |
Method Summary | |
---|---|
(package private) long |
clipIndex0()
The leading clip-index of this block. |
(package private) long |
clipIndexOf(int gIndex)
|
int |
compareTo(IndexBlock other)
Compares based on clipIndex0. |
boolean |
equals(Object o)
Returns true iff o is an index block with the same clipIndex0. |
(package private) int |
gIndexOf(long clipIndex)
|
(package private) int |
size()
Capacity of this block, in terms of unique clip indeces it can map. |
(package private) File |
sourceDocumentFile()
Cached copy of the transfer source document. |
(package private) IndexBlock.SourceParse |
sourceParse(DOMImplementationLS domLS,
LSParser parser,
StringBuilder b,
UUIDStringifier uuidStringifier)
Returns parser results for the document, and caches them for later calls. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
IndexBlock(long clipIndex0, int size, File sourceDocumentFile)
clipIndex0
- per clipIndex0()size
- per size()sourceDocumentFile
- per sourceDocumentFile()Method Detail |
---|
long clipIndex0()
long clipIndexOf(int gIndex)
gIndex
- of a gene of the document
int gIndexOf(long clipIndex)
clipIndex
- of a clip gene
int size()
File sourceDocumentFile()
Since index blocks are used for multiple soure document versions, the source document may include changes made since the clip-gene was originally created, when the transfer was initiated. Using it to complete the transfer (carrying meta-data over to the target, etc.) may lead to postive ancestry errors (over-attribution), and the appearance that transfer occured from the later version of the soure.
This anachronism could be corrected at the cost of increased storage space, and longer clip indeces in the text; or of more complicated code. But its consequences are mild. Usually the anomaly will be rare, especially if replacement is not over-delayed. However, when a transfer is made from an older version of a document, while a newer one is still in the cache, even immediate replacement will not help.
IndexBlock.SourceParse sourceParse(DOMImplementationLS domLS, LSParser parser, StringBuilder b, UUIDStringifier uuidStringifier) throws IOException, TextbenderException
domLS
- DOM implementation to useparser
- parser to useb
- string builder to use, overwriting its existing contentuuidStringifier
- UUID stringifier to use
TextbenderException
- if document cannot be parsed
IOException
public int compareTo(IndexBlock other)
compareTo
in interface Comparable<IndexBlock>
equals(Object)
public boolean equals(Object o)
equals
in class Object
compareTo(IndexBlock)
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |