Package nzilbb.labbcat.server.search
Class Column
- java.lang.Object
-
- nzilbb.labbcat.server.search.Column
-
- All Implemented Interfaces:
nzilbb.util.CloneableBean
public class Column extends Object implements nzilbb.util.CloneableBean
One column in a search matrix, containing patterns matching one word token.
-
-
Constructor Summary
Constructors Constructor Description Column()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Column
addLayerMatch(LayerMatch layerPattern)
Convenience builder-pattern method for adding a layer pattern.nzilbb.util.CloneableBean
fromJson(javax.json.JsonObject json)
Initializes the bean with the given JSON representation.int
getAdj()
Getter foradj
: Adjecency; how far matches of the following column in the matrix can be from matches of this column.LayerMatch
getFirstLayerMatch(String layerId)
Gets the first match for the given layer, if any.Map<String,List<LayerMatch>>
getLayers()
Getter forlayers
: The layer patterns that match a word token.Column
setAdj(int newAdj)
Setter foradj
: Adjecency; how far matches of the following column in the matrix can be from matches of this column.Column
setLayers(Map<String,List<LayerMatch>> newLayers)
Setter forlayers
: The layer patterns that match a word token.String
toString()
Returns the JSON serialization of this column.
-
-
-
Method Detail
-
getLayers
@ClonedProperty public Map<String,List<LayerMatch>> getLayers()
Getter forlayers
: The layer patterns that match a word token. Keys are layer IDs.Generally there will be one
LayerMatch
per layer in a column, but for word-internal segment context matching, there may be more than one, corresponding to multiple sequential segments within the word.- Returns:
- The layer patterns that match a word token.
-
setLayers
public Column setLayers(Map<String,List<LayerMatch>> newLayers)
Setter forlayers
: The layer patterns that match a word token. Keys are layer IDs.Generally there will be one
LayerMatch
per layer in a column, but for word-internal segment context matching, there may be more than one, corresponding to multiple sequential segments within the word.- Parameters:
newLayers
- The layer patterns that match a word token.
-
getAdj
@ClonedProperty public int getAdj()
Getter foradj
: Adjecency; how far matches of the following column in the matrix can be from matches of this column. 1 means it must immediately follow, 2 means there can be one intervening token, etc.- Returns:
- Adjecency; how far matches of the following column in the matrix can be from matches of this column.
-
setAdj
public Column setAdj(int newAdj)
Setter foradj
: Adjecency; how far matches of the following column in the matrix can be from matches of this column. 1 means it must immediately follow, 2 means there can be one intervening token, etc.- Parameters:
newAdj
- Adjecency; how far matches of the following column in the matrix can be from matches of this column.
-
addLayerMatch
public Column addLayerMatch(LayerMatch layerPattern)
Convenience builder-pattern method for adding a layer pattern.- Parameters:
layerPattern
-- Returns:
- This column.
-
getFirstLayerMatch
public LayerMatch getFirstLayerMatch(String layerId)
Gets the first match for the given layer, if any.- Parameters:
layerId
-- Returns:
- The first match for the given layer, or null if there is none.
-
fromJson
public nzilbb.util.CloneableBean fromJson(javax.json.JsonObject json)
Initializes the bean with the given JSON representation.- Specified by:
fromJson
in interfacenzilbb.util.CloneableBean
- Parameters:
json
-- Returns:
- A reference to this object.
-
-