|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 2 (11.1.2.1.0) E17483-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.model.adapter.dataformat.xml.SchemaParser
public class SchemaParser
Attempts to parses the given XSD document even in cases where the
<import>
elements do not specify schemaLocation
attribute.
The parser works in a recursive fashion and parses the imported schemas and
namespaces in all the referred schemas. It builds a list of all the schemas
referred directly or indirectly and calls
XSDBuilder.build(XMLDocument[], URL)
to build the schema.
Input for parsing can be set using any of the addSchema
methods. Alternatively, if only one schema document is to be parser, one of
the parse
methods may be used. The parse
methods return XMLSchema
object representing the parsed
schema document.
Constructor Summary | |
---|---|
SchemaParser()
Creates a blank parser. |
Method Summary | |
---|---|
void |
addSchema(java.io.InputStream xsdStream)
Add a schema definition specified by its InputStream to the pipeline. |
void |
addSchema(Node node)
Add a schema defintion specified by the Node . |
void |
addSchema(java.io.Reader xsdReader)
Add a schema defintion specified by its Reader to the pipeline. |
void |
addSchema(java.lang.String xsdLocation)
Add a schema defintion specified by its URL location to the pipeline. |
void |
addSchema(java.net.URL xsdURL)
Add a schema defintion specified by its URL to the pipeline. |
SchemaMetadata |
getSchemaMetadata(java.lang.String targetNamespace)
Returns meta data of the schema given its target namespace. |
static void |
main(java.lang.String[] args)
|
XMLSchema |
parse()
Iterates the schema list, scans and parses the schema definitions specified therein. |
XMLSchema |
parse(java.io.InputStream xsdStream)
Parses the schema definition specified by its InputStream. |
XMLSchema |
parse(java.io.Reader xsdReader)
Parses the schema definition specified by its Reader. |
XMLSchema |
parse(java.lang.String xsdLocation)
Parses the schema definition specified by its URL location. |
XMLSchema |
parse(java.net.URL xsdURL)
Parses the schema definition specified by its URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaParser()
Method Detail |
---|
public XMLSchema parse(java.lang.String xsdLocation) throws java.lang.Exception
xsdLocation
- Location of the XSD document that is to be parsed.
XMLSchema
object.
java.lang.Exception
- If error occurs while parsing the schema/s.public XMLSchema parse(java.net.URL xsdURL) throws java.lang.Exception
xsdURL
- URL of the XSD document that is to be parsed.
XMLSchema
object.
java.lang.Exception
- If error occurs while parsing the schema/s.public XMLSchema parse(java.io.Reader xsdReader) throws java.lang.Exception
xsdReader
- Reader object containing the schema defintion.
XMLSchema
object.
java.lang.Exception
- If error occurs while parsing the schema/s.public XMLSchema parse(java.io.InputStream xsdStream) throws java.lang.Exception
xsdStream
- InputStream containing the schema definition.
XMLSchema
object.
java.lang.Exception
- If error occurs while parsing the schema/s.public void addSchema(java.lang.String xsdLocation) throws java.lang.Exception
xsdLocation
- URL location of the schema defintion.
java.lang.Exception
- If error occurs while adding this defintion to the
list. The URL location might be invalid or inaccessible.public void addSchema(java.net.URL xsdURL) throws java.lang.Exception
xsdURL
- URL of the schema definition.
java.lang.Exception
- If error occus while adding this definition to the
list. The URL might be invalid or inaccessible.public void addSchema(java.io.Reader xsdReader)
xsdReader
- Reader
object containing the schema
definition.public void addSchema(java.io.InputStream xsdStream)
xsdStream
- InputStream
object containing the schema
definition.public void addSchema(Node node)
Node
.
node
- Root node of the schema defintion.public SchemaMetadata getSchemaMetadata(java.lang.String targetNamespace)
targetNamespace
- Target namespace of the schema document whose meta
data is required
SchemaMetadata
object enclosing the
schema's meta data. If the target namespace does not exist,
null
is returned.public XMLSchema parse() throws java.lang.Exception
java.lang.Exception
- If error occurs while parsing the schema definitions.public static void main(java.lang.String[] args)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 2 (11.1.2.1.0) E17483-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |