Class LangBuilder


public class LangBuilder extends Object
Builder for RDF languages (Syntaxes). Example usage:
             .addFileExtensions("ext1", "ext2")
  • Field Details

    • lang

      public String lang
    • officialContentType

      public String officialContentType
    • altNames

      public List<String> altNames
    • contentTypes

      public List<String> contentTypes
    • fileExtensions

      public List<String> fileExtensions
  • Method Details

    • create

      public static LangBuilder create()
      Create a builder
    • create

      public static LangBuilder create(String langname, String officialContentType)
      Create a builder - convenience operation to take the language name and content type which should be set if at all possible.
      langname -
      officialContentType -
    • addAltNames

      public LangBuilder addAltNames(String... x)
      Add alternative names
    • addAltContentTypes

      public LangBuilder addAltContentTypes(String... x)
      Add alternative content types
    • addFileExtensions

      public LangBuilder addFileExtensions(String... x)
      Add file name extensions
    • build

      public Lang build()
      Construct the Lang
    • getContentType

      public String getContentType()
    • contentType

      public LangBuilder contentType(String officialContentType)
      Set the main content type for this language. If there is an officially registered, preferred type, this should be that.
    • langName

      public LangBuilder langName(String langname)
      Set the language label. A system wide, unique short name