Package ca.phon.session
Class SessionFactory
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.session.SessionFactory
- All Implemented Interfaces:
IExtendable
A factory for creating mutable session objects.
-
Method Summary
Modifier and TypeMethodDescriptioncloneComment
(Comment comment) cloneParticipant
(Participant part) Clone participantcloneRecord
(Record record) Clone the given record.cloneSession
(Session session) Clone given session.void
copySessionInformation
(Session session, Session dest) Copy session information from one session to the destination.void
copySessionMetadata
(Session session, Session dest) Clone session metadatavoid
copySessionTierInformation
(Session session, Session dest) Copy tier information from one session to another.Create commentcreateComment
(CommentSPI commentImpl) createComment
(String tag, String value) Create commentcreateComment
(String tag, String value, MediaSegment segment) createDefaultTierView
(Session session) Get the default tier view for a given sesion.createGroup
(Record r, int gIdx) Create group object for given record and indexCreate a new media segmentcreateMediaSegment
(MediaSegmentSPI mediaSegmentImpl) Create a new participant object.createParticipant
(ParticipantSPI participantImpl) Create a new record.createRecord
(Participant speaker) Create a new record with the specified speaker.createRecord
(RecordSPI recordImpl) Create a new empty session.createSession
(SessionSPI sessionImpl) createSession
(String corpus, String name) Create a new session with the specified corpus and name.Create session metadata object.createSessionMetadata
(SessionMetadataSPI sessionMetadataImpl) <T> Tier<T>
createTier
(Class<T> type, TierSPI<T> tierImpl) createTier
(String name) Create a new text tier.<T> Tier<T>
createTier
(String name, Class<T> type, boolean grouped) Create a new tier object with the specified type.createTierDescription
(TierDescriptionSPI tierDescriptionImpl) createTierDescription
(String name, boolean grouped) Create a new string tier description.createTierDescription
(String name, boolean grouped, Class<?> type) Create tier description.createTierViewItem
(TierViewItemSPI tierViewItemImpl) createTierViewItem
(String name) Create a tier display and ordering objectcreateTierViewItem
(String name, boolean visible) Create a tier display and ordering objectcreateTierViewItem
(String name, boolean visible, boolean locked) Create a tier display and ordering objectcreateTierViewItem
(String name, boolean visible, String font) Create a tier display and ordering objectcreateTierViewItem
(String name, boolean visible, String font, boolean locked) Create a tier display and ordering objectCreate a new transcriber object.createTranscriber
(TranscriberSPI transcriberImpl) Create the unknown participant object.static SessionFactory
Create a new session factory.void
setupDefaultTierView
(Session session) Setup default tier view for session.Methods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtension
-
Method Details
-
newFactory
Create a new session factory.- Returns:
- factory using first available
implementation.
null
if no implementation found.
-
createSession
Create a new empty session. Tier view- Returns:
- a new session object
-
createSession
-
createSession
Create a new session with the specified corpus and name. Also sets up initial tier view.- Parameters:
corpus
-name
-- Returns:
- the session object
-
setupDefaultTierView
Setup default tier view for session.- Parameters:
session
-
-
cloneSession
Clone given session.- Parameters:
session
-- Returns:
- the cloned session
-
copySessionInformation
Copy session information from one session to the destination. Session information includes:- media location
- session name
- corpus name
- Parameters:
session
-dest
-
-
createComment
Create comment -
createComment
-
createComment
Create comment- Parameters:
tag
-value
-- Returns:
- new comment
-
createComment
-
cloneComment
-
createSessionMetadata
Create session metadata object.- Returns:
- session metadata
-
createSessionMetadata
-
copySessionMetadata
Clone session metadata- Parameters:
session
-dest
-
-
copySessionTierInformation
Copy tier information from one session to another.- Parameters:
session
-dest
-
-
createRecord
Create a new record.- Returns:
- a new empty record
-
createRecord
-
createGroup
Create group object for given record and index- Parameters:
r
-gIdx
-- Returns:
-
createRecord
Create a new record with the specified speaker.- Parameters:
speaker
-- Returns:
- the new record
-
cloneRecord
Clone the given record.- Parameters:
record
-- Returns:
- a new record with the same contents and the given record
-
createParticipant
Create a new participant object.- Returns:
- new participant object
-
createParticipant
-
createUnknownParticipant
Create the unknown participant object.- Returns:
- a new participant object with values setup for an unknown speaker
-
createAllParticipant
-
cloneParticipant
Clone participant- Parameters:
part
-- Returns:
- cloned participant
-
createTranscriber
Create a new transcriber object.- Returns:
- new transcriber
-
createTranscriber
-
createMediaSegment
Create a new media segment -
createMediaSegment
-
createTier
Create a new tier object with the specified type.- Parameters:
name
-type
-grouped
-- Returns:
- the new tier
-
createTier
-
createTier
Create a new text tier.- Parameters:
name
-- Returns:
- the new tier
-
createTierDescription
Create a new string tier description.- Parameters:
name
-grouped
-- Returns:
- new tier description
-
createTierDescription
Create tier description.- Parameters:
name
-grouped
-type
-- Returns:
- new tier description
-
createTierDescription
-
createTierViewItem
Create a tier display and ordering object- Parameters:
name
-- Returns:
-
createTierViewItem
Create a tier display and ordering object- Parameters:
name
-visible
-- Returns:
-
createTierViewItem
Create a tier display and ordering object- Parameters:
name
-visible
-font
-- Returns:
-
createTierViewItem
Create a tier display and ordering object- Parameters:
name
-visible
-locked
-- Returns:
-
createTierViewItem
Create a tier display and ordering object- Parameters:
name
-visible
-font
-locked
-- Returns:
-
createTierViewItem
-
createDefaultTierView
Get the default tier view for a given sesion.- Parameters:
session
-
-