APIdia Launch Partner
Top Description Fields Constructors Methods
javax.xml.catalog

pack-priv Class CatalogImpl

extends GroupEntry
implements Catalog
Class Inheritance
All Implemented Interfaces
javax.xml.catalog.Catalog
Imports
com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl, java.io.IOException, java.net.MalformedURLException, .URI, .URL, java.util.ArrayList, .Iterator, .List, .NoSuchElementException, .Spliterator, .Spliterators, java.util.stream.Stream, .StreamSupport, javax.xml.catalog.CatalogFeatures.Feature, .CatalogResolver.NotFoundAction, javax.xml.parsers.ParserConfigurationException, .SAXParser, .SAXParserFactory, org.xml.sax.SAXException

Implementation of the Catalog.
Since
9

Field Summary

Modifier and TypeField and Description
pack-priv int
pack-priv List<String>
pack-priv boolean
pack-priv boolean
pack-priv int
pack-priv List<NextCatalog>
pack-priv SAXParser
pack-priv CatalogResolver.NotFoundAction
pack-priv String
Inherited from javax.xml.catalog.GroupEntry:
ATTRIBUTE_DEFFERATTRIBUTE_PREFERATTRIBUTE_RESOLUTIONcatalogcatalogsSearcheddelegateCatalogsentriesfeaturesisInstantMatchisPreferPublicloadedCatalogslongestRewriteMatchlongestSuffixMatchparentrewriteMatchshouldKeepStatesuffixMatchsystemEntrySearched

Constructor Summary

AccessConstructor and Description
public
CatalogImpl(CatalogFeatures
the features object
f
,
URI...
the uri(s) to one or more catalogs
uris
)

Construct a Catalog with specified URI.

public
CatalogImpl(CatalogImpl
The parent catalog
parent
,
CatalogFeatures
the features object
f
,
URI...
the uri(s) to one or more catalogs
uris
)

Construct a Catalog with specified URI.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addNextCatalog(NextCatalog
a catalog specified in a nextCatalog entry
catalog
)

Adds the catalog to the nextCatalog list

public Stream<Catalog>
catalogs()

Implements javax.xml.catalog.Catalog.catalogs.

Returns a sequential Stream of alternative Catalogs specified using the nextCatalog entries in the current catalog, and as the input of catalog files excluding the current catalog (that is, the first in the input list) when the Catalog object is created by the CatalogManager.

pack-priv Catalog

Returns:

a Catalog object
getCatalog
(CatalogImpl
the parent catalog for the alternative catalogs to be loaded. It will be null if the ones to be loaded are from the input list.
parent
,
URI
the path to a catalog
uri
)

Returns a Catalog object by the specified path.

public Catalog

Returns:

The parent catalog
getParent
()

Gets the parent of this catalog.

private SAXParser

Returns:

a SAXParser instance
getParser
()

Returns a SAXParser instance

public final CatalogResolver.NotFoundAction

Returns:

The value of the resolve attribute
getResolve
()

Gets the value of the resolve attribute

private void
public boolean

Returns:

true if the prefer attribute is set to system, false if not.
isDeferred
()

Queries the defer attribute

public boolean

Returns:

True if the catalog is empty; False otherwise.
isEmpty
()

Indicate that the catalog is empty

pack-priv boolean

Returns:

true if the instance is the top Catalog, false otherwise
isTop
()

Returns whether this Catalog instance is the top (main) Catalog.

pack-priv void
load()

Loads the catalog

pack-priv int

Returns:

a count of all loaded catalogs
loadedCatalogCount
()

Returns a count of all loaded catalogs, including delegate catalogs.

pack-priv void
loadNextCatalogs()

Loads all alternative catalogs.

pack-priv void
markAsSearched()

Marks the Catalog as being searched already.

private void
parse(String
The systemId of the catalog
systemId
)

Parses the catalog.

public void
reset()

Overrides javax.xml.catalog.GroupEntry.reset.

Resets the Catalog instance to its initial state.

pack-priv void
saveLoadedCatalog(String
the catalogId associated with the Catalog object
catalogId
,
CatalogImpl
the Catalog to be saved
c
)

Saves a loaded Catalog.

public final void
setDeferred(String
The value of the defer attribute
value
)

Sets the defer property.

public final void
setResolve(String
The value of the resolve attribute
value
)

Sets the resolve property.

Inherited from javax.xml.catalog.GroupEntry:
addEntrygetLoadedCatalogisCircularisPreferPublicloadDelegateCatalogloadDelegateCatalogsmatchPublicmatchSystemmatchURIresolvesetCatalogsetPreferverifyCatalogFile

Field Detail

currentback to summary
pack-priv int current
inputFilesback to summary
pack-priv List<String> inputFiles
isDeferredback to summary
pack-priv boolean isDeferred
isEmptyback to summary
pack-priv boolean isEmpty
levelback to summary
pack-priv int level
nextCatalogsback to summary
pack-priv List<NextCatalog> nextCatalogs
parserback to summary
pack-priv SAXParser parser
resolveTypeback to summary
pack-priv CatalogResolver.NotFoundAction resolveType
systemIdback to summary
pack-priv String systemId

Constructor Detail

CatalogImplback to summary
public CatalogImpl(CatalogFeatures f, URI... uris) throws CatalogException

Construct a Catalog with specified URI.

Parameters
f:CatalogFeatures

the features object

uris:URI[]

the uri(s) to one or more catalogs

Exceptions
CatalogException:
If an error happens while parsing the specified catalog file.
CatalogImplback to summary
public CatalogImpl(CatalogImpl parent, CatalogFeatures f, URI... uris) throws CatalogException

Construct a Catalog with specified URI.

Parameters
parent:CatalogImpl

The parent catalog

f:CatalogFeatures

the features object

uris:URI[]

the uri(s) to one or more catalogs

Exceptions
CatalogException:
If an error happens while parsing the specified catalog file.

Method Detail

addNextCatalogback to summary
pack-priv void addNextCatalog(NextCatalog catalog)

Adds the catalog to the nextCatalog list

Parameters
catalog:NextCatalog

a catalog specified in a nextCatalog entry

catalogsback to summary
public Stream<Catalog> catalogs()

Implements javax.xml.catalog.Catalog.catalogs.

Doc from javax.xml.catalog.Catalog.catalogs.

Returns a sequential Stream of alternative Catalogs specified using the nextCatalog entries in the current catalog, and as the input of catalog files excluding the current catalog (that is, the first in the input list) when the Catalog object is created by the CatalogManager.

The order of Catalogs in the returned stream is the same as the order in which the corresponding nextCatalog entries appear in the current catalog. The alternative catalogs from the input file list are appended to the end of the stream in the order they are entered.

Annotations
@Override
getCatalogback to summary
pack-priv Catalog getCatalog(CatalogImpl parent, URI uri)

Returns a Catalog object by the specified path.

Parameters
parent:CatalogImpl

the parent catalog for the alternative catalogs to be loaded. It will be null if the ones to be loaded are from the input list.

uri:URI

the path to a catalog

Returns:Catalog

a Catalog object

getParentback to summary
public Catalog getParent()

Gets the parent of this catalog.

Returns:Catalog

The parent catalog

getParserback to summary
private SAXParser getParser()

Returns a SAXParser instance

Returns:SAXParser

a SAXParser instance

Exceptions
CatalogException:
if constructing a SAXParser failed
getResolveback to summary
public final CatalogResolver.NotFoundAction getResolve()

Gets the value of the resolve attribute

Returns:CatalogResolver.NotFoundAction

The value of the resolve attribute

initback to summary
private void init(CatalogFeatures f)
isDeferredback to summary
public boolean isDeferred()

Queries the defer attribute

Returns:boolean

true if the prefer attribute is set to system, false if not.

isEmptyback to summary
public boolean isEmpty()

Indicate that the catalog is empty

Returns:boolean

True if the catalog is empty; False otherwise.

isTopback to summary
pack-priv boolean isTop()

Returns whether this Catalog instance is the top (main) Catalog.

Returns:boolean

true if the instance is the top Catalog, false otherwise

loadback to summary
pack-priv void load()

Loads the catalog

loadedCatalogCountback to summary
pack-priv int loadedCatalogCount()

Returns a count of all loaded catalogs, including delegate catalogs.

Returns:int

a count of all loaded catalogs

loadNextCatalogsback to summary
pack-priv void loadNextCatalogs()

Loads all alternative catalogs.

markAsSearchedback to summary
pack-priv void markAsSearched()

Marks the Catalog as being searched already.

parseback to summary
private void parse(String systemId)

Parses the catalog.

Parameters
systemId:String

The systemId of the catalog

Exceptions
CatalogException:
if parsing the catalog failed
resetback to summary
public void reset()

Overrides javax.xml.catalog.GroupEntry.reset.

Resets the Catalog instance to its initial state.

Annotations
@Override
saveLoadedCatalogback to summary
pack-priv void saveLoadedCatalog(String catalogId, CatalogImpl c)

Saves a loaded Catalog.

Parameters
catalogId:String

the catalogId associated with the Catalog object

c:CatalogImpl

the Catalog to be saved

setDeferredback to summary
public final void setDeferred(String value)

Sets the defer property. If the value is null or empty, or any String other than the defined, it will be assumed as the default value.

Parameters
value:String

The value of the defer attribute

setResolveback to summary
public final void setResolve(String value)

Sets the resolve property. If the value is null or empty, or any String other than the defined, it will be assumed as the default value.

Parameters
value:String

The value of the resolve attribute