Package org.iso_relax.verifier
Class VerifierFactory
- java.lang.Object
-
- org.iso_relax.verifier.VerifierFactory
-
public abstract class VerifierFactory extends java.lang.ObjectVerifierFactory- Since:
- Feb. 23, 2001
-
-
Constructor Summary
Constructors Constructor Description VerifierFactory()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description SchemacompileSchema(java.io.File f)processes a schema into a Schema object, which is a compiled representation of a schema.SchemacompileSchema(java.io.InputStream stream)processes a schema into a Schema object, which is a compiled representation of a schema.SchemacompileSchema(java.io.InputStream stream, java.lang.String systemId)processes a schema into a Schema object, which is a compiled representation of a schema.SchemacompileSchema(java.lang.String url)processes a schema into a Schema object, which is a compiled representation of a schema.abstract SchemacompileSchema(org.xml.sax.InputSource is)processes a schema into a Schema object, which is a compiled representation of a schema.org.xml.sax.EntityResolvergetEntityResolver()Gets the current entity resolver, which was set by theSetEntityResolvermethod.java.lang.ObjectgetProperty(java.lang.String property)Gets property valuebooleanisFeature(java.lang.String feature)Indicates whether if the feature is supported, or not.static VerifierFactorynewInstance()Deprecated.static VerifierFactorynewInstance(java.lang.String language)static VerifierFactorynewInstance(java.lang.String language, java.lang.ClassLoader classLoader)Creates a new instance of a VerifierFactory for the specified schema language.VerifiernewVerifier(java.io.File file)parses a schema from the specified file and returns a Verifier object that validates documents by using that schema.VerifiernewVerifier(java.io.InputStream stream)parses a schema from the specified InputStream and returns a Verifier object that validates documents by using that schema.VerifiernewVerifier(java.io.InputStream stream, java.lang.String systemId)parses a schema from the specified InputStream and returns a Verifier object that validates documents by using that schema.VerifiernewVerifier(java.lang.String uri)parses a schema at the specified location and returns a Verifier object that validates documents by using that schema.VerifiernewVerifier(org.xml.sax.InputSource source)parses a schema from the specified InputSource and returns a Verifier object that validates documents by using that schema.voidsetEntityResolver(org.xml.sax.EntityResolver _resolver)Sets an EntityResolver This entity resolver is used to resolve entities encountered while parsing a schema.voidsetFeature(java.lang.String feature, boolean value)Sets feature valuevoidsetProperty(java.lang.String property, java.lang.Object value)Sets property value
-
-
-
Method Detail
-
newVerifier
public Verifier newVerifier(java.lang.String uri) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
parses a schema at the specified location and returns a Verifier object that validates documents by using that schema.Some of XML parsers accepts filenames as well as URLs, while others reject them. Therefore, to parse a file as a schema, you should use a File object.
- Parameters:
uri- URI of a schema file- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
newVerifier
public Verifier newVerifier(java.io.File file) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
parses a schema from the specified file and returns a Verifier object that validates documents by using that schema.- Parameters:
uri- File of a schema file- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
newVerifier
public Verifier newVerifier(java.io.InputStream stream) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
parses a schema from the specified InputStream and returns a Verifier object that validates documents by using that schema.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
newVerifier
public Verifier newVerifier(java.io.InputStream stream, java.lang.String systemId) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
parses a schema from the specified InputStream and returns a Verifier object that validates documents by using that schema.- Parameters:
systemId- System ID of this stream.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
newVerifier
public Verifier newVerifier(org.xml.sax.InputSource source) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
parses a schema from the specified InputSource and returns a Verifier object that validates documents by using that schema.- Parameters:
source- InputSource of a schema file- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
compileSchema
public abstract Schema compileSchema(org.xml.sax.InputSource is) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
compileSchema
public Schema compileSchema(java.lang.String url) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads.Some of XML parsers accepts filenames as well as URLs, while others reject them. Therefore, to parse a file as a schema, you should use a File object.
- Parameters:
url- A source url of a schema file to be compiled.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
compileSchema
public Schema compileSchema(java.io.InputStream stream) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads.- Parameters:
stream- A stream object that holds a schema.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
compileSchema
public Schema compileSchema(java.io.InputStream stream, java.lang.String systemId) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads.- Parameters:
systemId- The system Id of this input stream.- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
compileSchema
public Schema compileSchema(java.io.File f) throws VerifierConfigurationException, org.xml.sax.SAXException, java.io.IOException
processes a schema into a Schema object, which is a compiled representation of a schema. The obtained schema object can then be used concurrently across multiple threads.- Parameters:
file- A schema file to be compiled- Throws:
VerifierConfigurationExceptionorg.xml.sax.SAXExceptionjava.io.IOException
-
isFeature
public boolean isFeature(java.lang.String feature) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedExceptionIndicates whether if the feature is supported, or not.- Parameters:
feature- feature name- Throws:
org.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedException
-
setFeature
public void setFeature(java.lang.String feature, boolean value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedExceptionSets feature value- Parameters:
feature- feature namevalue- feature value- Throws:
org.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedException
-
getProperty
public java.lang.Object getProperty(java.lang.String property) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedExceptionGets property value- Parameters:
property- property name- Throws:
org.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedException
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value) throws org.xml.sax.SAXNotRecognizedException, org.xml.sax.SAXNotSupportedExceptionSets property value- Parameters:
property- property namevalue- property value- Throws:
org.xml.sax.SAXNotRecognizedExceptionorg.xml.sax.SAXNotSupportedException
-
setEntityResolver
public void setEntityResolver(org.xml.sax.EntityResolver _resolver)
Sets an EntityResolver This entity resolver is used to resolve entities encountered while parsing a schema.
-
getEntityResolver
public org.xml.sax.EntityResolver getEntityResolver()
Gets the current entity resolver, which was set by theSetEntityResolvermethod.
-
newInstance
public static VerifierFactory newInstance() throws VerifierConfigurationException
Deprecated.Creates a new instance of a VerifierFactory.- Throws:
VerifierConfigurationException
-
newInstance
public static VerifierFactory newInstance(java.lang.String language, java.lang.ClassLoader classLoader) throws VerifierConfigurationException
Creates a new instance of a VerifierFactory for the specified schema language.- Parameters:
language- URI that specifies the schema language.It is preferable to use the namespace URI of the schema language to designate the schema language. For example,
URI language http://relaxng.org/ns/structure/0.9 RELAX NG http://www.xml.gr.jp/xmlns/relaxCore RELAX Core http://www.xml.gr.jp/xmlns/relaxNamespace RELAX Namespace http://www.thaiopensource.com/trex TREX http://www.w3.org/2001/XMLSchema W3C XML Schema http://www.w3.org/XML/1998/namespace XML DTD classLoader- This class loader is used to search the available implementation.- Returns:
- a non-null valid VerifierFactory instance.
- Throws:
VerifierConfigurationException- if no implementation is available for the specified language.
-
newInstance
public static VerifierFactory newInstance(java.lang.String language) throws VerifierConfigurationException
- Throws:
VerifierConfigurationException
-
-