Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.0.0)

E17483-01

oracle.jbo.service.helper
Class SDOTypeBuilder

java.lang.Object
  extended by oracle.jbo.service.helper.SDOTypeBuilder

public class SDOTypeBuilder
extends java.lang.Object

Since:
11.1.1
For internal use only. Application developers should not use this

Field Summary
static java.lang.String SDO_WRAPPER_SUFFIX
           
 
Constructor Summary
SDOTypeBuilder()
          Deprecated. Replaced by SDOTypeBuilder(HelperContext)
SDOTypeBuilder(commonj.sdo.helper.HelperContext helperContext)
           
 
Method Summary
static boolean addRemoveSchemaImports(java.io.Reader inputSchema, java.io.Writer outputSchema, java.util.Map<java.lang.String,java.lang.String> locationToNSMap, java.util.Set<java.lang.String> deleteLocationSet)
          Adds and removes schema imports/includes to a schema file.
static void addRemoveSchemaImports(java.lang.String absoluteDocName, java.util.Map<java.lang.String,java.lang.String> locationToNSMap, java.util.Set<java.lang.String> deleteLocationSet)
          Adds and removes schema imports/includes to a schema file.
static boolean addSchemaImports(java.io.Reader inputSchema, java.io.Writer outputSchema, java.util.Map<java.lang.String,java.lang.String> locationToNSMap)
          Adds schema imports/includes to a schema file.
static void addSchemaImports(java.lang.String absoluteDocName, java.util.Map<java.lang.String,java.lang.String> locationToNSMap)
          Adds schema imports/includes to a schema file.
static void createSchemaFile(SDOBuilderSrc src, boolean genWrapper, java.lang.String displayName, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Type.
static void createSchemaFile(SDOBuilderSrc src, boolean genWrapper, java.lang.String displayName, java.io.Writer writer, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Types.
static void createSchemaFile(SDOBuilderSrc src, boolean genWrapper, java.io.Writer writer)
          Deprecated. Replaced by createSchemaFile(SDOBuilderSrc, boolean, Writer, HelperContext)
static void createSchemaFile(SDOBuilderSrc src, boolean genWrapper, java.io.Writer writer, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Types.
static void createSchemaFile(SDOBuilderSrc src, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Type.
static void createSchemaFile(SDOBuilderSrc src, java.lang.String displayName, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Type.
static void createSchemaFile(SDOBuilderSrc src, java.io.Writer writer)
          Deprecated. Replaced by createSchemaFile(SDOBuilderSrc, Writer, HelperContext)
static void createSchemaFile(SDOBuilderSrc src, java.io.Writer writer, commonj.sdo.helper.HelperContext hContext)
          Generates XSD by dynamically-defining SDO Type.
 commonj.sdo.Type defineSDOTypes(SDOBuilderSrc src, java.util.Map<commonj.sdo.Type,java.net.URL> schemaLocationMap)
          Defines new SDO types dynamically using TypeHelper.
static boolean deleteSchemaFile(SDOBuilderSrc src)
          Deletes the SDO schema file that was persisted to MDS.
static void updateXsdDocumentation(Document xsdDoc, java.lang.String displayName)
          Updates the <xsd:documentation> element with the specified service data object display name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SDO_WRAPPER_SUFFIX

public static final java.lang.String SDO_WRAPPER_SUFFIX
See Also:
Constant Field Values
Constructor Detail

SDOTypeBuilder

@Deprecated
public SDOTypeBuilder()
Deprecated. Replaced by SDOTypeBuilder(HelperContext)


SDOTypeBuilder

public SDOTypeBuilder(commonj.sdo.helper.HelperContext helperContext)
Method Detail

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Type. The schema file will be persisted to MDS.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified. See ER 9306924.

Parameters:
src - the source from which to generate schema
hContext - context where the types are defined
Throws:
java.lang.Exception - an error occurs writing to MDS

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    java.lang.String displayName,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Type. The schema file will be persisted to MDS.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified. See ER 9306924.

Parameters:
src - the source from which to generate schema
displayName - the SDO display name
hContext - context where the types are defined
Throws:
java.lang.NullPointerException - src.getSchemaLocation() returns null
java.lang.Exception - an error occurs writing to MDS

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    boolean genWrapper,
                                    java.lang.String displayName,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Type. The schema file will be persisted to MDS.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified. See ER 9306924.

Parameters:
src - the source from which to generate schema
genWrapper - whether to generate an additional SDO Wrapper type
displayName - the SDO display name
hContext - context where the types are defined
Throws:
java.lang.NullPointerException - src.getSchemaLocation() returns null
java.lang.Exception - an error occurs writing to MDS

deleteSchemaFile

public static boolean deleteSchemaFile(SDOBuilderSrc src)
                                throws java.lang.Exception
Deletes the SDO schema file that was persisted to MDS.

Parameters:
src - the source for which to delete schema
Throws:
java.lang.NullPointerException - src.getSchemaLocation() returns null
java.lang.Exception - an error occurs writing to MDS

createSchemaFile

@Deprecated
public static void createSchemaFile(SDOBuilderSrc src,
                                               java.io.Writer writer)
                             throws java.lang.Exception
Deprecated. Replaced by createSchemaFile(SDOBuilderSrc, Writer, HelperContext)

Generates XSD by dynamically-defining SDO Type. This method will reset the SDO Types registry in the beginning.

Throws:
java.lang.Exception

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    java.io.Writer writer,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Type.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified.

Parameters:
src - the source from which to generate schema
writer - a stream for writing the generated schema
hContext - context where the types are defined
Throws:
java.lang.Exception - an error occurs writing to stream

createSchemaFile

@Deprecated
public static void createSchemaFile(SDOBuilderSrc src,
                                               boolean genWrapper,
                                               java.io.Writer writer)
                             throws java.lang.Exception
Deprecated. Replaced by createSchemaFile(SDOBuilderSrc, boolean, Writer, HelperContext)

Generates XSD by dynamically-defining SDO Types. This method will reset the SDO Types registry in the beginning.

Throws:
java.lang.Exception

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    boolean genWrapper,
                                    java.io.Writer writer,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Types.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified.

Parameters:
src - the source from which to generate schema
genWrapper - whether to generate an additional SDO Wrapper type
writer - a stream for writing the generated schema
hContext - context where the types are defined
Throws:
java.lang.Exception - an error occurs writing to stream

createSchemaFile

public static void createSchemaFile(SDOBuilderSrc src,
                                    boolean genWrapper,
                                    java.lang.String displayName,
                                    java.io.Writer writer,
                                    commonj.sdo.helper.HelperContext hContext)
                             throws java.lang.Exception
Generates XSD by dynamically-defining SDO Types.

Note: If there are already existing types with the same name/uri in the provided context, then they are not modified.

Parameters:
src - the source from which to generate schema
genWrapper - whether to generate an additional SDO Wrapper type
displayName - the SDO display name
writer - a stream for writing the generated schema
hContext - context where the types are defined
Throws:
java.lang.Exception - an error occurs writing to stream

updateXsdDocumentation

public static void updateXsdDocumentation(Document xsdDoc,
                                          java.lang.String displayName)
                                   throws java.lang.Exception
Updates the <xsd:documentation> element with the specified service data object display name. If the specified XML Schema does not have an annotation element, one will be created and set on the schema.

Parameters:
xsdDoc - the enclosing XSD document
displayName - the service data object display name
Throws:
java.lang.Exception - an error occurs parsing the schema

addSchemaImports

public static boolean addSchemaImports(java.io.Reader inputSchema,
                                       java.io.Writer outputSchema,
                                       java.util.Map<java.lang.String,java.lang.String> locationToNSMap)
                                throws java.lang.Exception
Adds schema imports/includes to a schema file. The caller is responsible for closing the reader and writer, and passing schema locations that are relativized.

Parameters:
inputSchema - a reader for an existing schema file
outputSchema - a writer for the updated schema file
locationToNSMap - a mapping of schemaLocation to namespace
Returns:
true if the output schema is written, false if there is no change.
Throws:
java.lang.Exception - an error occurs parsing the schema or writing to stream

addRemoveSchemaImports

public static boolean addRemoveSchemaImports(java.io.Reader inputSchema,
                                             java.io.Writer outputSchema,
                                             java.util.Map<java.lang.String,java.lang.String> locationToNSMap,
                                             java.util.Set<java.lang.String> deleteLocationSet)
                                      throws java.lang.Exception
Adds and removes schema imports/includes to a schema file. The caller is responsible for closing the reader and writer, and passing schema locations that are relativized.

Parameters:
inputSchema - a reader for an existing schema file
outputSchema - a writer for the updated schema file
locationToNSMap - a mapping of schemaLocation to namespace
deleteLocationSet - a set of schemaLocation to remove
Returns:
true if the output schema is written, false if there is no change.
Throws:
java.lang.Exception - an error occurs parsing the schema or writing to stream

addSchemaImports

public static void addSchemaImports(java.lang.String absoluteDocName,
                                    java.util.Map<java.lang.String,java.lang.String> locationToNSMap)
                             throws java.lang.Exception
Adds schema imports/includes to a schema file. The schema file will be persisted to MDS.

Parameters:
absoluteDocName - the document name for an existing schema file
locationToNSMap - a mapping of schemaLocation to namespace
Throws:
java.lang.Exception - an error occurs reading from or writing to MDS

addRemoveSchemaImports

public static void addRemoveSchemaImports(java.lang.String absoluteDocName,
                                          java.util.Map<java.lang.String,java.lang.String> locationToNSMap,
                                          java.util.Set<java.lang.String> deleteLocationSet)
                                   throws java.lang.Exception
Adds and removes schema imports/includes to a schema file. The schema file will be persisted to MDS.

Parameters:
absoluteDocName - the document name for an existing schema file
locationToNSMap - a mapping of schemaLocation to namespace
deleteLocationSet - a set of schemaLocation to remove
Throws:
java.lang.Exception - an error occurs reading from or writing to MDS

defineSDOTypes

public commonj.sdo.Type defineSDOTypes(SDOBuilderSrc src,
                                       java.util.Map<commonj.sdo.Type,java.net.URL> schemaLocationMap)
Defines new SDO types dynamically using TypeHelper.

Parameters:
src - the source from which to define SDO type
schemaLocationMap - a table of defined SDO types and their corresponding schema location URLs
Returns:
the defined SDO type corresponding to the input source.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.0.0)

E17483-01

Copyright © 1997, 2011, Oracle. All rights reserved.