Package com.jcabi.xml
Class XSDDocument
java.lang.Object
com.jcabi.xml.XSDDocument
- All Implemented Interfaces:
XSD
Deprecated.
Implementation of
XSD.
Objects of this class are immutable and thread-safe.
- Since:
- 0.5
- Suppressed Checkstyle violations:
- AbbreviationAsWordInNameCheck (5 lines)
-
Constructor Summary
ConstructorsConstructorDescriptionXSDDocument(XML src) Deprecated.Public ctor, from XSD as a source.XSDDocument(File file) Deprecated.Public ctor, from file.XSDDocument(InputStream stream) Deprecated.Public ctor, from XSD as an input stream.XSDDocument(String src) Deprecated.Public ctor, from XSD as a string.XSDDocument(URI uri) Deprecated.Public ctor, from URI.XSDDocument(URL url) Deprecated.Public ctor, from URL.XSDDocument(Path file) Deprecated.Public ctor, from file. -
Method Summary
Modifier and TypeMethodDescriptionstatic XSDmake(InputStream stream) Deprecated.Make an instance of XSD schema without I/O exceptions.static XSDDeprecated.Make an instance of XSD schema without I/O exceptions.toString()Deprecated.Deprecated.Validate XML.
-
Constructor Details
-
XSDDocument
Deprecated.Public ctor, from XSD as a source.- Parameters:
src- XSD document body
-
XSDDocument
Deprecated.Public ctor, from XSD as a string.- Parameters:
src- XSD document body
-
XSDDocument
Deprecated.Public ctor, from URL.- Parameters:
url- Location of document- Throws:
IOException- If fails to read- Since:
- 0.7.4
-
XSDDocument
Deprecated.Public ctor, from file.- Parameters:
file- Location of document- Throws:
FileNotFoundException- If fails to read- Since:
- 0.21
-
XSDDocument
Deprecated.Public ctor, from file.- Parameters:
file- Location of document- Throws:
FileNotFoundException- If fails to read- Since:
- 0.21
-
XSDDocument
Deprecated.Public ctor, from URI.- Parameters:
uri- Location of document- Throws:
IOException- If fails to read- Since:
- 0.15
-
XSDDocument
Deprecated.Public ctor, from XSD as an input stream.- Parameters:
stream- XSD input stream
-
-
Method Details
-
make
Deprecated.Make an instance of XSD schema without I/O exceptions.This factory method is useful when you need to create an instance of XSD schema as a static final variable. In this case you can't catch an exception but this method can help, for example:
class Foo { private static final XSD SCHEMA = XSDDocument.make( Foo.class.getResourceAsStream("my-schema.xsd") ); }- Parameters:
stream- Input stream- Returns:
- XSD schema
-
make
Deprecated.Make an instance of XSD schema without I/O exceptions.- Parameters:
url- URL with content- Returns:
- XSD schema
- Since:
- 0.7.4
- See Also:
-
toString
Deprecated. -
validate
Deprecated.Description copied from interface:XSDValidate XML.
-
StrictXMLwith a schema provided in the constructor. Otherwise, you can useXMLDocumentand validate the XML against the schema via theXMLDocument.validate(XML)method.