org.openjena.riot
Enum Lang

java.lang.Object
  extended by java.lang.Enum<Lang>
      extended by org.openjena.riot.Lang
All Implemented Interfaces:
Serializable, Comparable<Lang>

public enum Lang
extends Enum<Lang>


Enum Constant Summary
N3
           
NQUADS
           
NTRIPLES
           
RDFJSON
           
RDFXML
           
TRIG
           
TURTLE
           
 
Method Summary
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 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.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

RDFXML

public static final Lang RDFXML

NTRIPLES

public static final Lang NTRIPLES

N3

public static final Lang N3

TURTLE

public static final Lang TURTLE

RDFJSON

public static final Lang RDFJSON

NQUADS

public static final Lang NQUADS

TRIG

public static final Lang TRIG
Method Detail

values

public static Lang[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Lang c : Lang.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Lang valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getName

public String getName()

isTriples

public boolean isTriples()

isQuads

public boolean isQuads()

getContentType

public String getContentType()

toString

public String toString()
Overrides:
toString in class Enum<Lang>

get

public static Lang get(String name)
Translate a name into a Lang Throws RiotException if the name is not recognized.


get

public static Lang get(String name,
                       Lang dftLang)
Translate a name into a Lang, rturn the default if no match found.


guess

public static Lang guess(String resourceIRI,
                         Lang dftLang)
Guess the language, based on filename, or URL, extenstion. Returns null if there isn't a guess available


guess

public static Lang guess(String resourceIRI)
Guess the language, based on filename, or URL, extenstion. Returns null if there isn't a guess available



Licenced under the Apache License, Version 2.0