Class CatalogManager
- Since:
- 9
-
Method Summary
Modifier and TypeMethodDescriptionstatic Catalogcatalog(CatalogFeatures features, URI... uris) Creates aCatalogobject using the specified feature settings and uri(s) to one or more catalog files.static CatalogResolvercatalogResolver(Catalog catalog) Creates an instance of aCatalogResolverusing the specified catalog.static CatalogResolvercatalogResolver(CatalogFeatures features, URI... uris) Creates an instance of aCatalogResolverusing the specified feature settings and uri(s) to one or more catalog files.static CatalogResolvercatalogResolver(Catalog catalog, CatalogResolver.NotFoundAction action) Creates aCatalogResolverthat resolves external references with the givencatalogandactiontype that determines the behavior when unable to resolve a reference.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.booleanCompares the argument to the receiver, and answers true if they represent the same object using a class specific comparison.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.May cause performance issues, deadlocks and hangs.getClass()Answers the unique instance of java.lang.Class which represents the class of the receiver.inthashCode()Answers an integer hash code for the receiver.final voidnotify()Causes one thread which iswaiting on the receiver to be made ready to run.final voidCauses all threads which arewaiting on the receiver to be made ready to run.toString()Answers a string containing a concise, human-readable description of the receiver.final voidwait()Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated bynotifyornotifyAll).final voidwait(long time) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.final voidwait(long time, int frac) Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated bynotifyornotifyAll) or the expiration of the timeout.
-
Method Details
-
catalog
Creates aCatalogobject using the specified feature settings and uri(s) to one or more catalog files.If
urisis empty, system propertyjavax.xml.catalog.files, as defined inCatalogFeatures, will be read to locate the initial list of catalog files.If multiple catalog files are specified through the
urisargument orjavax.xml.catalog.filesproperty, the first entry is considered the main catalog, while others are treated as alternative catalogs after those referenced by thenextCatalogelements 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.
- Parameters:
features- the catalog featuresuris- uri(s) to one or more catalogs.- Returns:
- an instance of a
Catalog - Throws:
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 catalog
-
catalogResolver
Creates an instance of aCatalogResolverusing the specified catalog.- API Note:
- The
CatalogResolvercreated by this method delegates to the underlyingcatalog's RESOLVE property. TheCatalogResolvercreated bycatalogResover(Catalog, CatalogResolver.NotFoundAction)is based on the specified action type when it is unable to resolve a reference. - Parameters:
catalog- the catalog instance- Returns:
- an instance of a
CatalogResolver
-
catalogResolver
public static CatalogResolver catalogResolver(Catalog catalog, CatalogResolver.NotFoundAction action) Creates aCatalogResolverthat resolves external references with the givencatalogandactiontype that determines the behavior when unable to resolve a reference.The
actiontypes are mapped to the values of theRESOLVEproperty.- Parameters:
catalog- the catalog instanceaction- the action to be taken when unable to resolve a reference- Returns:
- a
CatalogResolverwith thecatalogandactiontype - Since:
- 22
-
catalogResolver
Creates an instance of aCatalogResolverusing the specified feature settings and uri(s) to one or more catalog files.If
urisis empty, system propertyjavax.xml.catalog.files, as defined inCatalogFeatures, will be read to locate the initial list of catalog files.If multiple catalog files are specified through the
urisargument orjavax.xml.catalog.filesproperty, the first entry is considered the main catalog, while others are treated as alternative catalogs after those referenced by thenextCatalogelements 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
CatalogResolverfor the behavior when no mapping is found.- Parameters:
features- the catalog featuresuris- the uri(s) to one or more catalogs- Returns:
- an instance of a
CatalogResolver - Throws:
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 catalog
-