Class SchemaImpl

  • All Implemented Interfaces:
    GovernanceArtifact, Schema

    public class SchemaImpl
    extends GovernanceArtifactImpl
    implements Schema
    This represents a schema artifact stored on the Registry. Schema artifacts are created as a result of importing or uploading a schema or WSDL, or when a service which has an attached WSDL is created.
    • Constructor Detail

      • SchemaImpl

        public SchemaImpl​(String id,
                          org.wso2.carbon.registry.core.Registry registry)
                   throws GovernanceException
        Constructor accepting resource path, identifier and a registry instance. This constructor should be used only when the wsdl already saved in the registry.
        Parameters:
        path - the resource path.
        id - the resource identifier.
        registry - the registry instance.
        Throws:
        GovernanceException - if the construction fails.
      • SchemaImpl

        public SchemaImpl​(String id,
                          String url)
        Constructor accepting resource identifier and the schema URL.
        Parameters:
        id - the resource identifier.
        url - the schema URL.
    • Method Detail

      • getSchemaElement

        public org.apache.axiom.om.OMElement getSchemaElement()
        Method to obtain the schema element of this schema artifact.
        Specified by:
        getSchemaElement in interface Schema
        Returns:
        the schema element.
      • setSchemaElement

        public void setSchemaElement​(org.apache.axiom.om.OMElement schemaElement)
        Method to set the schema element of this schema artifact.
        Specified by:
        setSchemaElement in interface Schema
        Parameters:
        schemaElement - the schema element.
      • getUrl

        public String getUrl()
        Method to obtain the schema URL.
        Returns:
        the schema URL.