java.lang.Object
org.apache.jena.riot.RDFLanguages
Central registry of RDF languages and syntaxes.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final LangThe standard JSON-LD registration.static final Langstatic final LangN3 (treat as Turtle)static final LangAlternative constantNQUADSstatic final Langstatic final LangAlternative constant forNTRIPLESstatic final Langstatic final Langstatic final LangThe "null" languagestatic final Langstatic final LangOutput-only language for a StreamRDF (for development)static final LangThe RDF syntax RDF Thriftstatic final Langstatic final LangSHACL Compact Syntax (2020-07-01)static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final LangTextstatic final Langstatic final LangTriXstatic final LangAlternative constant forTURTLEstatic final Lang -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LangcontentTypeToLang(String contentType) Map a content type (without charset) to aLangstatic LangMap a content type (without charset) to aLangstatic LangfileExtToLang(String ext) Try to map a file extension to aLang; return null on no registered mappingstatic LangfilenameToLang(String uriOrFilename) Try to map a file name to aLang; return null on no registered mapping.static LangfilenameToLang(String filename, Lang dftLang) Try to map a file name to aLang; return the given default where there is no registered mappingstatic StringgetCharsetForContentType(String contentType) static Collection<Lang>static ContentTypeguessContentType(String resourceName) static booleanhasRegisteredParser(Lang lang) return true if the language is registered for parsing as an RDF syntax.static voidinit()System initialization function.static booleanreturn true if the language is registered as a quads language.static booleanisRegistered(Lang lang) Is this language registered?static booleanreturn true if the language is registered as a triples language.static LangnameToLang(String langName) Turn a name for a language into aLangobject.static LangpathnameToLang(String pathname) Try to map a URI or URI path name to aLang; return null on no registered mapping.static voidRegister a language.static LangresourceNameToLang(String resourceName) Try to map a resource name to aLang; return null on no registered mappingstatic LangresourceNameToLang(String resourceName, Lang dftLang) Try to map a resource name to aLang; return the given default where there is no registered mappingstatic booleanstatic LangshortnameToLang(String label) Map a colloquial name (e.g.static voidunregister(Lang lang) Remove a registration of a language - this also removes all recorded mapping of content types and file extensions.
-
Field Details
-
strLangRDFXML
- See Also:
-
strLangTurtle
- See Also:
-
strLangNTriples
- See Also:
-
strLangN3
- See Also:
-
strLangRDFJSON
- See Also:
-
strLangJSONLD
- See Also:
-
strLangNQuads
- See Also:
-
strLangTriG
- See Also:
-
strLangCSV
- See Also:
-
strLangTSV
- See Also:
-
strLangTriX
- See Also:
-
strLangRDFPROTO
- See Also:
-
strLangRDFTHRIFT
- See Also:
-
RDFXML
-
TURTLE
-
TTL
Alternative constant forTURTLE -
N3
N3 (treat as Turtle) -
NTRIPLES
-
NT
Alternative constant forNTRIPLES -
JSONLD
The standard JSON-LD registration. JSON-LD. -
strLangJSONLD11
- See Also:
-
JSONLD11
-
RDFJSON
-
TRIG
-
NQUADS
-
NQ
Alternative constantNQUADS -
RDFPROTO
-
RDFTHRIFT
The RDF syntax RDF Thrift -
TEXT
Text -
TRIX
TriX -
RDFNULL
The "null" language -
RDFRAW
Output-only language for a StreamRDF (for development) -
SHACLC
SHACL Compact Syntax (2020-07-01)
-
-
Constructor Details
-
RDFLanguages
public RDFLanguages()
-
-
Method Details
-
getRegisteredLanguages
-
init
public static void init()System initialization function. -
register
Register a language. To create aLangobject useLangBuilder. See alsoRDFParserRegistry.registerLang(org.apache.jena.riot.Lang, org.apache.jena.riot.ReaderRIOTFactory)for registering a language and it's RDF parser factory.- See Also:
-
unregister
Remove a registration of a language - this also removes all recorded mapping of content types and file extensions. -
isRegistered
Is this language registered? -
isTriples
return true if the language is registered as a triples language. -
isQuads
return true if the language is registered as a quads language. -
hasRegisteredParser
return true if the language is registered for parsing as an RDF syntax. -
contentTypeToLang
Map a content type (without charset) to aLang -
contentTypeToLang
Map a content type (without charset) to aLang -
getCharsetForContentType
-
shortnameToLang
Map a colloquial name (e.g. "Turtle") to aLang -
fileExtToLang
Try to map a file extension to aLang; return null on no registered mapping -
resourceNameToLang
Try to map a resource name to aLang; return null on no registered mapping -
resourceNameToLang
Try to map a resource name to aLang; return the given default where there is no registered mapping -
filenameToLang
Try to map a file name to aLang; return null on no registered mapping. -
pathnameToLang
Try to map a URI or URI path name to aLang; return null on no registered mapping. -
filenameToLang
Try to map a file name to aLang; return the given default where there is no registered mapping -
nameToLang
Turn a name for a language into aLangobject. The name can be a label, or a content type. -
guessContentType
-
sameLang
-