Package ca.phon.media
Class MediaLocator
java.lang.Object
ca.phon.media.MediaLocator
Helper methods for locating and handling paths for media files.
Also includes methods for setting up the media include paths.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic File
findMediaFile
(Project project, Session session) Find media given a project and session.static File
findMediaFile
(String filename) Search for a file in the media include paths.static File
findMediaFile
(String filename, Project project, String corpus) Search for a file in the media include path.findMediaFileRelative
(String filename, Project project, String corpus) getMediaIncludePaths
(Project project) getMediaIncludePaths
(Project project, String corpus) static void
setMediaIncludePaths
(List<String> paths) Set media include path as a list of paths.
-
Field Details
-
MEDIA_INCLUDE_PATH_PROP
Media include path property. This value of this property should be a semi-colon separated list of paths in order of search priority.- See Also:
-
-
Constructor Details
-
MediaLocator
public MediaLocator()
-
-
Method Details
-
setMediaIncludePaths
Set media include path as a list of paths.- Parameters:
paths
-props
-
-
getMediaIncludePaths
-
getMediaIncludePaths
- Parameters:
project
-- Returns:
-
getMediaIncludePaths
-
findMediaFile
Find media given a project and session. -
findMediaFile
Search for a file in the media include paths.- Parameters:
filename
-- Returns:
- the file object for the file or null if not found
-
findMediaFile
Search for a file in the media include path. Will look in the project resource directory first if project is not null.- Parameters:
filename
-project
- (may benull
)corpus
- (may benull
)- Returns:
- the file object for the file or null if not found
-
findMediaFileRelative
-