Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

oracle.owb.mapping
Class MapUtility

java.lang.Object
  |
  +--oracle.owb.mapping.MapUtility

public class MapUtility
extends java.lang.Object

MapUtiltity is a static class which provides static utility methods to help with mapping.


Constructor Summary
MapUtility()
           

 

Method Summary
static MapAttributeGroup addToJoin(MapOperator joiner, MapAttributeGroup sourceGrp)
          Convenience method to add an input group to an existing join operator, and connect a source output group to the new input group.
static MapAttributeGroup addToJoin(MapOperator joiner, MapOperator source)
          Convenience method to add an input group to an existing join operator, and connect a source operator to the new input group.
static void connectOperators(MapOperator fromOperator, MapOperator toOperator)
          Convenience method to connect a source operator to a target operator.
static MapOperator createJoin(java.lang.String joinName, MapAttributeGroup sourceGrp1, MapAttributeGroup sourceGrp2)
          Convenience method to create a join operator with 2 input groups, and connect 2 source groups to the 2 input groups.
static MapOperator createJoin(java.lang.String joinName, MapOperator source1, MapOperator source2)
          Convenience method to create a join operator with 2 input groups, and connect 2 source operators to the 2 input groups.
static java.lang.String getFullAttributeName(MapAttribute attribute)
          Convenience method to gets the fully qualified name of an attribute, in the form+ "groupName.attributeName".
static MapAttribute getJoinerOutput(MapOperator joiner, MapAttribute input)
          Returns the joiner output corresponding to a specified input.
static java.lang.String[] getOperatorTypes()
          Returns an array of all the defined operator type constants.
static boolean isBindableOperatorType(java.lang.String operatorType)
          Determines if a given mapping operator type is bound or unbound.
static ExpressionValidationInfo validateExpression(PropertyOwner owner, java.lang.String key, java.lang.String expressionText)
          Validates an expression property, given the property key, and the proposed expression string.

 

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

 

Constructor Detail

MapUtility

public MapUtility()
Method Detail

isBindableOperatorType

public static boolean isBindableOperatorType(java.lang.String operatorType)
Determines if a given mapping operator type is bound or unbound.
Parameters:
operatorType - The operator type. Should be one of the string OPTYPE constants found in the MapGen interface.
Returns:
true if the type is bound, else false.

getOperatorTypes

public static java.lang.String[] getOperatorTypes()
Returns an array of all the defined operator type constants.
Returns:
array of string constants which can be used in operator creation.

connectOperators

public static void connectOperators(MapOperator fromOperator,
MapOperator toOperator)
                             throws MapConnectionFailureException,
OWBException
Convenience method to connect a source operator to a target operator. This will only work if the source operator contains only one output or input/output group, and the target operator contains only one input or input/output group. If the operators do not meet the conditions above, or if the connection was unsuccessful, an exception will be thrown.
Parameters:
fromOperator - The source operator of the connection.
toOperator - The target operator of the connection.
Throws:
MapConnectionFailureException - if the connection cannot be established.
OWBException - if any internal error is encountered.

createJoin

public static MapOperator createJoin(java.lang.String joinName,
MapOperator source1,
MapOperator source2)
                              throws MapConnectionFailureException,
InvalidFormatException,
NameSpaceException,
OWBException
Convenience method to create a join operator with 2 input groups, and connect 2 source operators to the 2 input groups. This will only work if both source operators have only one output or input/output group. If this condition is not met, an exception will be thrown.
Parameters:
joinName - The name of the new joiner operator
source1 - The 1st source operator
source2 - The 2nd source operator
Returns:
The newly created join operator
Throws:
MapConnectionFailureException - if the connection cannot be established.
InvalidFormatException - if the join operator name is invalid.
NameSpaceException - if an operator with the same name already exits.
OWBException - if any internal error is encountered.

createJoin

public static MapOperator createJoin(java.lang.String joinName,
MapAttributeGroup sourceGrp1,
MapAttributeGroup sourceGrp2)
                              throws MapConnectionFailureException,
InvalidFormatException,
NameSpaceException,
OWBException
Convenience method to create a join operator with 2 input groups, and connect 2 source groups to the 2 input groups.
Parameters:
joinName - The name of the new joiner operator
sourceGrp1 - The 1st source attribute group
sourceGrp2 - The 2nd source attribute group
Returns:
The newly created join operator
Throws:
MapConnectionFailureException - if the connection cannot be established.
InvalidFormatException - if the join operator name is invalid.
NameSpaceException - if an operator with the same name already exits.
OWBException - if any internal error is encountered.

addToJoin

public static MapAttributeGroup addToJoin(MapOperator joiner,
MapOperator source)
                                   throws MapConnectionFailureException,
OWBException
Convenience method to add an input group to an existing join operator, and connect a source operator to the new input group. This will only work if the source operator has only one output or input/output group. If this condition is not met, an exception will be thrown.
Parameters:
joiner - The existing join operator.
source - The new participant in the join.
Returns:
The newly created joiner input group
Throws:
MapConnectionFailureException - if the connection cannot be established.
OWBException - if any internal error is encountered.

addToJoin

public static MapAttributeGroup addToJoin(MapOperator joiner,
MapAttributeGroup sourceGrp)
                                   throws MapConnectionFailureException,
OWBException
Convenience method to add an input group to an existing join operator, and connect a source output group to the new input group.
Parameters:
joiner - The existing join operator.
sourceGrp - The new participant in the join.
Returns:
The joiner operator
Throws:
MapConnectionFailureException - if the connection cannot be established.
OWBException - if any internal error is encountered.

getJoinerOutput

public static MapAttribute getJoinerOutput(MapOperator joiner,
MapAttribute input)
Returns the joiner output corresponding to a specified input.
Parameters:
joiner - The joiner operator
input - The input attribute for which to find the output
Returns:
The output attribute, or null if the passed-in operator is not a joiner.

getFullAttributeName

public static java.lang.String getFullAttributeName(MapAttribute attribute)
Convenience method to gets the fully qualified name of an attribute, in the form+ "groupName.attributeName". This name can then be used in an expression.
Parameters:
attribute - The attribute for which to get a fully qualified name
Returns:
The fully qualified name.

validateExpression

public static ExpressionValidationInfo validateExpression(PropertyOwner owner,
                                                          java.lang.String key,
                                                          java.lang.String expressionText)
                                                   throws OWBException
Validates an expression property, given the property key, and the proposed expression string. Throws a ExpressionValidationException if errors were found in the expression. WARNING: Calling this method is fairly expensive - it creates a dummy PL/SQL context procedure and deploys it to the server to be validated.
Parameters:
owner - The MapOperator that owns the expression property
key - The property key
expressionText - The proposed expression string
Returns:
An ExpressionValidationInfo instance that contains information about the validation, or null if no validation was possible.
Throws:
OWBException - if any internal error is encountered.

Oracle Warehouse Builder Java API Reference
10g Release 1 (10.1)

B12155-01

Copyright © 2003, Oracle. All Rights Reserved.