Interface Project
- All Superinterfaces:
IExtendable
- All Known Implementing Classes:
AbstractProject
,DesktopProject
,LocalProject
,ShadowProject
Minimal interface for a phon Project.
Projects are responsible for providing access to corpora and sessions.
Implementations are responsible for providing the actual organization
of the project data.
Additional project functionality is provided by the
IExtendable
interface. An example is the ProjectResources
interface which
provides a way to listen access project resources. To use this
functionality, do the following:
Project project = ...; ProjectResources projectResources = project.getExtension(ProjectResources.class); if(projectResources != null) { // do something with project resources }All extensions are optional and may not be available for all project types.
-
Method Summary
Modifier and TypeMethodDescriptiongetCorpusDescription
(String corpus) Get the description of the specified corpus.Get an iterator over the corpora in this project.getName()
The name of the project.getParticipants
(Collection<SessionPath> sessions) Return a set of participants which are found in the given collection of Sessions.getSessionIterator
(String corpus) Get an iterator over the sessions in the specified corpus.getUUID()
Project UUID UUID for the projectProject versionboolean
Tests to see if a given corpus exists in the project.boolean
hasSession
(String corpus, String session) Test if a given session exists in the specified corpus.openSession
(String corpus, String session) Open the specified session.openSession
(String corpus, String session, SessionReader reader) Open specified session using the provided reader.Methods inherited from interface ca.phon.extensions.IExtendable
getExtension, getExtensions, putExtension, removeExtension
-
Method Details
-
getVersion
-
getName
-
getUUID
-
getCorpusIterator
-
hasCorpus
Tests to see if a given corpus exists in the project. This may be faster than callinggetCorpusIterator()
and checking iteratively.- Parameters:
corpus
-- Returns:
true
if the corpus exists,false
-
getCorpusDescription
-
getSessionIterator
-
hasSession
Test if a given session exists in the specified corpus. This method is usually faster than callinggetSessionIterator(String)
and checking iteratively.- Parameters:
corpus
- the corpus namesession
- the session name- Returns:
true
if the session exists,false
otherwise
-
getParticipants
Return a set of participants which are found in the given collection of Sessions. The participant objects returned by this method will include theParticipantHistory
extension. Participants from two sessions are considered to be the same if their ids, names and roles match. If the speaker for some records is unidenified, a clone of Participant.UNKOWN will be added in the returned set.- Parameters:
sessions
-- Returns:
- a set of participants
-
openSession
Open the specified session. This will create a new session object with the data currently on the storage device.- Parameters:
corpus
-session
-- Returns:
- the session
- Throws:
IOException
-
openSession
Open specified session using the provided reader.- Parameters:
corpus
-session
-reader
-- Returns:
- the session
- Throws:
IOException
-