Package eu.clarin.weblicht.wlfxb.tc.xb
Class SentencesLayerStored
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusLayerStoredAbstract
-
- eu.clarin.weblicht.wlfxb.tc.xb.SentencesLayerStored
-
- All Implemented Interfaces:
SentencesLayer,TextCorpusLayer
public class SentencesLayerStored extends TextCorpusLayerStoredAbstract implements SentencesLayer
- Author:
- Yana Panchenko
-
-
Field Summary
Fields Modifier and Type Field Description protected BooleancharOffsetsprotected List<SentenceStored>sentencesstatic StringXML_NAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedSentencesLayerStored()protectedSentencesLayerStored(TextCorpusLayersConnector connector)protectedSentencesLayerStored(Boolean hasCharOffsets)
-
Method Summary
Modifier and Type Method Description SentenceaddSentence(List<Token> sentenceTokens)SentenceaddSentence(List<Token> sentenceTokens, int start, int end)SentenceaddSentence(List<Token> sentenceTokens, Integer start, Integer end)protected voidbeforeMarshal(Marshaller m)SentencegetSentence(int index)SentencegetSentence(Token token)Token[]getTokens(Sentence sentence)booleanhasCharOffsets()booleanisEmpty()protected voidsetLayersConnector(TextCorpusLayersConnector connector)Should not be used directly by users.intsize()StringtoString()
-
-
-
Field Detail
-
XML_NAME
public static final String XML_NAME
- See Also:
- Constant Field Values
-
sentences
protected List<SentenceStored> sentences
-
charOffsets
protected Boolean charOffsets
-
-
Constructor Detail
-
SentencesLayerStored
protected SentencesLayerStored()
-
SentencesLayerStored
protected SentencesLayerStored(Boolean hasCharOffsets)
-
SentencesLayerStored
protected SentencesLayerStored(TextCorpusLayersConnector connector)
-
-
Method Detail
-
setLayersConnector
protected void setLayersConnector(TextCorpusLayersConnector connector)
Description copied from class:TextCorpusLayerStoredAbstractShould not be used directly by users. Should be extended by all implementations of TextCorpusLayers, as they might depend on other layers and therefore be able to get referenced/referencing information.- Specified by:
setLayersConnectorin classTextCorpusLayerStoredAbstract
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceTextCorpusLayer
-
size
public int size()
- Specified by:
sizein interfaceTextCorpusLayer
-
hasCharOffsets
public boolean hasCharOffsets()
- Specified by:
hasCharOffsetsin interfaceSentencesLayer
-
getSentence
public Sentence getSentence(int index)
- Specified by:
getSentencein interfaceSentencesLayer
-
getSentence
public Sentence getSentence(Token token)
- Specified by:
getSentencein interfaceSentencesLayer
-
getTokens
public Token[] getTokens(Sentence sentence)
- Specified by:
getTokensin interfaceSentencesLayer
-
addSentence
public Sentence addSentence(List<Token> sentenceTokens)
- Specified by:
addSentencein interfaceSentencesLayer
-
addSentence
public Sentence addSentence(List<Token> sentenceTokens, int start, int end)
- Specified by:
addSentencein interfaceSentencesLayer
-
beforeMarshal
protected void beforeMarshal(Marshaller m)
-
-