|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jbind.util.other.Prefs org.jbind.xml.PrefsConfig
Configuration of the XML package. Uses Preferences
for storing the
configuration information. The configuration can be managed using the main
method of this class.
The configuration information is divided into several branches:
java org.jbind.xml.Config -reset -export config.xml
.
Field Summary | |
static java.lang.String |
APPLICATION_XML_CATALOG
Application XML catalog. |
static java.lang.String |
CARTRIDGES
Relative node path that is used for storing cartridges ("schemaCompiler/cartridges"). |
static java.lang.String |
CHECK_COUNTRY_CODE
Key for a boolean value in the validation prefences ("checkCountryCode"). |
static java.lang.String |
CHECK_LANGUAGE_CODE
Key for a boolean value in the validation prefences ("checkLanguageCode"). |
static java.lang.String |
COUNTRY_CODES
Relative node path that is used for storing country codes. |
static java.lang.String |
DATA_FACTORY
Key to configure a class name in the modules prefences ("dataFactory"). |
static java.lang.String |
DEFAULT_ENTITY_RESOLVER
|
static java.lang.String |
ENTITY_RESOLVER
Key to configure a class name in the modules prefences ("entityResolver"). |
static PrefsConfig |
instance
|
static java.lang.String |
JBIND_CONFIG
System property to specify a configuration resource ("jBindConfig"). |
static java.lang.String |
JBIND_INIT_CONFIG
System property that determines if the JBind configuration is initialized ("jBindInitConfig"). |
static java.lang.String |
JBIND_PREFERENCE_TREE
System property to control whether the user preference tree or the system preference tree is used ("jBindPreferenceTree"). |
static java.lang.String |
JBIND_XML_CATALOG
JBind XML catalog. |
static java.lang.String |
LANGUAGE_CODES
Relative node path that is used for storing language codes. |
static java.lang.String |
LOAD_BY_CLASS_LOADER
Constant that identifies the load method that uses the Config.class.getResource(String aResourceName) to access a
resource. |
static java.lang.String |
LOAD_BY_URL
Constant that identifies a load method that uses a configured URL. |
static java.lang.String |
MODULES
Relative node path that is used for storing information about the configurable modules ("modules"). |
static java.lang.String |
N2P_MAPPING
Relative node path that is used for storing namespace to package mappings ("schemaCompiler/namespaceToPackageMapping"). |
static java.lang.String |
REGEX_FACTORY
Key to configure a class name in the modules prefences ("regExFactory"). |
static java.lang.String |
RUNTIME
Relative node path that is used for storing validation information ("runtime"). |
static java.lang.String |
SCHEMA_COMPILER
Relative node path that is used for storing information for the schema compiler ("schemaCompiler"). |
static java.lang.String |
STRICT_SCHEMA_VALIDATION
Key for a boolean value in the validation prefences ("strictSchemaValidation"). |
static java.lang.String |
USE_CONTEXT_CLASS_LOADER
Key for a boolean value in the runtime prefences ("useContextClassLoader"). |
static java.lang.String |
USER_XML_CATALOG
User XML catalog. |
static java.lang.String |
VALIDATION
Relative node path that is used for storing validation information ("validation"). |
static java.lang.String |
XML_CATALOGS
Relative node path ("xmlCatalogs") that is used to configure XML catalogs that are used to resolve publicIds, systemIds, and namespaces. |
static java.lang.String |
XPATH_FACTORY
Key to configure a class name in the modules prefences ("xPathFactory"). |
Method Summary | |
void |
addCatalog(java.net.URL aUrl)
|
boolean |
checkCountryCode()
|
boolean |
checkLanguageCode()
|
IRegEx |
createRegEx(java.lang.String aString)
|
protected void |
doResetPrefs()
Hook method that is called if the "reset" option is handled. |
java.lang.String[] |
getCartridgeClasses()
|
java.lang.String |
getCountry(java.lang.String aCode)
|
IDataImplFactory |
getDataImplFactory()
|
org.xml.sax.EntityResolver |
getDefaultEntityResolver()
|
org.xml.sax.EntityResolver |
getEntityResolver()
|
java.lang.String |
getLanguage(java.lang.String aCode)
|
java.lang.String |
getPackageForNamespace(java.lang.String aNamespace)
|
IRegExFactory |
getRegExFactory()
|
javax.xml.transform.URIResolver |
getUriResolver()
|
IXPathFactory |
getXPathFactory()
|
static void |
main(java.lang.String[] anArgs)
Manages the configuration. |
java.lang.String |
resolveUri(java.lang.String aUri)
|
boolean |
strictSchemaValidation()
|
boolean |
useContextClassLoader()
|
Methods inherited from class org.jbind.util.other.Prefs |
doAcceptArgument, doMain, getPrefs, getPrefs, resetPrefs, usage |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final PrefsConfig instance
public static final java.lang.String SCHEMA_COMPILER
public static final java.lang.String N2P_MAPPING
public static final java.lang.String CARTRIDGES
public static final java.lang.String VALIDATION
public static final java.lang.String USE_CONTEXT_CLASS_LOADER
true
. Iff this entry is true
then
user classes are instantiated using the context class loader.
Iff this feature is false
then user classes are loaded using the class loader that loaded the JBind
classes.
public static final java.lang.String RUNTIME
public static final java.lang.String STRICT_SCHEMA_VALIDATION
public static final java.lang.String CHECK_COUNTRY_CODE
public static final java.lang.String CHECK_LANGUAGE_CODE
public static final java.lang.String COUNTRY_CODES
"validation/countryCodes"
.
public static final java.lang.String LANGUAGE_CODES
"validation/languageCodes"
.
public static final java.lang.String MODULES
public static final java.lang.String XPATH_FACTORY
public static final java.lang.String REGEX_FACTORY
public static final java.lang.String DATA_FACTORY
public static final java.lang.String ENTITY_RESOLVER
public static final java.lang.String DEFAULT_ENTITY_RESOLVER
public static final java.lang.String XML_CATALOGS
LOAD_BY_CLASS_LOADER
, LOAD_BY_URL
).
public static final java.lang.String LOAD_BY_CLASS_LOADER
Config.class.getResource(String aResourceName)
to access a
resource.
public static final java.lang.String LOAD_BY_URL
public static final java.lang.String JBIND_XML_CATALOG
public static final java.lang.String APPLICATION_XML_CATALOG
public static final java.lang.String USER_XML_CATALOG
public static final java.lang.String JBIND_INIT_CONFIG
public static final java.lang.String JBIND_CONFIG
getResourceAsStream
method.
public static final java.lang.String JBIND_PREFERENCE_TREE
Method Detail |
public org.xml.sax.EntityResolver getDefaultEntityResolver()
public javax.xml.transform.URIResolver getUriResolver()
public boolean checkLanguageCode()
checkLanguageCode
in interface IConfig
public boolean checkCountryCode()
checkCountryCode
in interface IConfig
public boolean strictSchemaValidation()
strictSchemaValidation
in interface IConfig
public java.lang.String getCountry(java.lang.String aCode)
getCountry
in interface IConfig
public java.lang.String getLanguage(java.lang.String aCode)
getLanguage
in interface IConfig
public java.lang.String getPackageForNamespace(java.lang.String aNamespace)
getPackageForNamespace
in interface IConfig
public java.lang.String resolveUri(java.lang.String aUri) throws XmlException
resolveUri
in interface IConfig
XmlException
public IXPathFactory getXPathFactory()
getXPathFactory
in interface IConfig
public IDataImplFactory getDataImplFactory()
getDataImplFactory
in interface IConfig
public org.xml.sax.EntityResolver getEntityResolver()
getEntityResolver
in interface IConfig
public IRegExFactory getRegExFactory()
getRegExFactory
in interface IConfig
public IRegEx createRegEx(java.lang.String aString) throws java.lang.Exception
createRegEx
in interface IConfig
java.lang.Exception
public java.lang.String[] getCartridgeClasses() throws java.lang.Exception
getCartridgeClasses
in interface IConfig
java.lang.Exception
protected void doResetPrefs()
Prefs
Subclasses should implement this method by setting default values for the various preferences. This enables one to first reset the preferences and then to export them. The exported preferences should contain enough structural information to allow manual editing, i.e. ideally all possible preference keys with default values are present.
The default implementation does nothing.
doResetPrefs
in class Prefs
public static void main(java.lang.String[] anArgs)
Prefs.doMain(java.lang.String[])
method.
anArgs
- (required).public void addCatalog(java.net.URL aUrl)
addCatalog
in interface IConfig
public boolean useContextClassLoader()
useContextClassLoader
in interface IConfig
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |