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

java.lang.Object
  extended by org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact
      extended by org.wso2.carbon.governance.api.schema.dataobjects.Schema

public class Schema
extends GovernanceArtifact

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.GovernanceArtifact
attributes
 
Constructor Summary
Schema(String id, String url)
          Constructor accepting resource identifier and the schema URL.
Schema(String path, String id, org.wso2.carbon.registry.core.Registry registry)
          Constructor accepting resource path, identifier and a registry instance.
 
Method Summary
 String getPath()
          Returns the path.
 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 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.GovernanceArtifact
addAttribute, associateRegistry, attach, checkRegistryResourceAssociation, createVersion, detach, getAssociatedRegistry, getAttribute, getAttributeKeys, getAttributes, getDependencies, getDependents, getId, removeAttribute, setAttribute, setAttributes, setId, setPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Schema

public Schema(String path,
              String id,
              org.wso2.carbon.registry.core.Registry registry)
       throws GovernanceException
Constructor accepting resource path, identifier and a registry instance.

Parameters:
path - the resource path.
id - the resource identifier.
registry - the registry instance.
Throws:
GovernanceException - if the construction fails.

Schema

public Schema(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 class: GovernanceArtifact
Returns the QName of the artifact.

Specified by:
getQName in class GovernanceArtifact
Returns:
the QName of the artifact

getSchemaElement

public org.apache.axiom.om.OMElement getSchemaElement()
Method to obtain the schema element of this schema artifact.

Returns:
the schema element.

setSchemaElement

public void setSchemaElement(org.apache.axiom.om.OMElement schemaElement)
Method to set the schema element of this schema artifact.

Parameters:
schemaElement - the schema element.

getUrl

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

Returns:
the schema URL.

getPath

public String getPath()
Description copied from class: GovernanceArtifact
Returns the path.

Overrides:
getPath in class GovernanceArtifact
Returns:
the path.

loadSchemaDetails

public void loadSchemaDetails()
                       throws GovernanceException
Method to load the schema details into this artifact.

Throws:
GovernanceException - if the operation failed.


Copyright © 2010 WSO2 Inc. All Rights Reserved.