org.wso2.carbon.governance.api.schema.dataobjects

## Class SchemaImpl

- java.lang.Object
- - org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl
  - - org.wso2.carbon.governance.api.schema.dataobjects.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.

- - ### Field Summary

    - ### Fields inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl

      `attributes, properties`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SchemaImpl(String id, org.wso2.carbon.registry.core.Registry registry)` Constructor accepting resource path, identifier and a registry instance.
    `SchemaImpl(String id, String url)` Constructor accepting resource identifier and the schema URL.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `QName` | `getQName()` Returns the QName of the artifact.
    `org.apache.axiom.om.OMElement` | `getSchemaElement()` Method to obtain the schema element of this schema artifact.
    `String` | `getUrl()` Method to obtain the schema URL.
    `void` | `loadSchemaDetails()` Method to load the schema details into this artifact.
    `void` | `setQName(QName qName)` Method to set the qualified name of this service artifact.
    `void` | `setSchemaElement(org.apache.axiom.om.OMElement schemaElement)` Method to set the schema element of this schema artifact.

    - ### Methods inherited from class org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifactImpl

      `addAssociation, addAssociation, addAttribute, addBidirectionalAssociation, addTag, addTags, associateRegistry, attach, attach, attachLifecycle, checkLCItem, checkRegistryResourceAssociation, compareTo, create, create, create, create, createVersion, detach, detachLifecycle, equals, getAllCheckListItemNames, getAllLifecycleActions, getAllVotingItems, getAllVotingItems, getArtifactPath, getAssociatedArtifactIds, getAssociatedRegistry, getAssociations, getAttribute, getAttributeKeys, getAttributes, getCurrentStateDuration, getDependencies, getDependents, getId, getLcName, getLcState, getLifecycleName, getLifecycleNames, getLifecycleState, getLifecycleState, getMediaType, getPath, getPropertyKeys, getUniqueAttributes, invokeAction, invokeAction, isLCItemChecked, isRegistryAwareArtifact, isVoted, isVoted, listTags, removeAssociation, removeAssociation, removeAttribute, removeTag, removeTags, setArtifactPath, setAttribute, setAttributes, setId, setLcName, setLcState, setUniqueAttributes, toString, uncheckLCItem, uniqueTo, unvote, unvote, updatePath, updatePath, vote, vote`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact

      `addAssociation, addAssociation, addAttribute, addBidirectionalAssociation, addTag, addTags, attach, attach, attachLifecycle, checkLCItem, compareTo, detach, getAllCheckListItemNames, getAllLifecycleActions, getAllVotingItems, getAllVotingItems, getAssociatedArtifactIds, getAssociations, getAttribute, getAttributeKeys, getAttributes, getCurrentStateDuration, getDependencies, getDependents, getId, getLifecycleName, getLifecycleNames, getLifecycleState, getLifecycleState, getMediaType, getPath, getPropertyKeys, invokeAction, invokeAction, isLCItemChecked, isRegistryAwareArtifact, isVoted, isVoted, listTags, removeAssociation, removeAssociation, removeAttribute, removeTag, removeTags, setAttribute, setAttributes, setId, uncheckLCItem, uniqueTo, unvote, unvote, vote, vote`

- - ### 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

    - #### getQName

          public QName getQName()

      Description copied from interface: `GovernanceArtifact`
      Returns the QName of the artifact.
      Specified by:
        `getQName` in interface `GovernanceArtifact`
      Returns:
        the QName of the artifact

    - #### setQName

          public void setQName(QName qName)
                        throws GovernanceException

      Method to set the qualified name of this service artifact.
      Specified by:
        `setQName` in interface `GovernanceArtifact`
      Parameters:
        `qName` - the qualified name.
      Throws:
        `GovernanceException` - if the operation failed.

    - #### 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.

    - #### loadSchemaDetails

          public void loadSchemaDetails()
                                 throws GovernanceException

      Method to load the schema details into this artifact.
      Throws:
        `GovernanceException` - if the operation failed.

Copyright © 2017 WSO2. All rights reserved.