***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.storedprocess.metadata
Class XMLStream

com.sas.services.storedprocess.metadata.XMLStream
All Implemented Interfaces:
java.io.Serializable

public class XMLStream

Design time XMLStream data source or target.

Since:
9.2
See Also:
Serialized Form

Constructor Summary
XMLStream()
          Constructs and empty XML Stream Data Source or Data Target object with no associated schema.
 
Method Summary
 java.lang.String getReferenceName()
          Returns the reference name.
 java.lang.String getReferenceNameSpace()
          Returns the reference namespace.
 java.lang.String getSchemaURI()
          Returns the schema URI.
 boolean isReferenceTypeForSchemaElement()
          Determines whether the reference type is for a schema element or schema type.
 boolean isSchemaAvailable()
          The return values determines whether a schema is associated with this XML Stream.
 boolean isSchemaToBeEmbeddedInWSDL()
          Determines whether the schema is to be embedded of referenced in generated WSDL.
 void setIsReferenceTypeForSchemaElement(boolean referenceTypeIsForSchemaElement)
          Sets whether the reference type is for a schema element or schema type.
 void setIsSchemaAvailable(boolean schemaIsAvailable)
          Sets whether a schema is be associated with this XML Stream.
 void setIsSchemaToBeEmbeddedInWSDL(boolean schemaIsToBeEmbeddedInWSDL)
          Sets whether the schema is to be embedded of referenced in generated WSDL.
 void setReferenceName(java.lang.String referenceName)
          Sets the reference name.
 void setReferenceNameSpace(java.lang.String referenceNameSpace)
          Sets the reference namespace.
 void setSchemaURI(java.lang.String schemaURI)
          Sets the schema URI.
 void validate()
          Validates the XMLStream.
 
Methods inherited from class com.sas.services.storedprocess.metadata.GenericStream
allowsRewinds, getExpectedContentType, getFileref, setAllowRewinds, setExpectedContentType, setFileref
 

Constructor Detail

XMLStream

public XMLStream()
Constructs and empty XML Stream Data Source or Data Target object with no associated schema. By default a data source is returned and the expected content type set to "text/xml"; a data Target can be constructed by calling DataSourceOrTarget.setSource(boolean). Rewinding is only supported for data sources and can be specified via the GenericStream.setAllowRewinds(boolean) method.

Method Detail

isSchemaAvailable

public boolean isSchemaAvailable()
The return values determines whether a schema is associated with this XML Stream. If true, schema details can be obtained from getSchemaURI(), getReferenceNameSpace(), getReferenceName() and isReferenceTypeForSchemaElement(). And, isSchemaToBeEmbeddedInWSDL() returns a valid value.

Returns:
the availability of a schema

setIsSchemaAvailable

public void setIsSchemaAvailable(boolean schemaIsAvailable)
Sets whether a schema is be associated with this XML Stream. If set to true, schema details should be set using setSchemaURI(String), setReferenceNameSpace(String), setReferenceName(String) and setIsReferenceTypeForSchemaElement(boolean). And, setIsSchemaToBeEmbeddedInWSDL(boolean) should be called.


getSchemaURI

public java.lang.String getSchemaURI()
                              throws java.lang.IllegalStateException
Returns the schema URI. This method should only be called if isSchemaAvailable() returns true.

Returns:
the schema URI
Throws:
java.lang.IllegalStateException - if called when isSchemaAvailable() returns false

setSchemaURI

public void setSchemaURI(java.lang.String schemaURI)
Sets the schema URI.


getReferenceNameSpace

public java.lang.String getReferenceNameSpace()
Returns the reference namespace. This method should only be called if isSchemaAvailable() returns true.

Returns:
the reference namespace
Throws:
java.lang.IllegalStateException - if called when isSchemaAvailable() returns false

setReferenceNameSpace

public void setReferenceNameSpace(java.lang.String referenceNameSpace)
Sets the reference namespace.


getReferenceName

public java.lang.String getReferenceName()
Returns the reference name. This method should only be called if isSchemaAvailable() returns true.

Returns:
the reference name
Throws:
java.lang.IllegalStateException - if called when isSchemaAvailable() returns false

setReferenceName

public void setReferenceName(java.lang.String referenceName)
Sets the reference name.


isReferenceTypeForSchemaElement

public boolean isReferenceTypeForSchemaElement()
Determines whether the reference type is for a schema element or schema type. If true, it is for a schema element; if false for a schema type. This method should only be called if isSchemaAvailable() returns true.

Returns:
whether the reference type is for a schema element or schema type
Throws:
java.lang.IllegalStateException - if called when isSchemaAvailable() returns false or the value has not been set

setIsReferenceTypeForSchemaElement

public void setIsReferenceTypeForSchemaElement(boolean referenceTypeIsForSchemaElement)
Sets whether the reference type is for a schema element or schema type.

Parameters:
referenceTypeIsForSchemaElement - if true, it is for a schema element; if false for a schema type.

isSchemaToBeEmbeddedInWSDL

public boolean isSchemaToBeEmbeddedInWSDL()
Determines whether the schema is to be embedded of referenced in generated WSDL. If true, the schema is embedded; if false, the schema is generated. This method should only be called if isSchemaAvailable() returns true.

Returns:
whether the reference type is for a schema element or schema type
Throws:
java.lang.IllegalStateException - if called when isSchemaAvailable() returns false or the value has not been set

setIsSchemaToBeEmbeddedInWSDL

public void setIsSchemaToBeEmbeddedInWSDL(boolean schemaIsToBeEmbeddedInWSDL)
Sets whether the schema is to be embedded of referenced in generated WSDL.

Parameters:
schemaIsToBeEmbeddedInWSDL - if true, the schema is embedded; if false, the schema is generated.

validate

public void validate()
              throws ServiceException
Validates the XMLStream. There is no requirement for consumer code to call this method. In addition to what is done by GenericStream.validate(), this method ensures that the various components which describe and involve the schema have been set if isSchemaAvailable() returns true.

Overrides:
validate in class GenericStream
Throws:
ServiceException - if validation fails

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.