public class Formatizer extends Object
FormatRecognizer)
which are able to recognize files and provide format URIs.
By default we are able to recognize SED-ML, BioPax, CellML, SBML, and SBOL.
You can extend the default list by passing further FormatRecognizers to
(de.unirostock.sems.cbext.FormatRecognizer).
To retrieve the format of a certain file you might
(java.io.File)(java.lang.String)(java.lang.String)| Modifier and Type | Field and Description |
|---|---|
static URI |
GENERIC_UNKNOWN
The generic unknown format URI.
|
| Constructor and Description |
|---|
Formatizer() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDefaultRecognizers()
Add all default recognizers to the list of recognizers.
|
static void |
addFormatRecognizer(FormatRecognizer recognizer)
Adds another recognizer to the formatizer.
|
static URI |
getFormatFromExtension(String extension)
Gets the format given a file extension.
|
static URI |
getFormatFromMime(String mime)
Gets the format given a mime type.
|
static URI |
guessFormat(File file)
Guess format given a file.
|
static void |
removeRecognizers()
Remove all recognizers that we know so far.
|
static void |
resortRecognizers()
Resort known format recognizers.
|
public static URI GENERIC_UNKNOWN
public static void addFormatRecognizer(FormatRecognizer recognizer)
recognizer - the recognizer that considers more formatspublic static void addDefaultRecognizers()
public static void removeRecognizers()
public static void resortRecognizers()
public static URI guessFormat(File file)
file - the filepublic static URI getFormatFromMime(String mime)
mime - the mime typeCopyright © 2018 SEMS project @ University of Rostock. All rights reserved.