org.apache.avalon.excalibur.catalog
Class CatalogReader

java.lang.Object
  |
  +--org.apache.avalon.excalibur.catalog.CatalogReader

public class CatalogReader
extends java.lang.Object

Parses OASIS Open Catalog files.

This class reads OASIS Open Catalog files, returning a stream of tokens.

This code interrogates the following non-standard system properties:

xml.catalog.debug

Sets the debug level. A value of 0 is assumed if the property is not set or is not a number.

Version:
1.0
Author:
Arbortext, Inc., Norman Walsh
See Also:
Catalog

Field Summary
 int debug
           The debug level
 
Constructor Summary
CatalogReader()
           Construct a CatalogReader object.
 
Method Summary
protected  void finalize()
           The destructor.
 CatalogEntry nextEntry()
           Get the next entry from the file
static java.lang.String normalize(java.lang.String publicId)
           Normalize a public identifier.
 void parseCatalog(java.lang.String fileUrl)
           Start parsing an OASIS Open Catalog file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public int debug

The debug level

In general, higher numbers produce more information:

Constructor Detail

CatalogReader

public CatalogReader()

Construct a CatalogReader object.

Method Detail

normalize

public static java.lang.String normalize(java.lang.String publicId)

Normalize a public identifier.

Public identifiers must be normalized according to the following rules before comparisons between them can be made:

This method is declared static so that other classes can use it directly.

Parameters:
publicId - The unnormalized public identifier.
Returns:
The normalized identifier.

parseCatalog

public void parseCatalog(java.lang.String fileUrl)
                  throws java.net.MalformedURLException,
                         java.io.IOException

Start parsing an OASIS Open Catalog file. The file is actually read and parsed as needed by nextEntry .

Parameters:
fileUrl - The URL or filename of the catalog file to process
Throws:
java.net.MalformedURLException - Improper fileUrl
java.io.IOException - Error reading catalog file

nextEntry

public CatalogEntry nextEntry()
                       throws java.io.IOException

Get the next entry from the file

Returns:
A CatalogEntry object for the next entry in the catalog
Throws:
java.io.IOException - Error reading catalog file

finalize

protected void finalize()
                 throws java.io.IOException

The destructor.

Makes sure the catalog file is closed.

Overrides:
finalize in class java.lang.Object
Throws:
java.io.IOException - DOC: Insert Description of Exception


Copyright © 2001 Apache Jakarta Project. All Rights Reserved.