|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.websphere.sdox.SDOUtil
public final class SDOUtil
This class provides convenient static utility functions for implementation extended APIs
Field Summary | |
---|---|
static java.lang.String |
DATATYPE_WRAPPER_URI
URI of the DataTypeWrapper Type |
static java.lang.String |
OPTION_BO_COMPATIBLE
|
static java.lang.String |
OPTION_CHANGE_SUMMARY
The HelperContext option OPTION_CHANGE_SUMMARY enables the change summary feature. |
static java.lang.String |
OPTION_COPY_DISCARD_DEFAULT_ATTRIBUTE
The HelperContext option OPTION_COPY_DISCARD_DEFAULT_ATTRIBUTE determines whether or not schema specified default attributes are propagated during a document instance copy operation. |
static java.lang.String |
OPTION_COPY_ON_WRITE
The HelperContext option OPTION_COPY_ON_WRITE determines whether CopyHelper.copy() will perform copy-on-write (when possible). |
static java.lang.String |
OPTION_EAGER_BUFFER_LOAD
The HelperContext option OPTION_EAGER_BUFFER_LOAD will load the entire document to its internal buffer but not necessarily parse its contents Value should be either "true" or "false". |
static java.lang.String |
OPTION_EAGER_ON_LOAD
The HelperContext option OPTION_EAGER_ON_LOAD will materialize the entire document/data during the "loading phase" - i.e., during the load() call. |
static java.lang.String |
OPTION_FAST_SERIALIZATION
The HelperContext option OPTION_FAST_SERIALIZATION will improve the speed of serialization operations by caching namespace information. |
static java.lang.String |
OPTION_LOAD_LARGE_DOCUMENT
The HelperContext option OPTION_LOAD_LARGE_DOCUMENT will improve de-serialization operations for large documents (> 1MB). |
static java.lang.String |
OPTION_LOAD_SKIP_SUBTREE
The HelperContext option OPTION_LOAD_SKIP_SUBTREE will materialize the root level of the document/data during the "loading phase" - i.e., during the load() call. |
static java.lang.String |
OPTION_SAVE_DEFAULT_ATTRIBUTE
The HelperContext option OPTION_SAVE_DISCARD_DEFAULT_ATTRIBUTE instructs the XML serializer to save the default attribute value specified in the XSD. |
static java.lang.String |
OPTION_SAVE_FORCE_NS_DECLARATIONS
The HelperContext option OPTION_SAVE_FORCE_NS_DECLARATIONS specifies a list of QName that would always be serialized. |
static java.lang.String |
OPTION_SAVE_INDENT
The HelperContext option OPTION_SAVE_INDENT specifies whether additional whitespace may be added during serialization. |
static java.lang.String |
OPTION_SAVE_INDENT_LINE_SEPARATOR
The HelperContext option OPTION_SAVE_INDENT_LINE_SEPARATOR contains the line separator value to use when the option OPTION_SAVE_INDENT == "true". |
static java.lang.String |
OPTION_SAVE_OMIT_XML_DECL
The HelperContext option OPTION_SAVE_OMIT_XML_DECL specifies whether or not to omit the xml declaration when serializing instance documents. |
static java.lang.String |
OPTION_SAVE_REQUIRED_PREFIXES
The HelperContext option OPTION_SAVE_REQUIRED_PREFIXES specifies a list of QName containing prefix and URI. |
static java.lang.String |
OPTION_SAVE_STANDARD_CHANGE_SUMMARY
The HelperContext option OPTION_SAVE_STANDARD_CHANGE_SUMMARY specifies whether or not the change summary information is serialized using the standard XML format described in the SDO specification. |
static java.lang.String |
OPTION_SAVE_STRIP_WHITESPACE
The HelperContext option OPTION_SAVE_STRIP_WHITESPACE specifies whether to strip whitespace ("true") from serialized output or not ("false"). |
static java.lang.String |
OPTION_SAVE_USE_DEFAULT_NS
The HelperContext option OPTION_SAVE_USE_DEFAULT_NS specifies whether or not a QName in a namespace can be serialized in the default namespace. |
static java.lang.String |
OPTION_SCHEMA_ERROR_FAILFAST
The HelperContext option OPTION_SCHEMA_ERROR_FAILFAST enables the schema fail fast mode. |
static java.lang.String |
OPTION_SCHEMA_ERROR_HANDLER
The HelperContext option OPTION_SCHEMA_ERROR_HANDLER specifies the schema error handler to be used by the HelperContext instance. |
static java.lang.String |
OPTION_SCHEMA_FULL_CHECKING
The HelperContext option OPTION_SCHEMA_FULL_CHECKING enables full checking of schema constraints when loading schema documents. |
static java.lang.String |
OPTION_SCOPE_MANAGER
|
static java.lang.String |
OPTION_VALIDATE_ON_LOAD
The HelperContext option OPTION_VALIDATE_ON_LOAD is a superset of OPTION_EAGER_ON_LOAD in that it will perform a document schema validation in addition to the loading operation discussed in OPTION_EAGER_ON_LOAD. |
static java.lang.String |
OPTION_XML_ERROR_HANDLER
The HelperContext option OPTION_XML_ERROR_HANDLER specifies the xml instance error handler to be used by the HelperContext instance. |
static java.lang.String |
SCA_DEFAULT_SCOPE
SCA default HelperContext identifier |
Constructor Summary | |
---|---|
SDOUtil()
|
Method Summary | |
---|---|
static void |
addSDOAliasName(Type type,
java.lang.String aliasName)
Creates an alias name for the specified type. |
static java.lang.Object |
convertFromString(Type datatype,
java.lang.String value)
Convert from a string representation of the specified datatype to a value of the type. |
static java.lang.String |
convertToString(Type datatype,
java.lang.Object value)
Convert a value of the specified datatype to its corresponding string representation. |
static commonj.sdo.helper.HelperContext |
createHelperContext()
Create a helper context with a randomly generated ID |
static commonj.sdo.helper.HelperContext |
createHelperContext(java.util.Map<java.lang.String,java.lang.Object> options)
Create a helper context with the specified options and a randomly generated ID |
static java.util.List |
define(commonj.sdo.helper.XSDHelper xsdHelper,
java.util.List<javax.xml.transform.Source> sources)
Define a group of schemas contributing to the same target namespace. |
static java.lang.Object |
get(Type type,
Property property)
Gets an instance Property (annotation) from the specified Type. |
static java.util.Map<java.lang.String,java.lang.Object> |
getAttributes(DataObject dataObject)
Returns a Map of attributes contained by the specified DataObject |
static java.util.List |
getInstanceProperties(Type type)
Gets the list of instance properties (annotations) of the specified Type. |
static java.lang.String |
getMaxLength(Type type)
Return the value of the maxLength facet on the specified Type, if available |
static javax.xml.namespace.QName |
getQName(Property property)
Return the namespace-qualified name of the specified Property |
static javax.xml.namespace.QName |
getQName(Type type)
Return the namespace-qualified name of the specified Type |
static java.util.List<javax.xml.transform.Source> |
getWSDLSources(commonj.sdo.helper.XSDHelper xsdHelper,
java.io.InputStream wsdlInputStream,
java.lang.String schemaLocation)
Create XSD sources for types representing WSDL components - e.g., messages, parts, etc. |
static boolean |
isDataTypeWrapper(Type type)
Return true if the specified Type is a DataTypeWrapper |
static boolean |
isElement(Property property)
Returns whether or not the specified property is mapped to an XML element |
static boolean |
isMixed(Type type)
Return true if mixed content is allowed for the specified Type |
static void |
set(Type type,
Property property,
java.lang.Object value)
Sets an instance Property (annotation) on the specified Type. |
static void |
setLogging(ChangeSummary changeSummary,
boolean logging)
Suspend or resume logging for the specified ChangeSummary |
static void |
unset(Type type,
Property property)
Unsets an instance Property (annotation) on the specified Type. |
static boolean |
validate(DataObject dataObject)
Check if a data object is compliant to its XSD. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DATATYPE_WRAPPER_URI
public static final java.lang.String SCA_DEFAULT_SCOPE
public static final java.lang.String OPTION_CHANGE_SUMMARY
public static final java.lang.String OPTION_SCHEMA_ERROR_HANDLER
DOMErrorHandler
.
public static final java.lang.String OPTION_SCHEMA_ERROR_FAILFAST
public static final java.lang.String OPTION_SCHEMA_FULL_CHECKING
public static final java.lang.String OPTION_XML_ERROR_HANDLER
DOMErrorHandler
.
public static final java.lang.String OPTION_SAVE_USE_DEFAULT_NS
public static final java.lang.String OPTION_SAVE_STRIP_WHITESPACE
public static final java.lang.String OPTION_SAVE_REQUIRED_PREFIXES
public static final java.lang.String OPTION_SAVE_FORCE_NS_DECLARATIONS
public static final java.lang.String OPTION_SAVE_OMIT_XML_DECL
public static final java.lang.String OPTION_SAVE_INDENT
public static final java.lang.String OPTION_SAVE_INDENT_LINE_SEPARATOR
public static final java.lang.String OPTION_SAVE_STANDARD_CHANGE_SUMMARY
public static final java.lang.String OPTION_SAVE_DEFAULT_ATTRIBUTE
public static final java.lang.String OPTION_FAST_SERIALIZATION
public static final java.lang.String OPTION_EAGER_ON_LOAD
public static final java.lang.String OPTION_EAGER_BUFFER_LOAD
public static final java.lang.String OPTION_LOAD_SKIP_SUBTREE
public static final java.lang.String OPTION_VALIDATE_ON_LOAD
public static final java.lang.String OPTION_LOAD_LARGE_DOCUMENT
public static final java.lang.String OPTION_COPY_DISCARD_DEFAULT_ATTRIBUTE
public static final java.lang.String OPTION_COPY_ON_WRITE
public static final java.lang.String OPTION_BO_COMPATIBLE
public static final java.lang.String OPTION_SCOPE_MANAGER
Constructor Detail |
---|
public SDOUtil()
Method Detail |
---|
public static commonj.sdo.helper.HelperContext createHelperContext(java.util.Map<java.lang.String,java.lang.Object> options)
Map
- of options to be used when constructing the new HelperContext
public static commonj.sdo.helper.HelperContext createHelperContext()
public static java.util.Map<java.lang.String,java.lang.Object> getAttributes(DataObject dataObject)
DataObject
- to be inspected
public static boolean validate(DataObject dataObject)
DataObject
- to be validated
public static java.util.List define(commonj.sdo.helper.XSDHelper xsdHelper, java.util.List<javax.xml.transform.Source> sources)
xsdHelper
- A
- list of schema files
public static java.util.List<javax.xml.transform.Source> getWSDLSources(commonj.sdo.helper.XSDHelper xsdHelper, java.io.InputStream wsdlInputStream, java.lang.String schemaLocation)
xsdHelper
- wsdlInputStream
- a .wsdl streampublic static java.lang.String convertToString(Type datatype, java.lang.Object value)
dataType
- value
-
public static java.lang.Object convertFromString(Type datatype, java.lang.String value)
datatype
- value
-
public static java.util.List getInstanceProperties(Type type)
type
-
public static java.lang.Object get(Type type, Property property)
type
- property
-
public static void set(Type type, Property property, java.lang.Object value)
type
- property
- value
- public static void unset(Type type, Property property)
type
- property
- public static boolean isMixed(Type type)
type
-
public static java.lang.String getMaxLength(Type type)
type
-
public static boolean isElement(Property property)
property
-
public static javax.xml.namespace.QName getQName(Type type)
type
-
public static javax.xml.namespace.QName getQName(Property property)
property
-
public static boolean isDataTypeWrapper(Type type)
type
-
public static void addSDOAliasName(Type type, java.lang.String aliasName)
type
- alias
- name to add to associate with typepublic static void setLogging(ChangeSummary changeSummary, boolean logging)
|
IBM WebSphere Application ServerTM Release 7 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |