org.apache.tools.ant.taskdefs.optional
Class SchemaValidate.SchemaLocation
java.lang.Object
org.apache.tools.ant.taskdefs.optional.SchemaValidate.SchemaLocation
- SchemaValidate
public static class SchemaValidate.SchemaLocation
extends java.lang.Object
representation of a schema location. This is a URI plus either a file or
a url
boolean | equals(Object o) - equality test checks namespace, location and filename.
|
File | getFile() - Get the file.
|
String | getNamespace() - Get the namespace.
|
String | getSchemaLocationURL() - get the URL of the schema
|
String | getURIandLocation() - validate the fields then create a "uri location" string
|
String | getUrl() - The URL containing the schema.
|
int | hashCode() - Generate a hashcode depending on the namespace, url and file name.
|
void | setFile(File file) - identify a file that contains this namespace's schema.
|
void | setNamespace(String namespace) - set the namespace of this schema.
|
void | setUrl(String url) - identify a URL that hosts the schema.
|
String | toString() - Returns a string representation of the object for error messages
and the like
|
void | validateNamespace() - assert that a namespace is valid
|
ERROR_NO_FILE
public static final String ERROR_NO_FILE
File not found
ERROR_NO_LOCATION
public static final String ERROR_NO_LOCATION
No location provided
ERROR_NO_URI
public static final String ERROR_NO_URI
No namespace URI
ERROR_NO_URL_REPRESENTATION
public static final String ERROR_NO_URL_REPRESENTATION
Cannot make URL
ERROR_TWO_LOCATIONS
public static final String ERROR_TWO_LOCATIONS
Both URL and File were given for schema
SchemaLocation
public SchemaLocation()
No arg constructor
equals
public boolean equals(Object o)
equality test checks namespace, location and filename. All must match,
o
- object to compare against
- true iff the objects are considered equal in value
getFile
public File getFile()
Get the file.
- the file containing the schema.
getNamespace
public String getNamespace()
Get the namespace.
getSchemaLocationURL
public String getSchemaLocationURL()
get the URL of the schema
getURIandLocation
public String getURIandLocation()
throws BuildException
validate the fields then create a "uri location" string
- string of uri and location
getUrl
public String getUrl()
The URL containing the schema.
hashCode
public int hashCode()
Generate a hashcode depending on the namespace, url and file name.
setFile
public void setFile(File file)
identify a file that contains this namespace's schema.
The file must exist.
file
- the file contains the schema.
setNamespace
public void setNamespace(String namespace)
set the namespace of this schema. Any URI
namespace
- the namespace to use.
setUrl
public void setUrl(String url)
identify a URL that hosts the schema.
toString
public String toString()
Returns a string representation of the object for error messages
and the like
- a string representation of the object.
validateNamespace
public void validateNamespace()
assert that a namespace is valid