Class RecordIntervalTier
java.lang.Object
ca.phon.app.session.intervalTiers.RecordIntervalTier
- All Implemented Interfaces:
IntervalTierSPI
Wrapper for record tier data so it may be viewed as an interval tier.
The record tier should be of type
TierData
with intervals/points placed at the end of label data.
e.g., hello •0.-999-1.28• world •1.28-2.08•-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addInterval
(IntervalTier.Interval interval, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tierGet list of intervals in tier (points included)getIntervals
(Record record) Get intervals from the givenRecord
object.getName()
Get tier nameint
getRecordIndexFromIntervalIndex
(int intervalIndex) Get record index from given interval index.static List
<IntervalTier.Interval> orthographyIntervals
(Orthography orthography) Get intervals from the givenOrthography
object.static List
<IntervalTier.Interval> phoneIntervals
(TierData tierData) boolean
removeInterval
(IntervalTier.Interval interval) Remove interval from tierstatic List
<IntervalTier.Interval> tierDataIntervals
(TierData tierData) Get intervals from the givenTierData
object.
-
Constructor Details
-
RecordIntervalTier
-
-
Method Details
-
getName
Description copied from interface:IntervalTierSPI
Get tier name- Specified by:
getName
in interfaceIntervalTierSPI
- Returns:
- tierName
-
getIntervals
Get intervals from the givenRecord
object.- Parameters:
record
- the record- Returns:
- list of intervals for the record, or empty list if none
-
getRecordIndexFromIntervalIndex
public int getRecordIndexFromIntervalIndex(int intervalIndex) Get record index from given interval index.- Parameters:
intervalIndex
-- Returns:
- record index, or -1 if not found
-
orthographyIntervals
Get intervals from the givenOrthography
object.- Parameters:
orthography
-- Returns:
-
tierDataIntervals
Get intervals from the givenTierData
object.- Parameters:
tierData
-- Returns:
-
phoneIntervals
-
getIntervals
Description copied from interface:IntervalTierSPI
Get list of intervals in tier (points included)- Specified by:
getIntervals
in interfaceIntervalTierSPI
- Returns:
- list of all intervals and points in tier in order
-
addInterval
public boolean addInterval(IntervalTier.Interval interval, IntervalTier.InsertionStrategy insertionStrategy) Description copied from interface:IntervalTierSPI
Add new interval to tier- Specified by:
addInterval
in interfaceIntervalTierSPI
- Parameters:
interval
-insertionStrategy
-- Returns:
- boolean if interval was added, false otherwise
-
removeInterval
Description copied from interface:IntervalTierSPI
Remove interval from tier- Specified by:
removeInterval
in interfaceIntervalTierSPI
- Parameters:
interval
-
-