Class SessionFactory

All Implemented Interfaces:
IExtendable

public final class SessionFactory extends ExtendableObject
A factory for creating mutable session objects.
  • Method Details

    • newFactory

      public static SessionFactory newFactory()
      Create a new session factory.
      Returns:
      factory using first available implementation. null if no implementation found.
    • createSession

      public Session createSession()
      Create a new empty session. Tier view
      Returns:
      a new session object
    • createSession

      public Session createSession(SessionSPI sessionImpl)
    • createSession

      public Session createSession(String corpus, String name)
      Create a new session with the specified corpus and name. Also sets up initial tier view.
      Parameters:
      corpus -
      name -
      Returns:
      the session object
    • setupDefaultTierView

      public void setupDefaultTierView(Session session)
      Setup default tier view for session.
      Parameters:
      session -
    • cloneSession

      public Session cloneSession(Session session)
      Clone given session.
      Parameters:
      session -
      Returns:
      the cloned session
    • copySessionInformation

      public void copySessionInformation(Session session, Session dest)
      Copy session information from one session to the destination. Session information includes:
      • media location
      • session name
      • corpus name
      Parameters:
      session -
      dest -
    • createComment

      public Comment createComment()
      Create comment
    • createComment

      public Comment createComment(CommentSPI commentImpl)
    • createComment

      public Comment createComment(String tag, String value)
      Create comment
      Parameters:
      tag -
      value -
      Returns:
      new comment
    • createComment

      public Comment createComment(String tag, String value, MediaSegment segment)
    • cloneComment

      public Comment cloneComment(Comment comment)
    • createSessionMetadata

      public SessionMetadata createSessionMetadata()
      Create session metadata object.
      Returns:
      session metadata
    • createSessionMetadata

      public SessionMetadata createSessionMetadata(SessionMetadataSPI sessionMetadataImpl)
    • copySessionMetadata

      public void copySessionMetadata(Session session, Session dest)
      Clone session metadata
      Parameters:
      session -
      dest -
    • copySessionTierInformation

      public void copySessionTierInformation(Session session, Session dest)
      Copy tier information from one session to another.
      Parameters:
      session -
      dest -
    • createRecord

      public Record createRecord()
      Create a new record.
      Returns:
      a new empty record
    • createRecord

      public Record createRecord(RecordSPI recordImpl)
    • createGroup

      public Group createGroup(Record r, int gIdx)
      Create group object for given record and index
      Parameters:
      r -
      gIdx -
      Returns:
    • createRecord

      public Record createRecord(Participant speaker)
      Create a new record with the specified speaker.
      Parameters:
      speaker -
      Returns:
      the new record
    • cloneRecord

      public Record cloneRecord(Record record)
      Clone the given record.
      Parameters:
      record -
      Returns:
      a new record with the same contents and the given record
    • createParticipant

      public Participant createParticipant()
      Create a new participant object.
      Returns:
      new participant object
    • createParticipant

      public Participant createParticipant(ParticipantSPI participantImpl)
    • createUnknownParticipant

      public Participant createUnknownParticipant()
      Create the unknown participant object.
      Returns:
      a new participant object with values setup for an unknown speaker
    • createAllParticipant

      public Participant createAllParticipant()
    • cloneParticipant

      public Participant cloneParticipant(Participant part)
      Clone participant
      Parameters:
      part -
      Returns:
      cloned participant
    • createTranscriber

      public Transcriber createTranscriber()
      Create a new transcriber object.
      Returns:
      new transcriber
    • createTranscriber

      public Transcriber createTranscriber(TranscriberSPI transcriberImpl)
    • createMediaSegment

      public MediaSegment createMediaSegment()
      Create a new media segment
    • createMediaSegment

      public MediaSegment createMediaSegment(MediaSegmentSPI mediaSegmentImpl)
    • createTier

      public <T> Tier<T> createTier(String name, Class<T> type, boolean grouped)
      Create a new tier object with the specified type.
      Parameters:
      name -
      type -
      grouped -
      Returns:
      the new tier
    • createTier

      public <T> Tier<T> createTier(Class<T> type, TierSPI<T> tierImpl)
    • createTier

      public Tier<TierString> createTier(String name)
      Create a new text tier.
      Parameters:
      name -
      Returns:
      the new tier
    • createTierDescription

      public TierDescription createTierDescription(String name, boolean grouped)
      Create a new string tier description.
      Parameters:
      name -
      grouped -
      Returns:
      new tier description
    • createTierDescription

      public TierDescription createTierDescription(String name, boolean grouped, Class<?> type)
      Create tier description.
      Parameters:
      name -
      grouped -
      type -
      Returns:
      new tier description
    • createTierDescription

      public TierDescription createTierDescription(TierDescriptionSPI tierDescriptionImpl)
    • createTierViewItem

      public TierViewItem createTierViewItem(String name)
      Create a tier display and ordering object
      Parameters:
      name -
      Returns:
    • createTierViewItem

      public TierViewItem createTierViewItem(String name, boolean visible)
      Create a tier display and ordering object
      Parameters:
      name -
      visible -
      Returns:
    • createTierViewItem

      public TierViewItem createTierViewItem(String name, boolean visible, String font)
      Create a tier display and ordering object
      Parameters:
      name -
      visible -
      font -
      Returns:
    • createTierViewItem

      public TierViewItem createTierViewItem(String name, boolean visible, boolean locked)
      Create a tier display and ordering object
      Parameters:
      name -
      visible -
      locked -
      Returns:
    • createTierViewItem

      public TierViewItem createTierViewItem(String name, boolean visible, String font, boolean locked)
      Create a tier display and ordering object
      Parameters:
      name -
      visible -
      font -
      locked -
      Returns:
    • createTierViewItem

      public TierViewItem createTierViewItem(TierViewItemSPI tierViewItemImpl)
    • createDefaultTierView

      public List<TierViewItem> createDefaultTierView(Session session)
      Get the default tier view for a given sesion.
      Parameters:
      session -