- java.lang.Object
-
- com.sun.xml.ws.db.sdo.SDOUtils
-
public class SDOUtils extends Object
A set of core utility methods that shapes the sdo databinding Created by IntelliJ IDEA. User: giglee Date: May 13, 2009 Time: 10:21:12 AM To change this template use File | Settings | File Templates.
-
-
Constructor Summary
Constructors Constructor Description SDOUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DocumentcreateDOM(Source wsdlSource)static ListdefineSchema(commonj.sdo.helper.HelperContext hc, File f)static Stringdom2String(DOMSource domSrc)static Map<String,Source>getMetadataClosure(List<Source> schemas)static QNamegetPropertyElementName(commonj.sdo.helper.HelperContext context, commonj.sdo.Property p)get the element name represented by this propertystatic List<Source>getSchemaClosureFromWSDL(Source wsdlSource)static Set<SchemaInfo>getSchemas(File f)static Set<SchemaInfo>getSchemas(String filePath)static DocumentnewDocument()static DocumentBuildernewDocumentBuilder()static TransformernewTransformer()static voidprintDOM(Source src)static voidprintXMLReader(XMLStreamReader xml)static voidregisterSDOContext(commonj.sdo.helper.HelperContext context, List<Source> schemas)Register the types defined in the given schema with the given sdo helper contextstatic ElementsdoToDom(commonj.sdo.helper.HelperContext hc, commonj.sdo.DataObject obj, String targetNamespace, String localName)Serialize a DataObject to the specified element Per bug 6120620,, we use only GMT timezonestatic SourcesdoToXML(commonj.sdo.helper.HelperContext hc, commonj.sdo.DataObject obj, String targetNamespace, String localName)Serialize a DataObject to the specified xml element in text xmlstatic ObjectunwrapPrimitives(Object obj)static booleanvalidateBuiltinType(String javaType, QName qname)Check whether a java class is supported The builtin type includes all the default type mappings specified in the SDO Specstatic booleanvalidateSupportedType(commonj.sdo.helper.HelperContext hc, String javaType, QName qname)
-
-
-
Field Detail
-
NS_XMLNS
public static final String NS_XMLNS
- See Also:
- Constant Field Values
-
NS_WSDL
public static final String NS_WSDL
- See Also:
- Constant Field Values
-
QNAME_SCHEMA
public static final QName QNAME_SCHEMA
-
-
Method Detail
-
newTransformer
public static Transformer newTransformer()
-
newDocumentBuilder
public static DocumentBuilder newDocumentBuilder()
-
sdoToDom
public static Element sdoToDom(commonj.sdo.helper.HelperContext hc, commonj.sdo.DataObject obj, String targetNamespace, String localName) throws ParserConfigurationException, IOException
Serialize a DataObject to the specified element Per bug 6120620,, we use only GMT timezone
-
sdoToXML
public static Source sdoToXML(commonj.sdo.helper.HelperContext hc, commonj.sdo.DataObject obj, String targetNamespace, String localName) throws ParserConfigurationException, IOException
Serialize a DataObject to the specified xml element in text xml- Parameters:
hc-obj-targetNamespace-localName-- Returns:
- Throws:
ParserConfigurationExceptionIOException
-
registerSDOContext
public static void registerSDOContext(commonj.sdo.helper.HelperContext context, List<Source> schemas)Register the types defined in the given schema with the given sdo helper context- Parameters:
context-schemas-
-
printDOM
public static void printDOM(Source src)
-
dom2String
public static String dom2String(DOMSource domSrc) throws TransformerConfigurationException, TransformerException
-
printXMLReader
public static void printXMLReader(XMLStreamReader xml)
-
getPropertyElementName
public static QName getPropertyElementName(commonj.sdo.helper.HelperContext context, commonj.sdo.Property p)
get the element name represented by this property- Parameters:
context-p-- Returns:
-
defineSchema
public static List defineSchema(commonj.sdo.helper.HelperContext hc, File f) throws Exception
- Throws:
Exception
-
newDocument
public static Document newDocument()
-
validateBuiltinType
public static boolean validateBuiltinType(String javaType, QName qname)
Check whether a java class is supported The builtin type includes all the default type mappings specified in the SDO Spec- Parameters:
javaType-qname-- Returns:
-
validateSupportedType
public static boolean validateSupportedType(commonj.sdo.helper.HelperContext hc, String javaType, QName qname)
-
getSchemas
public static Set<SchemaInfo> getSchemas(File f) throws Exception
- Throws:
Exception
-
getSchemas
public static Set<SchemaInfo> getSchemas(String filePath) throws Exception
- Throws:
Exception
-
-