public enum Lang extends Enum<Lang>
Enum Constant and Description |
---|
N3 |
NQUADS |
NTRIPLES |
RDFJSON |
RDFXML |
TRIG |
TURTLE |
Modifier and Type | Method and Description |
---|---|
static Lang |
get(String name)
Translate a name into a Lang
Throws RiotException if the name is not recognized.
|
static Lang |
get(String name,
Lang dftLang)
Translate a name into a Lang, rturn the default if no match found.
|
String |
getContentType() |
String |
getDefaultFileExtension()
Get the default file extension.
|
String[] |
getFileExtensions()
get the list of potential file extensions.
|
String |
getName() |
static Lang |
guess(String resourceIRI)
Guess the language, based on filename, or URL, extenstion.
|
static Lang |
guess(String resourceIRI,
Lang dftLang)
Guess the language, based on filename, or URL, extenstion.
|
boolean |
isQuads() |
boolean |
isTriples() |
String |
toString() |
static Lang |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Lang[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Lang RDFXML
public static final Lang NTRIPLES
public static final Lang N3
public static final Lang TURTLE
public static final Lang RDFJSON
public static final Lang NQUADS
public static final Lang TRIG
public static Lang[] values()
for (Lang c : Lang.values()) System.out.println(c);
public static Lang valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic String getName()
public String[] getFileExtensions()
public String getDefaultFileExtension()
public boolean isTriples()
public boolean isQuads()
public String getContentType()
public static Lang get(String name)
public static Lang get(String name, Lang dftLang)
public static Lang guess(String resourceIRI, Lang dftLang)
Licenced under the Apache License, Version 2.0