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
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanequality 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.inthashCode()Generate a hashcode depending on the namespace, url and file name.voididentify a file that contains this namespace's schema.voidsetNamespace(String namespace) set the namespace of this schema.voididentify a URL that hosts the schema.toString()Returns a string representation of the object for error messages and the likevoidassert that a namespace is valid
-
Field Details
-
ERROR_NO_URI
No namespace URI- See Also:
-
ERROR_TWO_LOCATIONS
Both URL and File were given for schema- See Also:
-
ERROR_NO_FILE
File not found- See Also:
-
ERROR_NO_URL_REPRESENTATION
Cannot make URL- See Also:
-
ERROR_NO_LOCATION
No location provided- See Also:
-
-
Constructor Details
-
SchemaLocation
public SchemaLocation()
-
-
Method Details
-
getNamespace
Get the namespace.- Returns:
- the namespace.
-
setNamespace
set the namespace of this schema. Any URI- Parameters:
namespace- the namespace to use.
-
getFile
Get the file.- Returns:
- the file containing the schema.
-
setFile
identify a file that contains this namespace's schema. The file must exist.- Parameters:
file- the file contains the schema.
-
getUrl
The URL containing the schema.- Returns:
- the URL string.
-
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
public void validateNamespace()assert that a namespace is valid- Throws:
BuildException- if not
-
equals
equality test checks namespace, location and filename. All must match, -
hashCode
public int hashCode()Generate a hashcode depending on the namespace, url and file name. -
toString
Returns a string representation of the object for error messages and the like
-