Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

oracle.adfinternal.model.adapter.url.xml
Class XMLDCDef

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractDefinition
      extended by oracle.adfinternal.model.adapter.url.xml.XMLDCDef
All Implemented Interfaces:
DataControlDefinition, Definition, NamedDefinition

public class XMLDCDef
extends AbstractDefinition

Data control definition representing XML data.


Field Summary
static java.lang.String CONNECTION_NAME
          Attribute to hold the connection name.
static java.lang.String DEFINITION
          Definition tag as the root.
static java.lang.String HTTP_METHOD
          Attribute to hold the HTTP Method.
static java.lang.String INPUT_SCHEMA_LOC
          Attribute to contain the input XSD URL
static java.lang.String PARAMETER
          Parameter tag
static java.lang.String PARAMETER_NAME
          Parameter name tag
static java.lang.String PARAMETER_VALUE
          Parameter Value tag
static java.lang.String PARAMETERS
          Parameters tag
static java.lang.String SCHEMA_LOC
          Attribute to contain the XSD URL.
static java.lang.String SOURCE_LOC
          Attribute to contain the source URL.
static java.lang.String TRANSFORMER_LOC
          Attribute to contain the XSL URL.
static java.lang.String URL_QUERY
          Attribute to hold the URL query.
static java.lang.String URLXML_NS
          Namespace for the metadata definition.
static java.lang.String USE_PERSIST_STRUCT
           
static java.lang.String XML_ROOT_ELEMENT
          Attribute to hold root element
 
Fields inherited from class oracle.adf.model.adapter.AbstractDefinition
CACHE_TO_CLASSPATH, CACHE_TO_SOURCEPATH, DONT_CACHE, mFullName
 
Fields inherited from interface oracle.binding.meta.Definition
TYPE_ACCESSOR, TYPE_ATTRIBUTE, TYPE_CRITERIA, TYPE_CRITERIA_ITEM, TYPE_CRITERIA_OPERATOR, TYPE_CRITERIA_ROW, TYPE_DATACONTROL, TYPE_DEFINITION, TYPE_DEFINITIONCONTEXT, TYPE_NAMED, TYPE_OPERATION, TYPE_OPERATIONRETURN, TYPE_PARAMETER, TYPE_STRUCTURE, TYPE_VARIABLE
 
Constructor Summary
XMLDCDef()
          Default constructor.
XMLDCDef(java.lang.String name, java.lang.String xsdLoc, java.lang.String xslLoc)
          Creats a URL XML Definition object.
 
Method Summary
 void bindConnection(javax.naming.Context context, javax.naming.Reference conn)
          Bind the underlying connection used by this data control into the context provided by the caller.
 DataControl createDataControl()
          Creates XML data control instance from the metadata definition.
 java.lang.String getAdapterType()
          Returns the type of the adapter.
 java.lang.String getConnectionName()
          return the URL connection name.
 java.lang.String getDataControlImplName()
          Gets the name of the data control implementation class for URL XML.
 java.lang.String getDCName()
          return name of the data control
 java.lang.String getHttpMethod()
          return the Http Method.
 java.lang.String getInputXSDLoc()
          return the Input XSD Location.
 Node getMetadata()
          Returns the metadata definition node.
 java.util.Map getParamsMap()
          Returns a mapping of the parameters and the default values.
 java.lang.String getRootElement()
          return the Url query.
 java.lang.String getRootStructureName()
          Gets the root structure definition name
 java.lang.String getSourceLocation()
          return the data source location.
 StructureDefinition getStructure()
          Returns the structure definition.
 java.lang.String getUrlQuery()
          return the Url query.
 java.lang.String getXSDLocation()
          return the XSD location.
 java.lang.String getXSLLocation()
          return the XSL location.
 boolean isStructureDirty(boolean refresh)
          Tells the framework whether the Data control structure is dirty and needs to be refreshed on the palette.
 void loadFromMetadata(Node node, java.util.Map params)
          Loads the definition from a metadata Node.
 void setHttpMethod(java.lang.String methodName)
          Sets the Http Method for the definition.
 void setInputXSDLoc(java.lang.String XSDLoc)
          Sets the Input XSD Location.
 void setParamsMap(java.util.Map paramsMap)
          Sets the parameter Maps for the definition.
 void setRootElement(java.lang.String rootElement)
          set the RootElement.
 void setRootStructureName(java.lang.String rootDefName)
          Sets the root structure definition name
 void setSourceConnectionName(java.lang.String name)
          Sets the name of the URL connection of the data source.
 void setSourceLocation(java.lang.String loc)
          Sets the data source location.
 void setUrlQuery(java.lang.String query)
          Sets the query of the data source.
 void setXSDLocation(java.lang.String xsdLoc)
          set the XSD location.
 void setXSLLocation(java.lang.String xslLoc)
          set the XSL location.
 
Methods inherited from class oracle.adf.model.adapter.AbstractDefinition
assignDefaultPackage, createDuplicateDetailIterator, getAdapterContext, getCachingMode, getConfigurationFullName, getDefClassName, getDefinitionParent, getDefinitionType, getFactoryClassName, getFullName, getName, getParameters, getProperties, getProperty, isSupported, setAdapterContext, setCachingMode, setCompileProjectOnCreate, setConfigurationFullName, setFullName, setName, setProperty, shouldCompileProjectOnCreate, shouldStoreStructureDefinition, usePersistedStructure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

URLXML_NS

public static final java.lang.String URLXML_NS
Namespace for the metadata definition.

See Also:
Constant Field Values

DEFINITION

public static final java.lang.String DEFINITION
Definition tag as the root.

See Also:
Constant Field Values

SOURCE_LOC

public static final java.lang.String SOURCE_LOC
Attribute to contain the source URL.

See Also:
Constant Field Values

CONNECTION_NAME

public static final java.lang.String CONNECTION_NAME
Attribute to hold the connection name.

See Also:
Constant Field Values

URL_QUERY

public static final java.lang.String URL_QUERY
Attribute to hold the URL query.

See Also:
Constant Field Values

HTTP_METHOD

public static final java.lang.String HTTP_METHOD
Attribute to hold the HTTP Method.

See Also:
Constant Field Values

SCHEMA_LOC

public static final java.lang.String SCHEMA_LOC
Attribute to contain the XSD URL.

See Also:
Constant Field Values

TRANSFORMER_LOC

public static final java.lang.String TRANSFORMER_LOC
Attribute to contain the XSL URL.

See Also:
Constant Field Values

USE_PERSIST_STRUCT

public static final java.lang.String USE_PERSIST_STRUCT
See Also:
Constant Field Values

INPUT_SCHEMA_LOC

public static final java.lang.String INPUT_SCHEMA_LOC
Attribute to contain the input XSD URL

See Also:
Constant Field Values

XML_ROOT_ELEMENT

public static final java.lang.String XML_ROOT_ELEMENT
Attribute to hold root element

See Also:
Constant Field Values

PARAMETERS

public static final java.lang.String PARAMETERS
Parameters tag

See Also:
Constant Field Values

PARAMETER

public static final java.lang.String PARAMETER
Parameter tag

See Also:
Constant Field Values

PARAMETER_NAME

public static final java.lang.String PARAMETER_NAME
Parameter name tag

See Also:
Constant Field Values

PARAMETER_VALUE

public static final java.lang.String PARAMETER_VALUE
Parameter Value tag

See Also:
Constant Field Values
Constructor Detail

XMLDCDef

public XMLDCDef()
Default constructor. Used by runtime only. UI tool designer should not use.


XMLDCDef

public XMLDCDef(java.lang.String name,
                java.lang.String xsdLoc,
                java.lang.String xslLoc)
Creats a URL XML Definition object.

Parameters:
name - Name of the definition.
xmlLoc - XML URL location
xsdLoc - XML XSD Location.
xslLoc - XML XSL location.
Method Detail

getDCName

public java.lang.String getDCName()
return name of the data control

Specified by:
getDCName in class AbstractDefinition

getDataControlImplName

public java.lang.String getDataControlImplName()
Gets the name of the data control implementation class for URL XML.


setSourceLocation

public void setSourceLocation(java.lang.String loc)
                       throws AdapterException
Sets the data source location.

If the source connection name is defined, the source location value will not be used to fetch data.

Parameters:
loc - Location of the data source.
Throws:
AdapterException

bindConnection

public void bindConnection(javax.naming.Context context,
                           javax.naming.Reference conn)
                    throws AdapterException
Bind the underlying connection used by this data control into the context provided by the caller. The data control loads the connection both at design time and runtime. Allowing the context to be provided by caller allows more flexibility to bind and load the connection information irrespective of the DT / RT operations.

Parameters:
context - The Context provided by the caller into which the connection for this service is to be bound.
Throws:
{@link - AdapterException} If the connection cannot be bound into the context provided.
AdapterException

setSourceConnectionName

public void setSourceConnectionName(java.lang.String name)
Sets the name of the URL connection of the data source.

Parameters:
name - Name of the connection that is used as the data source.

setUrlQuery

public void setUrlQuery(java.lang.String query)
Sets the query of the data source.

Parameters:
query - of the data source.

setParamsMap

public void setParamsMap(java.util.Map paramsMap)
Sets the parameter Maps for the definition. The parameter name,value will be used to define the structure of the data.


getParamsMap

public java.util.Map getParamsMap()
Returns a mapping of the parameters and the default values. The parameters can be URI or PATH parameters as in http://somewhere.com?a=##param1## or http://foo.baa.com/index/##Myfile## In the examples shown both param1 and MyFile are the parameters to the data control method.

Returns:
the Map of the name value String pairs of the parameters.

setHttpMethod

public void setHttpMethod(java.lang.String methodName)
Sets the Http Method for the definition.

Parameters:
methodName - Http Method to be invoked

setInputXSDLoc

public void setInputXSDLoc(java.lang.String XSDLoc)
Sets the Input XSD Location.

Parameters:
XSDLoc - Input XSD URL

getMetadata

public Node getMetadata()
Returns the metadata definition node.

Specified by:
getMetadata in class AbstractDefinition
Returns:
Node that represents the metadata to connect to the data source at the runtime.

getStructure

public StructureDefinition getStructure()
Returns the structure definition.

Specified by:
getStructure in interface DataControlDefinition
Specified by:
getStructure in class AbstractDefinition
Returns:
StructureDefinition which are used by DC palette or runtime.

loadFromMetadata

public void loadFromMetadata(Node node,
                             java.util.Map params)
Loads the definition from a metadata Node.

Specified by:
loadFromMetadata in class AbstractDefinition
Parameters:
node - the metadata node.
params - context parameters.

createDataControl

public DataControl createDataControl()
Creates XML data control instance from the metadata definition.

Specified by:
createDataControl in class AbstractDefinition
Returns:
the data control instance.

getSourceLocation

public java.lang.String getSourceLocation()
return the data source location.


getXSDLocation

public java.lang.String getXSDLocation()
return the XSD location.


setXSDLocation

public void setXSDLocation(java.lang.String xsdLoc)
set the XSD location.


setXSLLocation

public void setXSLLocation(java.lang.String xslLoc)
set the XSL location.


setRootElement

public void setRootElement(java.lang.String rootElement)
set the RootElement.


getXSLLocation

public java.lang.String getXSLLocation()
return the XSL location.


getConnectionName

public java.lang.String getConnectionName()
return the URL connection name.


getUrlQuery

public java.lang.String getUrlQuery()
return the Url query.


getHttpMethod

public java.lang.String getHttpMethod()
return the Http Method.


getInputXSDLoc

public java.lang.String getInputXSDLoc()
return the Input XSD Location.


getRootElement

public java.lang.String getRootElement()
return the Url query.


getAdapterType

public java.lang.String getAdapterType()
Returns the type of the adapter.

Overrides:
getAdapterType in class AbstractDefinition
Returns:
name of the corresponding adapter that matches this definition. If there is no adapter defined for this type, the method returns null. The default implementation returns null.
See Also:
AdapterDefinition

isStructureDirty

public boolean isStructureDirty(boolean refresh)
Tells the framework whether the Data control structure is dirty and needs to be refreshed on the palette.

Overrides:
isStructureDirty in class AbstractDefinition
Parameters:
refresh - flag to indicate if the refresh is requested for the structure.
Returns:
true The XML DC implementation always returns refresh.

setRootStructureName

public void setRootStructureName(java.lang.String rootDefName)
Sets the root structure definition name


getRootStructureName

public java.lang.String getRootStructureName()
Gets the root structure definition name


Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.4.0)

E10653-05

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