public class RDFLanguages extends Object
RDFParserRegistry
Modifier and Type | Field and Description |
---|---|
static Lang |
N3
N3 (treat as Turtle)
|
static Lang |
NQ
Abbreviation for NQUADS
|
static Lang |
NQUADS
N-Quads
|
static Lang |
NT
Common abbreviation for NTRIPLES
|
static Lang |
NTRIPLES
N-Triples
|
static Lang |
RDFJSON
RDF/JSON (this is not JSON-LD)
|
static Lang |
RDFNULL
The "null" language
|
static Lang |
RDFXML
RDF/XML
|
static String |
strLangN3 |
static String |
strLangNQuads |
static String |
strLangNTriples |
static String |
strLangRDFJSON |
static String |
strLangRDFXML |
static String |
strLangTriG |
static String |
strLangTurtle |
static Lang |
TRIG
TriG
|
static Lang |
TTL
Common abbreviation for TURTLE
|
static Lang |
TURTLE
Turtle
|
Constructor and Description |
---|
RDFLanguages() |
Modifier and Type | Method and Description |
---|---|
static Lang |
contentTypeToLang(ContentType ct)
Map a content type (without charset) to a
Lang |
static Lang |
contentTypeToLang(String contentType)
Map a content type (without charset) to a
Lang |
static Lang |
fileExtToLang(String ext)
Try to map a file extension to a
Lang ; return null on no registered mapping |
static Lang |
filenameToLang(String filename)
Try to map a file name to a
Lang ; return null on no registered mapping |
static Lang |
filenameToLang(String filename,
Lang dftLang)
Try to map a file name to a
Lang ; return null on no registered mapping |
static Collection<Lang> |
getRegisteredLanguages() |
static ContentType |
guessContentType(String resourceName) |
static void |
init() |
static boolean |
isQuads(Lang lang)
return true if the language is registered as a quads language
|
static boolean |
isRegistered(Lang lang) |
static boolean |
isTriples(Lang lang)
return true if the language is registered as a triples language
|
static Lang |
nameToLang(String langName)
Turn a name for a language into a
Lang object. |
static void |
register(Lang lang)
Register a language.
|
static boolean |
sameLang(Lang lang1,
Lang lang2) |
static Lang |
shortnameToLang(String label)
Map a colloquial name (e.g.
|
static void |
unregister(Lang lang)
Remove a regsitration of a language - this also removes all recorded mapping
of content types and file extensions.
|
public static final String strLangRDFXML
public static final String strLangTurtle
public static final String strLangNTriples
public static final String strLangN3
public static final String strLangRDFJSON
public static final String strLangNQuads
public static final String strLangTriG
public static final Lang RDFXML
public static final Lang TURTLE
public static final Lang TTL
public static final Lang N3
public static final Lang NTRIPLES
public static final Lang NT
public static final Lang RDFJSON
public static final Lang TRIG
public static final Lang NQUADS
public static final Lang NQ
public static final Lang RDFNULL
public static Collection<Lang> getRegisteredLanguages()
public static void init()
public static void register(Lang lang)
Lang
object use LangBuilder
.
See also
RDFParserRegistry.registerLang(org.apache.jena.riot.Lang, org.apache.jena.riot.ReaderRIOTFactory)
for registering a language and it's RDF parser fatory.RDFParserRegistry
public static void unregister(Lang lang)
public static boolean isRegistered(Lang lang)
public static boolean isTriples(Lang lang)
public static boolean isQuads(Lang lang)
public static Lang contentTypeToLang(String contentType)
Lang
public static Lang contentTypeToLang(ContentType ct)
Lang
public static Lang shortnameToLang(String label)
Lang
public static Lang fileExtToLang(String ext)
Lang
; return null on no registered mappingpublic static Lang filenameToLang(String filename)
Lang
; return null on no registered mappingpublic static Lang filenameToLang(String filename, Lang dftLang)
Lang
; return null on no registered mappingpublic static Lang nameToLang(String langName)
Lang
object.
The name can be a label, or a content type.public static ContentType guessContentType(String resourceName)
Licenced under the Apache License, Version 2.0