public class NbCatalogManager extends CatalogManager
Properties can come from two places: from system properties or from a CatalogManager.properties file. This class provides a transparent interface to both, with system properties preferred over property file values.
The following table summarizes the properties:
| System Property | CatalogManager.properties Property |
Description |
| xml.catalog.ignoreMissing | If true, a missing CatalogManager.properties file or missing properties within that file will not generate warning messages. See also the ignoreMissingProperties method. | |
| xml.catalog.files | catalogs | The |
| relative-catalogs | If false, relative catalog URIs are made absolute with respect to the base URI of
the CatalogManager.properties file. This setting only applies to catalog
URIs obtained from the catalogs property |
|
| xml.catalog.verbosity | verbosity | If non-zero, the Catalog classes will print informative and debugging messages. The higher the number, the more messages. |
| xml.catalog.prefer | prefer | Which identifier is preferred, "public" or "system"? |
| xml.catalog.staticCatalog | static-catalog | Should a single catalog be constructed for all parsing, or should a different catalog be created for each parser? |
| xml.catalog.allowPI | allow-oasis-xml-catalog-pi | If the source document contains "oasis-xml-catalog" processing instructions, should they be used? |
| xml.catalog.className | catalog-class-name | If you're using the convenience classes org.apache.xml.resolver.tools.*), this setting allows you to specify an alternate class name to use for the underlying catalog. |
Catalog| Modifier and Type | Field and Description |
|---|---|
Debug |
debug
The manager's debug object.
|
| Constructor and Description |
|---|
NbCatalogManager()
Constructor.
|
NbCatalogManager(java.lang.String propertyFile)
Constructor that specifies an explicit property file.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowOasisXMLCatalogPI()
Deprecated.
No longer static; use get/set methods.
|
java.lang.String |
catalogClassName()
Deprecated.
No longer static; use get/set methods.
|
java.util.Vector |
catalogFiles()
Deprecated.
No longer static; use get/set methods.
|
boolean |
getAllowOasisXMLCatalogPI()
Get the current XML Catalog PI setting.
|
BootstrapResolver |
getBootstrapResolver()
Get the bootstrap resolver.
|
Catalog |
getCatalog()
Get a catalog instance.
|
java.lang.String |
getCatalogClassName()
Get the current Catalog class name.
|
java.util.Vector |
getCatalogFiles()
Return the current list of catalog files.
|
boolean |
getIgnoreMissingProperties()
How are missing properties handled?
|
boolean |
getPreferPublic()
Return the current prefer public setting.
|
Catalog |
getPrivateCatalog()
Get a new catalog instance.
|
boolean |
getRelativeCatalogs()
Get the relativeCatalogs setting.
|
static CatalogManager |
getStaticManager()
Allow access to the static CatalogManager
|
boolean |
getUseStaticCatalog()
Get the current use static catalog setting.
|
int |
getVerbosity()
What is the current verbosity?
|
void |
ignoreMissingProperties(boolean ignore)
Deprecated.
No longer static; use get/set methods.
|
boolean |
preferPublic()
Deprecated.
No longer static; use get/set methods.
|
boolean |
queryAllowOasisXMLCatalogPI()
Obtain the oasisXMLCatalogPI setting from the properties.
|
java.lang.String |
queryCatalogClassName()
Obtain the Catalog class name setting from the properties.
|
boolean |
relativeCatalogs()
Deprecated.
No longer static; use get/set methods.
|
void |
setAllowOasisXMLCatalogPI(boolean allowPI)
Set the XML Catalog PI setting
|
void |
setBootstrapResolver(BootstrapResolver resolver)
Set the bootstrap resolver.
|
void |
setCatalogClassName(java.lang.String className)
Set the Catalog class name.
|
void |
setCatalogFiles(java.lang.String fileList)
Set the list of catalog files.
|
void |
setIgnoreMissingProperties(boolean ignore)
How should missing properties be handled?
|
void |
setPreferPublic(boolean preferPublic)
Set the prefer public setting.
|
void |
setRelativeCatalogs(boolean relative)
Set the relativeCatalogs setting.
|
void |
setUseStaticCatalog(boolean useStatic)
Set the use static catalog setting.
|
void |
setVerbosity(int verbosity)
Set the current verbosity.
|
boolean |
staticCatalog()
Deprecated.
No longer static; use get/set methods.
|
int |
verbosity()
Deprecated.
No longer static; use get/set methods.
|
public Debug debug
This field is public so that objects that have access to this CatalogManager can use this debug object.
public NbCatalogManager()
public NbCatalogManager(java.lang.String propertyFile)
propertyFile - path to poperty file (e.g. com/resources/CatalogManager).
null means that no property file is consulted at all.public void setBootstrapResolver(BootstrapResolver resolver)
setBootstrapResolver in class CatalogManagerpublic BootstrapResolver getBootstrapResolver()
getBootstrapResolver in class CatalogManagerpublic static CatalogManager getStaticManager()
public boolean getIgnoreMissingProperties()
If true, missing or unreadable property files will not be reported. Otherwise, a message will be sent to System.err.
getIgnoreMissingProperties in class CatalogManagerpublic void setIgnoreMissingProperties(boolean ignore)
If ignore is true, missing or unreadable property files will not be reported. Otherwise, a message will be sent to System.err.
setIgnoreMissingProperties in class CatalogManagerpublic void ignoreMissingProperties(boolean ignore)
If ignore is true, missing or unreadable property files will not be reported. Otherwise, a message will be sent to System.err.
ignoreMissingProperties in class CatalogManagerpublic int getVerbosity()
getVerbosity in class CatalogManagerpublic void setVerbosity(int verbosity)
setVerbosity in class CatalogManagerpublic int verbosity()
verbosity in class CatalogManagerpublic boolean getRelativeCatalogs()
This property is used when the catalogFiles property is interrogated. If true, then relative catalog entry file names are returned. If false, relative catalog entry file names are made absolute with respect to the properties file before returning them.
This property
In the properties, a value of 'yes', 'true', or '1' is considered true, anything else is false.
getRelativeCatalogs in class CatalogManagerpublic void setRelativeCatalogs(boolean relative)
setRelativeCatalogs in class CatalogManagergetRelativeCatalogs()public boolean relativeCatalogs()
relativeCatalogs in class CatalogManagerpublic java.util.Vector getCatalogFiles()
getCatalogFiles in class CatalogManagerpublic void setCatalogFiles(java.lang.String fileList)
setCatalogFiles in class CatalogManagerpublic java.util.Vector catalogFiles()
catalogFiles in class CatalogManagerpublic boolean getPreferPublic()
getPreferPublic in class CatalogManagerpublic void setPreferPublic(boolean preferPublic)
setPreferPublic in class CatalogManagerpublic boolean preferPublic()
preferPublic in class CatalogManagerpublic boolean getUseStaticCatalog()
getUseStaticCatalog in class CatalogManagerpublic void setUseStaticCatalog(boolean useStatic)
setUseStaticCatalog in class CatalogManagerpublic boolean staticCatalog()
staticCatalog in class CatalogManagerpublic Catalog getPrivateCatalog()
getPrivateCatalog in class CatalogManagerpublic Catalog getCatalog()
getCatalog in class CatalogManagerpublic boolean queryAllowOasisXMLCatalogPI()
Obtain the oasisXMLCatalogPI setting from the properties.
In the properties, a value of 'yes', 'true', or '1' is considered true, anything else is false.
queryAllowOasisXMLCatalogPI in class CatalogManagerpublic boolean getAllowOasisXMLCatalogPI()
getAllowOasisXMLCatalogPI in class CatalogManagerpublic void setAllowOasisXMLCatalogPI(boolean allowPI)
setAllowOasisXMLCatalogPI in class CatalogManagerpublic boolean allowOasisXMLCatalogPI()
allowOasisXMLCatalogPI in class CatalogManagerpublic java.lang.String queryCatalogClassName()
queryCatalogClassName in class CatalogManagerpublic java.lang.String getCatalogClassName()
getCatalogClassName in class CatalogManagerpublic void setCatalogClassName(java.lang.String className)
setCatalogClassName in class CatalogManagerpublic java.lang.String catalogClassName()
catalogClassName in class CatalogManagerCopyright ? 2001-2003 Apache Software Foundation. All Rights Reserved.