Package eu.clarin.weblicht.wlfxb.tc.xb
Class TextStructureLayerStored
- java.lang.Object
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextCorpusLayerStoredAbstract
-
- eu.clarin.weblicht.wlfxb.tc.xb.TextStructureLayerStored
-
- All Implemented Interfaces:
TextCorpusLayer
,TextStructureLayer
public class TextStructureLayerStored extends TextCorpusLayerStoredAbstract implements TextStructureLayer
- Author:
- Yana Panchenko
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TextStructureLayerStored()
protected
TextStructureLayerStored(TextCorpusLayersConnector connector)
-
Method Summary
Modifier and Type Method Description TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type)
TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar)
TextSpan
addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type, int startChar, int endChar)
TextSpan
addSpan(Token spanStart, Token spanEnd, String type, String value)
TextSpan
getSpan(int index)
TextSpan
getSpan(Token token, String type)
List<TextSpan>
getSpans(Token token)
List<TextSpan>
getSpans(String type)
Token[]
getTokens(TextSpan span)
boolean
isEmpty()
protected void
setLayersConnector(TextCorpusLayersConnector connector)
Should not be used directly by users.int
size()
String
toString()
-
-
-
Field Detail
-
XML_NAME
public static final String XML_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextStructureLayerStored
protected TextStructureLayerStored()
-
TextStructureLayerStored
protected TextStructureLayerStored(TextCorpusLayersConnector connector)
-
-
Method Detail
-
setLayersConnector
protected void setLayersConnector(TextCorpusLayersConnector connector)
Description copied from class:TextCorpusLayerStoredAbstract
Should 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:
setLayersConnector
in classTextCorpusLayerStoredAbstract
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceTextCorpusLayer
-
size
public int size()
- Specified by:
size
in interfaceTextCorpusLayer
-
getSpan
public TextSpan getSpan(int index)
- Specified by:
getSpan
in interfaceTextStructureLayer
-
getSpans
public List<TextSpan> getSpans(Token token)
- Specified by:
getSpans
in interfaceTextStructureLayer
-
getSpan
public TextSpan getSpan(Token token, String type)
- Specified by:
getSpan
in interfaceTextStructureLayer
-
getSpans
public List<TextSpan> getSpans(String type)
- Specified by:
getSpans
in interfaceTextStructureLayer
-
getTokens
public Token[] getTokens(TextSpan span)
- Specified by:
getTokens
in interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type)
- Specified by:
addSpan
in interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type, int startChar, int endChar)
- Specified by:
addSpan
in interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type, String value)
- Specified by:
addSpan
in interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type) throws WLFormatException
- Specified by:
addSpan
in interfaceTextStructureLayer
- Throws:
WLFormatException
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar) throws WLFormatException
- Specified by:
addSpan
in interfaceTextStructureLayer
- Throws:
WLFormatException
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value) throws WLFormatException
- Specified by:
addSpan
in interfaceTextStructureLayer
- Throws:
WLFormatException
-
-