Package ca.phon.ipa

Class PhonexMatcherReference

java.lang.Object
ca.phon.ipa.IPAElement
ca.phon.ipa.PhonexMatcherReference
All Implemented Interfaces:
IExtendable, CombiningDiacritics, PrefixDiacritics, SuffixDiacritics, Visitable<IPAElement>

public class PhonexMatcherReference extends IPAElement implements PrefixDiacritics, SuffixDiacritics, CombiningDiacritics
A special type of IPAElement which represents a reference to a phonex group. This is used during phonex replacement only.
  • Constructor Details

    • PhonexMatcherReference

      public PhonexMatcherReference(Integer groupIndex)
    • PhonexMatcherReference

      public PhonexMatcherReference(String groupName)
  • Method Details

    • getGroupIndex

      public int getGroupIndex()
    • getGroupName

      public String getGroupName()
    • getPrefixDiacritics

      public Diacritic[] getPrefixDiacritics()
      Specified by:
      getPrefixDiacritics in interface PrefixDiacritics
    • setPrefixDiacritics

      public void setPrefixDiacritics(Diacritic[] prefixDiacritics)
      Set the prefix diacritics for this Phone.
      Parameters:
      prefixDiacritics -
    • getPrefix

      public String getPrefix()
      Get the string representing this phone's prefix.
      Returns:
    • getCombiningDiacritics

      public Diacritic[] getCombiningDiacritics()

      Get the combining diacritics for the phone.

      Specified by:
      getCombiningDiacritics in interface CombiningDiacritics
      Returns:
      the combining diacritics, or an empty array if no combining diacritics are available.
    • setCombiningDiacritics

      public void setCombiningDiacritics(Diacritic[] combiningDiacritics)

      Set the combining diacritics for this phone. Each character must have a the IPATokenType.COMBINING_DIACRITIC token type.

      Parameters:
      combiningDiacritics -
      Throws:
      IllegalArgumentException - if one of the given diacritics is not a combining diacritic
    • getCombining

      public String getCombining()
      Get the string for the combining diacritic portion of the phone.
      Returns:
      the combining diacritic string
    • getSuffixDiacritics

      public Diacritic[] getSuffixDiacritics()
      Specified by:
      getSuffixDiacritics in interface SuffixDiacritics
    • setSuffixDiacritics

      public void setSuffixDiacritics(Diacritic[] suffixDiacritics)
      Set the prefix diacritics for this Phone.
      Parameters:
      prefixDiacritics -
    • getSuffix

      public String getSuffix()
      Get the string for this phone's suffix.
      Returns:
      the text for the suffix portion of the Phone
    • _getFeatureSet

      protected FeatureSet _getFeatureSet()
      Description copied from class: IPAElement
      Private method to return the feature set for the IPAElement. This return value for this method can be changed by using the IPAElement.setFeatureSet(FeatureSet) method.
      Specified by:
      _getFeatureSet in class IPAElement
      Returns:
      the phones feature set
    • getText

      public String getText()
      Description copied from class: IPAElement
      Get the text for this phone
      Specified by:
      getText in class IPAElement
      Returns:
      the phone string