Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-02


oracle.rules.sdk2.datamodel
Class SchemaBrowser

java.lang.Object
  extended by oracle.rules.sdk2.datamodel.Browser
      extended by oracle.rules.sdk2.datamodel.SchemaBrowser


public final class SchemaBrowser
extends Browser

Provides for browsing of XML Schemas by mapping the schema to JAXB classes. The JAXB classes may be loaded into the RuleDictionary to serve as FactTypes in Rule definitions.

Generated JAXB Classes are visible to the SchemaBrowser after the schema has been added to SchemaBrowser's schemapath using the JAXB schema compiler.

After adding or removing schemas, the NodeTable must be re-retrieved using the getNodeTable method.

The jaxb schema compiler is invoked when the schema is added to the schema path list of the schema browser. The jaxb classes are contained in a user specified package name.

Each element of the schema is an an instance of a JaxbNodes or JavaPackages.

The JaxbNode and JavaPackageNode instances are organized into a collection that is returned by the NodeTable property. A NodeTable is collection the immedidate children of the top level of generated package names. The generated package names are created when schemas are added to the schema path.
The class hierarchy is represented by the nestedNodeTable property. A NodeTable contains the children of each subsequent level in the hierarchy. A JavaPackageNode has a NodeTable representing its children. The children of a JPackage are other JPackage's and JaxbNode's. A JaxbNode has no children and therefore does not have a node table.
Loading of a browsed schema into the datamodel is the responsibility of JaxbNode and JPackageNode classes.


Nested Class Summary
static class SchemaBrowser.FailedSchemaAdd
           

 

Constructor Summary
SchemaBrowser(RuleDictionary rd, java.lang.String srcOutdir, java.lang.String classOutdir)
           
SchemaBrowser(RuleDictionary rd, java.lang.String srcOutdir, java.lang.String classOutdir, java.net.URI schemaPathRoot)
          Creates a Schema browser that is tied to a RuleDictionary instance.
SchemaBrowser(RuleDictionary rd, java.lang.String srcOutdir, java.lang.String classOutdir, java.net.URI schemaPathRoot, java.lang.String jaxblib, java.lang.String parserlib)
          Creates a Schema browser that is tied to a RuleDictionary instance.

 

Method Summary
 void addFailedAdd(java.lang.String pathToAdd, java.lang.String targetPackage, SDKException ex)
           
 oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd)
           
 oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd, java.lang.String targetPackage)
           
 oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd, java.lang.String targetPackage, java.lang.String customFile)
          Deprecated.  
 oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd, java.lang.String targetPackage, java.net.URI customFile)
           
 void addWSDL(java.net.URI wsdlPath, java.lang.String targetPackage)
           
 oracle.rules.sdk2.datamodel.impt.JaxbModel addWSDL(java.net.URI wsdlPath, java.lang.String targetPackage, java.lang.String customFile)
          Deprecated.  
 oracle.rules.sdk2.datamodel.impt.JaxbModel addWSDL(java.net.URI wsdlPath, java.lang.String targetPackage, java.net.URI customUri)
          import WSDL inline schemas
 void clearSchemaPath()
          Remove all user created entries from the schema path list.
 java.lang.String getClassOutputDir()
           
 java.util.List<SchemaBrowser.FailedSchemaAdd> getFailedSchemaAdds()
           
 java.lang.String getJaxbLib()
           
 java.lang.String getParserLib()
           
 java.util.List<java.net.URI> getSchemaPath()
          Return an array of schema paths (each entry created by a previous addSchemaPath invocation).
 java.lang.String getSchemaPathRoot()
           
 java.lang.String getSourceOutputDir()
           
 void removeSchemaPath(java.net.URI uri)
           
 void setClassOutputDir(java.lang.String cod)
          Set the directory in which to put compiled JAXB class files in
 void setJaxbLib(java.lang.String jaxblib)
          Set the fully-qualified path of the JAXB library to use when compiling JAXB generated classes when using JAXB 1.0.
 void setParserLib(java.lang.String parserlib)
          Set the fully-qualified path of the XML parser library to use when compiling JAXB generated classes using JAXB 1.0.
 void setSchemaPathRoot(java.net.URI spr)
           
 void setSourceOutputDir(java.lang.String sod)
          Set the directory to generate the JAXB source file into.

 

Methods inherited from class oracle.rules.sdk2.datamodel.Browser
getDictionary, getNodeTable

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

SchemaBrowser

public SchemaBrowser(RuleDictionary rd,
                     java.lang.String srcOutdir,
                     java.lang.String classOutdir,
                     java.net.URI schemaPathRoot)
              throws SDKException
Creates a Schema browser that is tied to a RuleDictionary instance.
Parameters:
rd - a RuleDictionary that contains a datamodel for loading
srcOutdir - the directory to generate the JAXB source file into
classOutdir - the directory to put the compiled JAXB class files in
schemaPathRoot - the root path for the schemas. If specified, the schema locations will be stored relative to this path, so one can move the entire project a different directory and still have valid references to the schemas, as long as the new root path is specified.
Throws:
SDKException

SchemaBrowser

public SchemaBrowser(RuleDictionary rd,
                     java.lang.String srcOutdir,
                     java.lang.String classOutdir,
                     java.net.URI schemaPathRoot,
                     java.lang.String jaxblib,
                     java.lang.String parserlib)
              throws SDKException
Creates a Schema browser that is tied to a RuleDictionary instance.
Parameters:
rd - a RuleDictionary that contains a datamodel for loading
srcOutdir - the directory to generate the JAXB source file into
classOutdir - the directory to put the compiled JAXB class files in
schemaPathRoot - the root path for the schemas. If specified, the schema locations will be stored relative to this path, so one can move the entire project a different directory and still have valid references to the schemas, as long as the new root path is specified.
jaxblib - the JAXB 1.0 library location (null if using JAXB 2.0 or on classpath)
parserlib - the JAXB 1.0 parser library location (null if using JAXB 2.0 or on classpath)
Throws:
SDKException

SchemaBrowser

public SchemaBrowser(RuleDictionary rd,
                     java.lang.String srcOutdir,
                     java.lang.String classOutdir)
              throws SDKException
Throws:
SDKException

Method Detail

addSchemaPath

public oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd)
                                                         throws SDKException
Throws:
SDKException

addSchemaPath

public oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd,
                                                                java.lang.String targetPackage)
                                                         throws SDKException
Throws:
SDKException

addSchemaPath

public oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd,
                                                                java.lang.String targetPackage,
                                                                java.net.URI customFile)
                                                         throws SDKException
Throws:
SDKException

addSchemaPath

@Deprecated
public oracle.rules.sdk2.datamodel.impt.JaxbModel addSchemaPath(java.net.URI pathToAdd,
                                                                           java.lang.String targetPackage,
                                                                           java.lang.String customFile)
                                                         throws SDKException
Deprecated. 
Parameters:
pathToAdd -
targetPackage -
customFile -
Returns:
model representing the added schema (can be discarded)
Throws:
SDKException

addWSDL

public oracle.rules.sdk2.datamodel.impt.JaxbModel addWSDL(java.net.URI wsdlPath,
                                                          java.lang.String targetPackage,
                                                          java.net.URI customUri)
                                                   throws SDKException
import WSDL inline schemas
Parameters:
wsdlPath - path to a WSDL document
targetPackage - a String specifying the top level for generated jaxb classes, optional
customUri - String containing jaxb custom bindings that apply to the schema, optional
Throws:
SDKException - - jaxb compiler fails to convert WSDL schemas to jaxb

addWSDL

public void addWSDL(java.net.URI wsdlPath,
                    java.lang.String targetPackage)
             throws SDKException
Throws:
SDKException

addWSDL

@Deprecated
public oracle.rules.sdk2.datamodel.impt.JaxbModel addWSDL(java.net.URI wsdlPath,
                                                                     java.lang.String targetPackage,
                                                                     java.lang.String customFile)
                                                   throws SDKException
Deprecated. 
import WSDL inline schemas
Parameters:
wsdlPath - path to a WSDL document
targetPackage - a String specifying the top level for generated jaxb classes, optional
customFile - String containing jaxb custom bindings that apply to the schema, optional
Throws:
SDKException - - jaxb compiler fails to convert WSDL schemas to jaxb

setJaxbLib

public void setJaxbLib(java.lang.String jaxblib)
Set the fully-qualified path of the JAXB library to use when compiling JAXB generated classes when using JAXB 1.0. If using the Oracle XDK with JAXB 1.0, this file is named xml.jar.
Parameters:
jaxblib - String containing the necessary path to Oracle JAXB library

setParserLib

public void setParserLib(java.lang.String parserlib)
Set the fully-qualified path of the XML parser library to use when compiling JAXB generated classes using JAXB 1.0. This is used because some environments do not set a system property or environment variable that indicate the location of the xml parser library. If using the Oracle XDK, this file is named xmlparserv2.jar.
Parameters:
parserlib - String containing the necessary path to Oracle XML parser library

setSourceOutputDir

public void setSourceOutputDir(java.lang.String sod)
Set the directory to generate the JAXB source file into.
Parameters:
sod - the directory to generate the JAXB source file into

setClassOutputDir

public void setClassOutputDir(java.lang.String cod)
Set the directory in which to put compiled JAXB class files in
Parameters:
cod - the directory

setSchemaPathRoot

public void setSchemaPathRoot(java.net.URI spr)

getParserLib

public java.lang.String getParserLib()

getSourceOutputDir

public java.lang.String getSourceOutputDir()

getClassOutputDir

public java.lang.String getClassOutputDir()

getJaxbLib

public java.lang.String getJaxbLib()

getSchemaPathRoot

public java.lang.String getSchemaPathRoot()

clearSchemaPath

public void clearSchemaPath()
                     throws SDKException
Remove all user created entries from the schema path list.
Throws:
SDKException

getSchemaPath

public java.util.List<java.net.URI> getSchemaPath()
Return an array of schema paths (each entry created by a previous addSchemaPath invocation).
Returns:
String array of paths to jaxb classes.

removeSchemaPath

public void removeSchemaPath(java.net.URI uri)
                      throws SDKException
Throws:
SDKException

getFailedSchemaAdds

public java.util.List<SchemaBrowser.FailedSchemaAdd> getFailedSchemaAdds()

addFailedAdd

public void addFailedAdd(java.lang.String pathToAdd,
                         java.lang.String targetPackage,
                         SDKException ex)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-02


Copyright © 2009, Oracle and/or its affiliates. All rights reserved.