Package nzilbb.labbcat.server.db
Class IdMatch
- java.lang.Object
-
- nzilbb.labbcat.server.db.IdUtterance
-
- nzilbb.labbcat.server.db.IdMatch
-
public class IdMatch extends IdUtterance
A serializer/deserializer which can be used to generate or interpret a String ID for a search results match.This is a subclass of
IdUtterance
, using the same schema for IDs, with the following extensions:-
matching subparts can be identified by appending a list of annotation UIDs
for insertion into
matchAnnotationUids
, the keys being enclosed in square brackets:
...;[key]=uid;[key]=uid
e.g. g_243;n_72700-n_72709;[0,0]=ew_0_123;[1,0]ew_0_234 -
a target annotation by appending a uid prefixed by #=:
...;#=uid
e.g. g_243;n_72700-n_72709;#=ew_0_123
- Author:
- Robert Fromont robert@fromont.net.nz
-
matching subparts can be identified by appending a list of annotation UIDs
for insertion into
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IdMatch
addMatchAnnotationUid(String key, String uid)
Adds a single match UID tomatchAnnotationUids
.boolean
equals(Object o)
Determines whether another IMatch is equal to this one.String
getId()
Generates an identifier for this utterance.Map<String,String>
getMatchAnnotationUids()
Getter formatchAnnotationUids
: A map of keys to annotation UIDs that identify the annotations that matched the query.String
getTargetAnnotationUid()
The UID of the targeted annotation, which may or may not be listed inmatchAnnotationUids
.int
hashCode()
Deprecated.void
setId(String sId)
Sets the utterance's attributes using the given identifier.IdMatch
setTargetAnnotationUid(String newTargetAnnotationUid)
The UID of the targeted annotation, which may or may not be listed inmatchAnnotationUids
.-
Methods inherited from class nzilbb.labbcat.server.db.IdUtterance
getAttributes, getDefiningAnnotationUid, getEndAnchorId, getEndOffset, getGraphId, getPrefix, getSpeakerNumber, getStartAnchorId, getStartOffset, setDefiningAnnotationUid, setEndAnchorId, setEndOffset, setGraphId, setPrefix, setSpeakerNumber, setStartAnchorId, setStartOffset, toString
-
-
-
-
Method Detail
-
getMatchAnnotationUids
public Map<String,String> getMatchAnnotationUids()
Getter formatchAnnotationUids
: A map of keys to annotation UIDs that identify the annotations that matched the query. The keys identify which part of the query was matched.- Returns:
- A map of keys to annotation UIDs that identify the annotations that matched the query. The keys identify which part of the query was matched.
-
getTargetAnnotationUid
public String getTargetAnnotationUid()
The UID of the targeted annotation, which may or may not be listed inmatchAnnotationUids
.- Returns:
- The UID of the targeted annotation, which may or may not be listed in
matchAnnotationUids
.
-
setTargetAnnotationUid
public IdMatch setTargetAnnotationUid(String newTargetAnnotationUid)
The UID of the targeted annotation, which may or may not be listed inmatchAnnotationUids
.- Parameters:
newTargetAnnotationUid
- The UID of the targeted annotation, which may or may not be listed inmatchAnnotationUids
.
-
addMatchAnnotationUid
public IdMatch addMatchAnnotationUid(String key, String uid)
Adds a single match UID tomatchAnnotationUids
.- Parameters:
key
-uid
-- Returns:
- This object.
-
setId
public void setId(String sId)
Sets the utterance's attributes using the given identifier.- Overrides:
setId
in classIdUtterance
- Parameters:
sId
-
-
getId
public String getId()
Generates an identifier for this utterance.- Overrides:
getId
in classIdUtterance
- Returns:
- A uniformly-formatted identifier for this utterance.
-
equals
public boolean equals(Object o)
Determines whether another IMatch is equal to this one.- Overrides:
equals
in classIdUtterance
- Parameters:
o
- The other object to compare to.- Returns:
- true if the critical attributes match, false otherwise.
-
hashCode
@Deprecated public int hashCode()
Deprecated.Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
-
-