public final class SDOUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
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_DISALLOW_UNKNOWN_ITEMS
Only effective if BO-compat flag is on.
|
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_ATTACHMENT_MARSHALLER
The HelperContext option OPTION_XML_ATTACHMENT_MARSHALLER is used to
register a helper object that can determine if a piece of base64Binary
data should be serialized as inlined base64 text or as an MTOM attachment
reference.
|
static java.lang.String |
OPTION_XML_ATTACHMENT_UNMARSHALLER
The HelperContext option OPTION_XML_ATTACHMENT_UNMARSHALLER is used to
register a helper object that can resolve MTOM attachment content IDs
and return the corresponding content of the attachment.
|
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 and Description |
---|
SDOUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addSDOAliasName(commonj.sdo.Type type,
java.lang.String aliasName)
Creates an alias name for the specified type.
|
static java.lang.Object |
convertFromString(commonj.sdo.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(commonj.sdo.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(commonj.sdo.Type type,
commonj.sdo.Property property)
Gets an instance Property (annotation) from the specified Type.
|
static java.util.Map<java.lang.String,java.lang.Object> |
getAttributes(commonj.sdo.DataObject dataObject)
Returns a Map of attributes contained by the specified DataObject
|
static java.util.List |
getInstanceProperties(commonj.sdo.Type type)
Gets the list of instance properties (annotations) of the specified Type.
|
static java.lang.String |
getMaxLength(commonj.sdo.Type type)
Return the value of the maxLength facet on the specified Type, if available
|
static javax.xml.namespace.QName |
getQName(commonj.sdo.Property property)
Return the namespace-qualified name of the specified Property
|
static javax.xml.namespace.QName |
getQName(commonj.sdo.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(commonj.sdo.Type type)
Return true if the specified Type is a DataTypeWrapper
|
static boolean |
isElement(commonj.sdo.Property property)
Returns whether or not the specified property is mapped to an XML element
|
static boolean |
isMixed(commonj.sdo.Type type)
Return true if mixed content is allowed for the specified Type
|
static void |
set(commonj.sdo.Type type,
commonj.sdo.Property property,
java.lang.Object value)
Sets an instance Property (annotation) on the specified Type.
|
static void |
setLogging(commonj.sdo.ChangeSummary changeSummary,
boolean logging)
Suspend or resume logging for the specified ChangeSummary
|
static void |
unset(commonj.sdo.Type type,
commonj.sdo.Property property)
Unsets an instance Property (annotation) on the specified Type.
|
static boolean |
validate(commonj.sdo.DataObject dataObject)
Check if a data object is compliant to its XSD.
|
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_LOAD_DISALLOW_UNKNOWN_ITEMS
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
public static final java.lang.String OPTION_XML_ATTACHMENT_UNMARSHALLER
public static final java.lang.String OPTION_XML_ATTACHMENT_MARSHALLER
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 HelperContextpublic static commonj.sdo.helper.HelperContext createHelperContext()
public static java.util.Map<java.lang.String,java.lang.Object> getAttributes(commonj.sdo.DataObject dataObject)
DataObject
- to be inspectedpublic static boolean validate(commonj.sdo.DataObject dataObject)
DataObject
- to be validatedpublic static java.util.List define(commonj.sdo.helper.XSDHelper xsdHelper, java.util.List<javax.xml.transform.Source> sources)
xsdHelper
- A
- list of schema filespublic 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(commonj.sdo.Type datatype, java.lang.Object value)
dataType
- value
- public static java.lang.Object convertFromString(commonj.sdo.Type datatype, java.lang.String value)
datatype
- value
- public static java.util.List getInstanceProperties(commonj.sdo.Type type)
type
- public static java.lang.Object get(commonj.sdo.Type type, commonj.sdo.Property property)
type
- property
- public static void set(commonj.sdo.Type type, commonj.sdo.Property property, java.lang.Object value)
type
- property
- value
- public static void unset(commonj.sdo.Type type, commonj.sdo.Property property)
type
- property
- public static boolean isMixed(commonj.sdo.Type type)
type
- public static java.lang.String getMaxLength(commonj.sdo.Type type)
type
- public static boolean isElement(commonj.sdo.Property property)
property
- public static javax.xml.namespace.QName getQName(commonj.sdo.Type type)
type
- public static javax.xml.namespace.QName getQName(commonj.sdo.Property property)
property
- public static boolean isDataTypeWrapper(commonj.sdo.Type type)
type
- public static void addSDOAliasName(commonj.sdo.Type type, java.lang.String aliasName)
type
- alias
- name to add to associate with typepublic static void setLogging(commonj.sdo.ChangeSummary changeSummary, boolean logging)