Class SchemaValidate.SchemaLocation
java.lang.Object
org.apache.tools.ant.taskdefs.optional.SchemaValidate.SchemaLocation
- Enclosing class:
SchemaValidate
representation of a schema location. This is a URI plus either a file or
a url
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
equality test checks namespace, location and filename.getFile()
Get the file.Get the namespace.get the URL of the schemavalidate the fields then create a "uri location" stringgetUrl()
The URL containing the schema.int
hashCode()
Generate a hashcode depending on the namespace, url and file name.void
identify a file that contains this namespace's schema.void
setNamespace
(String namespace) set the namespace of this schema.void
identify a URL that hosts the schema.toString()
Returns a string representation of the object for error messages and the likevoid
assert that a namespace is valid
-
Field Details
-
ERROR_NO_URI
-
ERROR_TWO_LOCATIONS
-
ERROR_NO_FILE
-
ERROR_NO_URL_REPRESENTATION
-
ERROR_NO_LOCATION
-
-
Constructor Details
-
SchemaLocation
public SchemaLocation()
-
-
Method Details
-
getNamespace
-
setNamespace
set the namespace of this schema. Any URI- Parameters:
namespace
- the namespace to use.
-
getFile
-
setFile
identify a file that contains this namespace's schema. The file must exist.- Parameters:
file
- the file contains the schema.
-
getUrl
-
setUrl
identify a URL that hosts the schema.- Parameters:
url
- the URL string.
-
getSchemaLocationURL
get the URL of the schema- Returns:
- a URL to the schema
- Throws:
BuildException
- if not
-
getURIandLocation
validate the fields then create a "uri location" string- Returns:
- string of uri and location
- Throws:
BuildException
- if there is an error.
-
validateNamespace
-
equals
-
hashCode
-
toString
-