public final class CatalogManager extends Object
Modifier and Type | Method | Description |
---|---|---|
static Catalog |
catalog(CatalogFeatures features,
URI... uris) |
Creates a
Catalog object using the specified feature settings and
uri(s) to one or more catalog files. |
static CatalogResolver |
catalogResolver(Catalog catalog) |
Creates an instance of a
CatalogResolver using the specified catalog. |
static CatalogResolver |
catalogResolver(CatalogFeatures features,
URI... uris) |
Creates an instance of a
CatalogResolver using the specified feature
settings and uri(s) to one or more catalog files. |
public static Catalog catalog(CatalogFeatures features, URI... uris)
Catalog
object using the specified feature settings and
uri(s) to one or more catalog files.
If uris
is empty, system property javax.xml.catalog.files
,
as defined in CatalogFeatures
, will be read to locate the initial
list of catalog files.
If multiple catalog files are specified through the uris
argument or
javax.xml.catalog.files
property, the first entry is considered
the main catalog, while others are treated as alternative catalogs after
those referenced by the nextCatalog
elements in the main catalog.
As specified in XML Catalogs, OASIS Standard V1.1, if a catalog entry is invalid, it is ignored. In case all entries are invalid, the resulting Catalog object will contain no Catalog elements. Any matching operation using the Catalog will return null.
features
- the catalog featuresuris
- uri(s) to one or more catalogs.Catalog
IllegalArgumentException
- if either the URIs are not absolute
or do not have a URL protocol handler for the URI schemeCatalogException
- If an error occurs while parsing the catalogSecurityException
- if access to the resource is denied by the security managerpublic static CatalogResolver catalogResolver(Catalog catalog)
CatalogResolver
using the specified catalog.catalog
- the catalog instanceCatalogResolver
public static CatalogResolver catalogResolver(CatalogFeatures features, URI... uris)
CatalogResolver
using the specified feature
settings and uri(s) to one or more catalog files.
If uris
is empty, system property javax.xml.catalog.files
,
as defined in CatalogFeatures
, will be read to locate the initial
list of catalog files.
If multiple catalog files are specified through the uris
argument or
javax.xml.catalog.files
property, the first entry is considered
the main catalog, while others are treated as alternative catalogs after
those referenced by the nextCatalog
elements in the main catalog.
As specified in
XML Catalogs, OASIS Standard V1.1, if a catalog entry is invalid, it
is ignored. In case all entries are invalid, the resulting CatalogResolver
object will contain no valid catalog. Any resolution operation using the
resolver therefore will return as no mapping is found. See CatalogResolver
for the behavior when no mapping is found.
features
- the catalog featuresuris
- the uri(s) to one or more catalogsCatalogResolver
IllegalArgumentException
- if either the URIs are not absolute
or do not have a URL protocol handler for the URI schemeCatalogException
- If an error occurs while parsing the catalogSecurityException
- if access to the resource is denied by the security manager Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2017, Oracle and/or its affiliates. 500 Oracle Parkway
Redwood Shores, CA 94065 USA. All rights reserved.
DRAFT 9-internal+0-adhoc.mlchung.jdk9-jdeps