Package ca.phon.ipa
Class IPAElement
java.lang.Object
ca.phon.ipa.IPAElement
- All Implemented Interfaces:
IExtendable
,Visitable<IPAElement>
- Direct Known Subclasses:
AlignmentMarker
,CompoundWordMarker
,Diacritic
,IntonationGroup
,IntraWordPause
,Pause
,Phone
,PhonexMatcherReference
,Sandhi
,StressMarker
,SyllableBoundary
,WordBoundary
IPAElement
s represent the atomic unit of IPA transcriptions.
IPAElement
s are constructed using the create methods of
IPAElementFactory
.
IPAElement
objects are extendable via capabilities.
Classes provided to ExtensionSupport.putExtension(Class, Object)
must have the Extension
annotation declaring
Phone.class
as the accepted type.
E.g.,
@Extension(IPAElement.class) public class MyNewPhoneExtension {...}Common uses for
IPAElement
extensions are annotations such as syllabification
information (see SyllabificationInfo
.)
IPAElement
objects also implement the visitor pattern. Visitors
must implement the
or extend
invalid @link
PhoneVisitor
and can be applied using the invalid @link
PhoneVisitorAdapter
accept(PhoneVisitor)
method.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract FeatureSet
Private method to return the feature set for theIPAElement
.void
accept
(Visitor<IPAElement> phoneVisitor) Accept the given visitor.void
void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) boolean
contentEquals
(IPAElement ele) void
fireIndexedPropertyChange
(String propertyName, int index, boolean oldValue, boolean newValue) void
fireIndexedPropertyChange
(String propertyName, int index, int oldValue, int newValue) void
fireIndexedPropertyChange
(String propertyName, int index, Object oldValue, Object newValue) void
void
firePropertyChange
(String propertyName, boolean oldValue, boolean newValue) void
firePropertyChange
(String propertyName, int oldValue, int newValue) void
firePropertyChange
(String propertyName, Object oldValue, Object newValue) <T> T
getExtension
(Class<T> cap) Get the requested extension if available.Return all extension types supportedReturn the feature set for thisIPAElement
.getPropertyChangeListeners
(String propertyName) Direct access toSyllabificationInfo.getConstituentType()
.abstract String
getText()
Get the text for this phoneboolean
hasListeners
(String propertyName) <T> T
putExtension
(Class<T> cap, T impl) Add a new extension.<T> T
removeExtension
(Class<T> cap) Remove a capability.void
void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) void
setFeatureSet
(FeatureSet featureSet) Set the custom features for thisIPAElement
void
setScType
(SyllableConstituentType scType) Direct access toIPAElement
sSyllabificationInfo.setConstituentType(SyllableConstituentType)
.toString()
-
Field Details
-
PHONE_TEXT
Property name for changes on phone text- See Also:
-
-
Constructor Details
-
IPAElement
public IPAElement()
-
-
Method Details
-
setFeatureSet
Set the custom features for thisIPAElement
- Parameters:
featureSet
- . Usenull
to have the default features returned
-
_getFeatureSet
Private method to return the feature set for theIPAElement
. This return value for this method can be changed by using thesetFeatureSet(FeatureSet)
method.- Returns:
- the phones feature set
-
getText
Get the text for this phone- Returns:
- the phone string
-
getFeatureSet
Return the feature set for thisIPAElement
.- Returns:
- the default feature set - derived by the implementing type or custom features if defined.
-
getScType
Direct access toSyllabificationInfo.getConstituentType()
. Will return the syllable constituent type for the phone (if available.)- Returns:
- the phone's
SyllableConstituentType
orSyllableConstituentType.UNKNOWN
if no syllabification information was found.
-
setScType
Direct access toIPAElement
sSyllabificationInfo.setConstituentType(SyllableConstituentType)
.- Parameters:
scType
- the constituent type for the phon
-
addPropertyChangeListener
-
addPropertyChangeListener
-
fireIndexedPropertyChange
public void fireIndexedPropertyChange(String propertyName, int index, boolean oldValue, boolean newValue) -
fireIndexedPropertyChange
-
fireIndexedPropertyChange
-
firePropertyChange
-
firePropertyChange
-
firePropertyChange
-
firePropertyChange
-
getPropertyChangeListeners
-
getPropertyChangeListeners
-
hasListeners
-
removePropertyChangeListener
-
removePropertyChangeListener
-
contentEquals
-
accept
Description copied from interface:Visitable
Accept the given visitor.- Specified by:
accept
in interfaceVisitable<IPAElement>
-
getExtensions
Description copied from interface:IExtendable
Return all extension types supported- Specified by:
getExtensions
in interfaceIExtendable
-
getExtension
Description copied from interface:IExtendable
Get the requested extension if available.- Specified by:
getExtension
in interfaceIExtendable
- Returns:
- the capability object or
null
if the cability is not available
-
putExtension
Description copied from interface:IExtendable
Add a new extension.- Specified by:
putExtension
in interfaceIExtendable
- Parameters:
cap
- the extension to add- Returns:
- the added extension implementation
-
removeExtension
Description copied from interface:IExtendable
Remove a capability.- Specified by:
removeExtension
in interfaceIExtendable
- Parameters:
cap
- the capability to remove
-
toString
-