org.exolab.castor.xml.schema.reader
Class SchemaLocation

java.lang.Object
  extended by org.exolab.castor.net.URILocation
      extended by org.exolab.castor.xml.schema.reader.SchemaLocation

public final class SchemaLocation
extends URILocation

An implementation of URILocation for applications that need to resolve an XML Schema in a non-standard way, such as a Schema embedded in another XML document, or a Schema created in-memory, etc.

Version:
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:41 $
Author:
Keith Visco

Constructor Summary
SchemaLocation(Schema schema, java.lang.String href)
          Creates a new SchemaLocation
 
Method Summary
 java.lang.String getAbsoluteURI()
          Returns the absolute URI for this URILocation
 java.lang.String getBaseURI()
          Returns the base location of this URILocation.
 java.io.Reader getReader()
          Returns a Reader for the resource represented by this URILocation.
 java.lang.String getRelativeURI()
          Returns the relative URI for this URILocation
 Schema getSchema()
          Returns the Schema for this SchemaLocation, or null if this SchemaLocation was not constructed with a Schema object.
 java.lang.String toString()
          Returns the String representation of this URILocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SchemaLocation

public SchemaLocation(Schema schema,
                      java.lang.String href)
Creates a new SchemaLocation

Parameters:
schema - the Schema that represents the resource at identified by this URILocation
href - the absolute URL for the resource identified by this URILocation.
Method Detail

getAbsoluteURI

public java.lang.String getAbsoluteURI()
Returns the absolute URI for this URILocation

Specified by:
getAbsoluteURI in class URILocation
Returns:
the absolute URI for this URILocation
See Also:
getRelativeURI, getBaseURI

getBaseURI

public java.lang.String getBaseURI()
Returns the base location of this URILocation. If this URILocation is an URL, the base location will be equivalent to the document base for the URL.

Specified by:
getBaseURI in class URILocation
Returns:
the base location of this URILocation
See Also:
getAbsoluteURI, getRelativeURI

getReader

public java.io.Reader getReader()
                         throws java.io.IOException
Returns a Reader for the resource represented by this URILocation. Note: This method always returns null for this URILocation

Specified by:
getReader in class URILocation
Returns:
a Reader for the resource represented by this URILocation
Throws:
java.io.FileNotFoundException
java.io.IOException

getRelativeURI

public java.lang.String getRelativeURI()
Returns the relative URI for this URILocation

Specified by:
getRelativeURI in class URILocation
Returns:
the relative URI for this URILocation
See Also:
getAbsoluteURI, getBaseURI

getSchema

public Schema getSchema()
Returns the Schema for this SchemaLocation, or null if this SchemaLocation was not constructed with a Schema object.

Returns:
the Schema for this SchemaLocation, or null if no Schema object was set.

toString

public java.lang.String toString()
Returns the String representation of this URILocation.

Overrides:
toString in class URILocation
Returns:
the String representation of this URILocation


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com