java.lang.Object
org.apache.jena.riot.LangBuilder
Builder for RDF languages (Syntaxes).
Example usage:
LangBuilder.create() .langName("MyLang") .contentType("application/wizard") .addAltContentTypes(...) .addFileExtensions("ext1", "ext2") .build()
-
Field Summary
Modifier and TypeFieldDescription -
Method Summary
Modifier and TypeMethodDescriptionaddAltContentTypes
(String... x) Add alternative content typesaddAltNames
(String... x) Add alternative namesaddFileExtensions
(String... x) Add file name extensionsbuild()
Construct theLang
contentType
(String officialContentType) Set the main content type for this language.static LangBuilder
create()
Create a builderstatic LangBuilder
Create a builder - convenience operation to take the language name and content type which should be set if at all possible.Set the language label.
-
Field Details
-
lang
-
officialContentType
-
altNames
-
contentTypes
-
fileExtensions
-
-
Method Details
-
create
Create a builder -
create
Create a builder - convenience operation to take the language name and content type which should be set if at all possible.- Parameters:
langname
-officialContentType
-
-
addAltNames
Add alternative names -
addAltContentTypes
Add alternative content types -
addFileExtensions
Add file name extensions -
build
Construct theLang
-
getContentType
-
contentType
Set the main content type for this language. If there is an officially registered, preferred type, this should be that. -
langName
Set the language label. A system wide, unique short name
-