Class MatchId


  • public class MatchId
    extends Object
    Interpreter for match ID strings.

    The schema is:

    • when there's a defining annotation UID:
      g_ag_id;uid
      e.g. g_243;em_12_20035
    • when there's anchor IDs:
      g_ag_id;startuid-enduid
      e.g. g_243;n_72700-n_72709
    • when there's anchor offsets:
      g_ag_id;startoffset-endoffset
      e.g. g_243;39.400-46.279
    • when there's a participant/speaker number, it will be appended:
      ...;p_speakernumber
      e.g. g_243;n_72700-n_72709;p_76
    • a target annotation by appending a uid prefixed by #=:
      ...;#=uid
      e.g. g_243;n_72700-n_72709;#=ew_0_123
    • other items (search name or prefix) could then come after all that, and key=value pairs:
      ...;key=value
      e.g. g_243;n_72700-n_72709;ew_0_123-ew_0_234;prefix=024-;name=the_aeiou

    These can be something like:

    • g_3;em_11_23;n_19985-n_20003;p_4;#=ew_0_12611;prefix=001-;[0]=ew_0_12611
    • AgnesShacklock-01.trs;60.897-67.922;prefix=001-
    • AgnesShacklock-01.trs;60.897-67.922;m_-1_23-
    Author:
    Robert Fromont robert@fromont.net.nz
    • Constructor Detail

      • MatchId

        public MatchId()
        Default constructor.
      • MatchId

        public MatchId​(String matchId)
        String constructor.
        Parameters:
        matchId - An composite ID that identifies the match.
      • MatchId

        public MatchId​(Match match)
        Constructor.
        Parameters:
        match - An ID that identifies the match.
    • Method Detail

      • getTranscriptId

        public String getTranscriptId()
        Getter for transcriptId: The transcript identifier.
        Returns:
        The transcript identifier.
      • getStartAnchorId

        public String getStartAnchorId()
        Getter for startAnchorId: ID of the start anchor.
        Returns:
        ID of the start anchor.
      • getEndAnchorId

        public String getEndAnchorId()
        Getter for endAnchorId: ID of the end anchor.
        Returns:
        ID of the end anchor.
      • getStartOffset

        public Double getStartOffset()
        Getter for startOffset: Offset of the start anchor.
        Returns:
        Offset of the start anchor.
      • getEndOffset

        public Double getEndOffset()
        Getter for endOffset: Offset of the end anchor.
        Returns:
        Offset of the end anchor.
      • getUtteranceId

        public String getUtteranceId()
        Getter for utteranceId: ID of the match utterance.
        Returns:
        ID of the match utterance.
      • getTargetId

        public String getTargetId()
        Getter for targetId: ID of the match target annotation.
        Returns:
        ID of the match target annotation.
      • getPrefix

        public String getPrefix()
        Getter for prefix: Match prefix for fragments.
        Returns:
        Match prefix for fragments.
      • getAttributes

        public Map<String,​String> getAttributes()
        Getter for attributes: Other attributes in the MatchId.
        Returns:
        Other attributes in the MatchId.
      • parseId

        public MatchId parseId​(String matchId)
        Parses the given match ID string.
        Parameters:
        matchId - The composite string ID that identifies the match.
        Returns:
        A reference to this object.