org.mindswap.owl
Class OWLConfig

java.lang.Object
  extended by org.mindswap.owl.OWLConfig

public class OWLConfig
extends java.lang.Object

Author:
Evren Sirin

Field Summary
static java.util.List DEFAULT_LANG_LIST
           
static java.lang.String[] DEFAULT_LANGS
          Default language is used to determine which literal will be chosen by the getProperty(prop) function when there are multiple triples for the given property.
 
Constructor Summary
OWLConfig()
           
 
Method Summary
static void addConverter(java.lang.Class javaClass, OWLObjectConverter converter)
           
static OWLObjectConverter getConverter(java.lang.Class javaClass)
           
static boolean getStrictConversion()
           
static void setDefaultLanguage(java.lang.String lang)
          Sets the default language that will be tried first when a literal property value is searched.
static void setDefaultLanguages(java.lang.String[] langs)
          Sets all the languages that will be tried when a literal property values is searched.
static boolean setStrictConversion(boolean strict)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LANGS

public static java.lang.String[] DEFAULT_LANGS
Default language is used to determine which literal will be chosen by the getProperty(prop) function when there are multiple triples for the given property. An empty string means the literals with no language identifier will be chosen. A null value means the first found literal will be returned without looking at the language identifier. Note that even when a default language is chosen getProperty(prop, lang) can be used to get literal value for a certain identifier. All the language identifiers in the list will be tried in the order given. Original value for the list is DEFAULT_LANGS = {"en", "", "en", null}; The ordering here works as follows: 1) Try the default language (which is English at the beginning but can be changed any time with setDefaultLanguage() function 2) Try to find literal with no language identifier 3) Try English literal 4) Try literal with any language identifier See http://www.w3.org/TR/REC-xml#sec-lang-tag for language identifier specs


DEFAULT_LANG_LIST

public static java.util.List DEFAULT_LANG_LIST
Constructor Detail

OWLConfig

public OWLConfig()
Method Detail

setDefaultLanguage

public static void setDefaultLanguage(java.lang.String lang)
Sets the default language that will be tried first when a literal property value is searched. Note that this function only sets the first language but there can be multiple languages defined as DEFAULT_LANGS.

Parameters:
lang -

setDefaultLanguages

public static void setDefaultLanguages(java.lang.String[] langs)
Sets all the languages that will be tried when a literal property values is searched. All the languages in the list wil lbe tried in the order given

Parameters:
langs -

addConverter

public static void addConverter(java.lang.Class javaClass,
                                OWLObjectConverter converter)

getConverter

public static OWLObjectConverter getConverter(java.lang.Class javaClass)

setStrictConversion

public static boolean setStrictConversion(boolean strict)

getStrictConversion

public static boolean getStrictConversion()


Copyright © 2004 Evren Sirin. All Rights Reserved.