public class DefaultRecognizer extends FormatRecognizer
| Modifier and Type | Field and Description |
|---|---|
protected static int |
priority
priority for this format recognizer
|
IDENTIFIERS_BASE, PURL_BASE| Constructor and Description |
|---|
DefaultRecognizer()
Instantiates a new default extension mapper.
|
| Modifier and Type | Method and Description |
|---|---|
URI |
getFormatByParsing(File file,
String mimeType)
Parses the given file and tries to determine the format, such as purl.org
or identifiers.org URI.
|
URI |
getFormatFromExtension(String extension)
Tries to map the given file extension to a format.
|
URI |
getFormatFromMime(String mime)
Tries to map the given mime type to a format.
|
int |
getPriority()
Returns the priority of this format recognizer.
|
static void |
setPriority(int newPriority)
Sets the priority of this format recognizer and triggers a resort of all
format recognizers.
|
buildUri, buildUripublic DefaultRecognizer()
public static void setPriority(int newPriority)
newPriority - the new priority of this recogniserpublic int getPriority()
FormatRecognizergetPriority in class FormatRecognizerpublic URI getFormatFromMime(String mime)
FormatRecognizernull.getFormatFromMime in class FormatRecognizermime - MIME typepublic URI getFormatFromExtension(String extension)
FormatRecognizernull.getFormatFromExtension in class FormatRecognizerextension - file extensionpublic URI getFormatByParsing(File file, String mimeType)
FormatRecognizernull.getFormatByParsing in class FormatRecognizerfile - Path to the filemimeType - MIME type for quick evaluation.Copyright © 2018 SEMS project @ University of Rostock. All rights reserved.