Skip navigation links
Oracle Fusion Middleware Java API Reference for Oracle ADF Model
12c (12.2.1.3.0)

E80079-01
oracle.adf.model.adapter.dataformat

Class XSDHandler

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String ARRAY_ITEM 
      static java.lang.String ENUMERATION 
      static java.lang.String LEAFELEMENT_DATA 
      static java.lang.String MAX_OCCURS 
      static java.lang.String MIN_OCCURS 
      static java.lang.String NAMESPACE 
      static java.lang.String NILLABLE 
      static java.lang.String TYPE
      A set of constants that are retrieved from a type and stored in its 'properties'.
    • Constructor Summary

      Constructors 
      Constructor and Description
      XSDHandler() 
      XSDHandler(java.lang.String rootName)
      Initialises the XML Data Structure with a name.
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method and Description
      void addSchema(java.io.InputStream xsdStream)
      Add a schema definition specified by its InputStream to the pipeline.
      void addSchema(org.w3c.dom.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.
      void build()
      Builds the object and initialises the member variables for use.
      java.lang.String getRootElementName() 
      java.lang.String getSchemaProperty(java.lang.String targetNamespace, java.lang.String name)
      Returns the property value of the schema given its namespace and name.
      StructureDefinition getSchemaTree()
      Returns the XSD tree in the form of StructureDefinition.
      StructureDefinition getStructure(java.lang.String name, DefinitionContext ctx)
      Returns the structure definition extracted for the data format.
      java.util.List getTopLevelElements()
      Returns an List of the top-level elements in all the namespaces defined in this schema.
      java.lang.Object getType(java.lang.String namespace, java.lang.String typeName)
      Returns the AccessorDef or a AttributeDef representation of a type given its namespace.
      boolean isAttributeFormDefault(java.lang.String targetNamespace)
      Determines if the attributes in the given namespace is qualified.
      boolean isElementFormDefault(java.lang.String targetNamespace)
      Determines if the elements in the given namespace is qualified.
      boolean isNamespaceDefined(java.lang.String namespace)
      Determines if the given namespace is defined in the current schema.
      boolean isValidRootElemExist()
      Deprecated. 
      since 12.1.3.0.0
      void printAllTypes() 
      void printProperties(java.util.Map props, java.lang.String padding) 
      void printSchemaMetadata() 
      void printTree(StructureDefinition struct, int indent) 
      void setNormalized(boolean normalized)
      Deprecated.  
      void setProceedChild(boolean proceedChild)
      Deprecated. 
      Do not use the method.
      void setRootBindingPath(java.lang.String path)
      Sets the root bind path.
      void setRootElementName(java.lang.String rootElemName)
      Sets the root element name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XSDHandler

        public XSDHandler()
      • XSDHandler

        public XSDHandler(java.lang.String rootName)
        Initialises the XML Data Structure with a name.
        Parameters:
        rootName - Name for the XML data structure
    • Method Detail

      • setRootElementName

        public void setRootElementName(java.lang.String rootElemName)
        Sets the root element name.
        Parameters:
        rootElemName - root element name.
      • getRootElementName

        public java.lang.String getRootElementName()
      • setProceedChild

        public void setProceedChild(boolean proceedChild)
        Deprecated. Do not use the method.
        Parameters:
        proceedChild -
      • addSchema

        public void addSchema(java.lang.String xsdLocation)
                       throws AdapterException
        Add a schema defintion specified by its URL location to the pipeline.
        Parameters:
        xsdLocation - URL location of the schema defintion.
        Throws:
        AdapterException - If error occurs while adding this defintion to the list. The URL location might be invalid or inaccessible.
      • addSchema

        public void addSchema(java.net.URL xsdURL)
                       throws AdapterException
        Add a schema defintion specified by its URL to the pipeline.
        Parameters:
        xsdURL - URL of the schema definition.
        Throws:
        AdapterException - If error occus while adding this definition to the list. The URL might be invalid or inaccessible.
      • addSchema

        public void addSchema(java.io.Reader xsdReader)
        Add a schema defintion specified by its Reader to the pipeline.
        Parameters:
        xsdReader - Reader object containing the schema definition.
      • addSchema

        public void addSchema(java.io.InputStream xsdStream)
        Add a schema definition specified by its InputStream to the pipeline.
        Parameters:
        xsdStream - InputStream object containing the schema definition.
      • addSchema

        public void addSchema(org.w3c.dom.Node node)
        Add a schema defintion specified by the Node.
        Parameters:
        node - Root node of the schema defintion.
      • setRootBindingPath

        public void setRootBindingPath(java.lang.String path)
        Sets the root bind path.
        Parameters:
        path - root binding.
      • build

        public void build()
                   throws AdapterException
        Builds the object and initialises the member variables for use.

        This method must be called after setting up the input using any of the addSchema methods and before calling any of the helper methods.

        Throws:
        AdapterException - If error occurs while parsing the schema.
      • getSchemaTree

        public StructureDefinition getSchemaTree()
        Returns the XSD tree in the form of StructureDefinition.
        Returns:
        A StructureDefinition object representing the structure of top-level elements of the XML Schema document.
      • getType

        public java.lang.Object getType(java.lang.String namespace,
                                        java.lang.String typeName)
        Returns the AccessorDef or a AttributeDef representation of a type given its namespace. To obtain the underlying data structure of a AccessorDef, call it's getStructure method.
        Parameters:
        namespace - Namespace to which the type belongs.
        typeName - Name of the type.
        Returns:
        Returns either a AccessorDef or a AttributeDef object if the type is found, otherwise returns null.
      • isElementFormDefault

        public boolean isElementFormDefault(java.lang.String targetNamespace)
        Determines if the elements in the given namespace is qualified.
        Parameters:
        targetNamespace - Namespace whose property needs to be queried.
        Returns:
        Returns true if the elements in the given namespace are qualified. Returns false if the elements are unqualified or the given namespace does not exist.
      • isAttributeFormDefault

        public boolean isAttributeFormDefault(java.lang.String targetNamespace)
        Determines if the attributes in the given namespace is qualified.
        Parameters:
        targetNamespace - Namespace whose property needs to be queried.
        Returns:
        Retruns true if the attributes in the given namespace are qualified. Returns false if the attributes are unqualified or the given namespace does not exist.
      • getSchemaProperty

        public java.lang.String getSchemaProperty(java.lang.String targetNamespace,
                                                  java.lang.String name)
        Returns the property value of the schema given its namespace and name.
        Parameters:
        targetNamespace - Namespace whose property needs to be queried.
        name - Name of the property whose value is to be fetched.
        Returns:
        Returns the property value if both the namespace and the property exists. Otherwise returns null.
      • isNamespaceDefined

        public boolean isNamespaceDefined(java.lang.String namespace)
        Determines if the given namespace is defined in the current schema.
        Parameters:
        namespace - Name of the namespace.
        Returns:
        Returns true if this namespace is defined in this schema, otherwise returns false.
      • getStructure

        public StructureDefinition getStructure(java.lang.String name,
                                                DefinitionContext ctx)
        Returns the structure definition extracted for the data format.
        Specified by:
        getStructure in interface FormatStructureHandler
        Parameters:
        name - name of the root structure.
        ctx - definition context information.
        Returns:
        the structure information extracted.
      • getTopLevelElements

        public java.util.List getTopLevelElements()
        Returns an List of the top-level elements in all the namespaces defined in this schema.
        Returns:
        An List of the top-level elements.
      • setNormalized

        public void setNormalized(boolean normalized)
        Deprecated. 
        The method is used Internally and should not be used by APP developers.
        Parameters:
        normalized - boolean variable which helps if the structure name should use different column name
      • printProperties

        public void printProperties(java.util.Map props,
                                    java.lang.String padding)
      • printAllTypes

        public void printAllTypes()
      • printSchemaMetadata

        public void printSchemaMetadata()
      • isValidRootElemExist

        public boolean isValidRootElemExist()
        Deprecated. since 12.1.3.0.0
        Check whether root element exist in the schema. Should be invoked after adding the schema using addSchema method.
        Returns:
        Whether the schema is valid or not
Oracle Fusion Middleware Java API Reference for Oracle ADF Model
12c (12.2.1.3.0)

E80079-01

Copyright © 1997, 2017, Oracle. All rights reserved.