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 protectedTextStructureLayerStored()protectedTextStructureLayerStored(TextCorpusLayersConnector connector)
-
Method Summary
Modifier and Type Method Description TextSpanaddSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type)TextSpanaddSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar)TextSpanaddSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value)TextSpanaddSpan(Token spanStart, Token spanEnd, String type)TextSpanaddSpan(Token spanStart, Token spanEnd, String type, int startChar, int endChar)TextSpanaddSpan(Token spanStart, Token spanEnd, String type, String value)TextSpangetSpan(int index)TextSpangetSpan(Token token, String type)List<TextSpan>getSpans(Token token)List<TextSpan>getSpans(String type)Token[]getTokens(TextSpan span)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
-
-
Constructor Detail
-
TextStructureLayerStored
protected TextStructureLayerStored()
-
TextStructureLayerStored
protected TextStructureLayerStored(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
-
getSpan
public TextSpan getSpan(int index)
- Specified by:
getSpanin interfaceTextStructureLayer
-
getSpans
public List<TextSpan> getSpans(Token token)
- Specified by:
getSpansin interfaceTextStructureLayer
-
getSpan
public TextSpan getSpan(Token token, String type)
- Specified by:
getSpanin interfaceTextStructureLayer
-
getSpans
public List<TextSpan> getSpans(String type)
- Specified by:
getSpansin interfaceTextStructureLayer
-
getTokens
public Token[] getTokens(TextSpan span)
- Specified by:
getTokensin interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type)
- Specified by:
addSpanin interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type, int startChar, int endChar)
- Specified by:
addSpanin interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(Token spanStart, Token spanEnd, String type, String value)
- Specified by:
addSpanin interfaceTextStructureLayer
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type) throws WLFormatException
- Specified by:
addSpanin interfaceTextStructureLayer- Throws:
WLFormatException
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, int startChar, int endChar) throws WLFormatException
- Specified by:
addSpanin interfaceTextStructureLayer- Throws:
WLFormatException
-
addSpan
public TextSpan addSpan(TextSpan parentSpan, Token spanStart, Token spanEnd, String type, String value) throws WLFormatException
- Specified by:
addSpanin interfaceTextStructureLayer- Throws:
WLFormatException
-
-