Skip navigation links

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

E17483-04


oracle.adfinternal.model.adapter.url.csv
Class CSVDCDef

java.lang.Object
  extended by oracle.adf.model.adapter.AbstractDefinition
      extended by oracle.adfinternal.model.adapter.url.AbstractURLChildDefinition
          extended by oracle.adfinternal.model.adapter.url.csv.CSVDCDef

All Implemented Interfaces:
DataControlDefinition, Definition, NamedDefinition

public class CSVDCDef
extends AbstractURLChildDefinition

Data control definition representing CSV 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 DELIMITER
          Delimiter used in the CSV file
static java.lang.String ENC_STYLE
          Encoding style of the data.
static java.lang.String FILTER_TYPE_ALL
          Filtering type - all
static java.lang.String FILTER_TYPE_ANY
          Filtering type - any
static java.lang.String FILTERCOLUMN
          Column tag as filtering condition.
static java.lang.String FILTERCOMPARETYPE
          CompareType tag
static java.lang.String FILTERCONDITION
          Conditions tag
static java.lang.String FILTERCONDITIONS
          Conditions tag
static java.lang.String FILTERDATAFORMAT
          DataFormat tag
static java.lang.String FILTEROPERATOR
          Operator tag
static java.lang.String FILTERTYPE
          Attribute to contain the filtering match type.
static java.lang.String FILTERVALUE
          Value tag
static java.lang.String HTTP_HEADERS
           
static java.lang.String HTTP_METHOD
          Attribute to hold the HTTP Method.
static java.lang.String ID
          Attribute to hold the ID.
static java.lang.String IMPL_DEF
          Attribute to hold the ImplDef.
static java.lang.String INPUT_SCHEMA_LOC
          Attribute to hold the HTTP Method.
static java.lang.String IS_FIRST_ROW_NAMES
          Attribute to contain if the first row will be treated as column names.
static java.lang.String PARAM_NAME
          HttpHeaders ParamName attribute
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 QUOTE_CHAR
          Character used to denote a quoted text
static java.lang.String RESULT_ACC_NAME
           
static java.lang.String SOURCE_LOC
          Attribute to contain the source URL.
static java.lang.String URL_QUERY
          Attribute to hold the URL query.
static java.lang.String URLCSV_NS
          Namespace for the metadata definition.
static java.lang.String USE_PERSIST_STRUCT
           

 

Fields inherited from class oracle.adf.model.adapter.AbstractDefinition
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
CSVDCDef()
          Default constructor.
CSVDCDef(java.lang.String name, boolean isFirstRowNames, java.lang.String encodingStyle, java.lang.String delim, java.lang.String quoteChar)
          Creats a URL CSV 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 CSV 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 getDCName()
          return name of the data control
 java.lang.String getDelimiter()
          return the csv delimiter.
 java.lang.String getEncStyle()
          return the csv encoding.
 java.util.Map getFilteringColFormatMap()
           
 java.util.Map getFilteringColTypeMap()
           
 java.lang.String[] getFilteringConditions()
          return the filtering conditions.
 java.lang.String getFilteringType()
          return the filtering type.
 java.lang.String getHttpHeaderParamName()
           
 java.lang.String getHttpMethod()
          return the Http Method.
 java.lang.String getId()
           
 java.lang.String getInputXSDLoc()
          return the Input XSD Location.
 boolean getIsFirstRowNames()
          return the boolean to indicate whether First rows as columns
 Node getMetadata()
          Returns the metadata definition node.
 MethodDef getMethodDef(StructureDef structDef, AdapterContext adapterCtx, java.lang.String dcName)
          Added to the child definitions for Backward Compatibility.
 ParameterDefinition[] getParameters()
          Returns the parameters that are defined for the data control metadata.
 java.util.Map getParamsMap()
          Gets the parameter Maps for the definition.
 java.lang.String getQuoteChar()
          return the csv quote char
 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.
 boolean isIncludeHttpHeaders()
           
 boolean isStructureDirty(boolean refresh)
          Tells the framework whether the Data control structure is dirty and needs to be refreshed on the palette.
 boolean isSupported(java.lang.String flag)
          Indicates that what is supported by csv data control.
 void loadDefinition(Node node, java.util.Map params)
          Added to the child definitions for Backward Compatibility.
 void loadFromMetadata(Node node, java.util.Map params)
          Loads the definition from a metadata Node.
 void setDelimiter(java.lang.String delimiter)
          Sets the csv delimiter.
 void setEncoding(java.lang.String encoding)
          Sets the csv encoding.
 void setFilteringConditions(java.util.ArrayList filterConditions)
          Set the filtering conditions.
 void setFilteringType(java.lang.String filterType)
          set the filtering type.
 void setFirstRowNames(boolean isFirstRows)
          Sets the boolean to indicate whether First rows as columns.
 void setHttpHeaderParamName(java.lang.String mHttpHeaderParamName)
           
 void setHttpMethod(java.lang.String methodName)
          Sets the Http Method for the definition.
 void setId(java.lang.String id)
           
 void setIncludeHttpHeaders(boolean mIncludeHttpHeaders)
           
 void setInputXSDLoc(java.lang.String XSDLoc)
          Sets the Input XSD Location.
 void setParameters(ParameterDefinition[] params)
          Sets the parameter names for the definition.
 void setParamsMap(java.util.Map paramsMap)
          Sets the parameter Maps for the definition.
 void setQuoteChar(java.lang.String quotechar)
          Sets the csv quotechar.
 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 urlQuery)
          Sets the query part of the data source.

 

Methods inherited from class oracle.adf.model.adapter.AbstractDefinition
assignDefaultPackage, createDuplicateDetailIterator, getAdapterContext, getCachingMode, getConfigurationFullName, getDefClassName, getDefinitionParent, getDefinitionType, getFactoryClassName, getFullName, getName, getProperties, getProperty, setAdapterContext, setCachingMode, setCompileProjectOnCreate, setConfigurationFullName, setFullName, setName, setProperty, shouldCompileProjectOnCreate, useDefinitionProvider, usePersistedStructure

 

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

 

Field Detail

RESULT_ACC_NAME

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

URLCSV_NS

public static final java.lang.String URLCSV_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

FILTERCONDITIONS

public static final java.lang.String FILTERCONDITIONS
Conditions tag
See Also:
Constant Field Values

FILTERCONDITION

public static final java.lang.String FILTERCONDITION
Conditions tag
See Also:
Constant Field Values

FILTERCOLUMN

public static final java.lang.String FILTERCOLUMN
Column tag as filtering condition.
See Also:
Constant Field Values

FILTEROPERATOR

public static final java.lang.String FILTEROPERATOR
Operator tag
See Also:
Constant Field Values

FILTERVALUE

public static final java.lang.String FILTERVALUE
Value tag
See Also:
Constant Field Values

FILTERCOMPARETYPE

public static final java.lang.String FILTERCOMPARETYPE
CompareType tag
See Also:
Constant Field Values

FILTERDATAFORMAT

public static final java.lang.String FILTERDATAFORMAT
DataFormat tag
See Also:
Constant Field Values

FILTERTYPE

public static final java.lang.String FILTERTYPE
Attribute to contain the filtering match type.
See Also:
Constant Field Values

FILTER_TYPE_ALL

public static final java.lang.String FILTER_TYPE_ALL
Filtering type - all
See Also:
Constant Field Values

FILTER_TYPE_ANY

public static final java.lang.String FILTER_TYPE_ANY
Filtering type - any
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

ID

public static final java.lang.String ID
Attribute to hold the ID.
See Also:
Constant Field Values

IMPL_DEF

public static final java.lang.String IMPL_DEF
Attribute to hold the ImplDef.
See Also:
Constant Field Values

INPUT_SCHEMA_LOC

public static final java.lang.String INPUT_SCHEMA_LOC
Attribute to hold the HTTP Method.
See Also:
Constant Field Values

IS_FIRST_ROW_NAMES

public static final java.lang.String IS_FIRST_ROW_NAMES
Attribute to contain if the first row will be treated as column names.
See Also:
Constant Field Values

ENC_STYLE

public static final java.lang.String ENC_STYLE
Encoding style of the data.
See Also:
Constant Field Values

DELIMITER

public static final java.lang.String DELIMITER
Delimiter used in the CSV file
See Also:
Constant Field Values

QUOTE_CHAR

public static final java.lang.String QUOTE_CHAR
Character used to denote a quoted text
See Also:
Constant Field Values

USE_PERSIST_STRUCT

public static final java.lang.String USE_PERSIST_STRUCT
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

HTTP_HEADERS

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

PARAM_NAME

public static final java.lang.String PARAM_NAME
HttpHeaders ParamName attribute
See Also:
Constant Field Values

Constructor Detail

CSVDCDef

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

CSVDCDef

public CSVDCDef(java.lang.String name,
                boolean isFirstRowNames,
                java.lang.String encodingStyle,
                java.lang.String delim,
                java.lang.String quoteChar)
Creats a URL CSV Definition object.
Parameters:
name - Name of the definition.
isFirstRowNames - Flag to indicate if the first row of the CSV data can be treated as column names.
encodingStyle - Encoding style of the data.
delim - Character value separators.

Method Detail

setParameters

public void setParameters(ParameterDefinition[] params)
Sets the parameter names for the definition. The parameter names will be used to define the structure of the data.

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.

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

setUrlQuery

public void setUrlQuery(java.lang.String urlQuery)
Sets the query part of the data source.
Parameters:
urlQuery - URL query of the data source.

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

setDelimiter

public void setDelimiter(java.lang.String delimiter)
Sets the csv delimiter.
Parameters:
delimiter - the csv delimiter.

setEncoding

public void setEncoding(java.lang.String encoding)
Sets the csv encoding.
Parameters:
encoding - the csv encoding.

setQuoteChar

public void setQuoteChar(java.lang.String quotechar)
Sets the csv quotechar.
Parameters:
quotechar - the csv QuoteChar.

setFirstRowNames

public void setFirstRowNames(boolean isFirstRows)
Sets the boolean to indicate whether First rows as columns.
Parameters:
isFirstRows - the boolean to indicate whether First rows as columns.

isSupported

public boolean isSupported(java.lang.String flag)
Indicates that what is supported by csv data control.
Overrides:
isSupported in class AbstractDefinition
Parameters:
flag - one of the values defined in DataControlDefinition.
Returns:
returns true if flag is for sorting which indicates sorting is supported for CSV data control.

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.

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

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 CSV data control instance from the metadata definition.
Specified by:
createDataControl in class AbstractDefinition
Returns:
the data control instance.

getDCName

public java.lang.String getDCName()
return name of the data control
Specified by:
getDCName in class AbstractDefinition

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

getParameters

public ParameterDefinition[] getParameters()
Returns the parameters that are defined for the data control metadata.

The implementation should override this method if the definition uses parameters. The default implementatiaon returns null.

Overrides:
getParameters in class AbstractDefinition

getParamsMap

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

getSourceLocation

public java.lang.String getSourceLocation()
return the data source 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.

getEncStyle

public java.lang.String getEncStyle()
return the csv encoding.

getDelimiter

public java.lang.String getDelimiter()
return the csv delimiter.

getQuoteChar

public java.lang.String getQuoteChar()
return the csv quote char

getIsFirstRowNames

public boolean getIsFirstRowNames()
return the boolean to indicate whether First rows as columns

getFilteringType

public java.lang.String getFilteringType()
return the filtering type.

setFilteringType

public void setFilteringType(java.lang.String filterType)
set the filtering type.

getFilteringConditions

public java.lang.String[] getFilteringConditions()
return the filtering conditions.

setFilteringConditions

public void setFilteringConditions(java.util.ArrayList filterConditions)
Set the filtering conditions.

getFilteringColTypeMap

public java.util.Map getFilteringColTypeMap()
Returns:
the Map which has the key: colName, value: colType

getFilteringColFormatMap

public java.util.Map getFilteringColFormatMap()
Returns:
the Map which has the key: colName, value: colFormat

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 CSV DC implementation always returns refresh flag.

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

setIncludeHttpHeaders

public void setIncludeHttpHeaders(boolean mIncludeHttpHeaders)

isIncludeHttpHeaders

public boolean isIncludeHttpHeaders()

setHttpHeaderParamName

public void setHttpHeaderParamName(java.lang.String mHttpHeaderParamName)

getHttpHeaderParamName

public java.lang.String getHttpHeaderParamName()

loadDefinition

public void loadDefinition(Node node,
                           java.util.Map params)
Description copied from class: AbstractURLChildDefinition
Added to the child definitions for Backward Compatibility.
Overrides:
loadDefinition in class AbstractURLChildDefinition

getMethodDef

public MethodDef getMethodDef(StructureDef structDef,
                              AdapterContext adapterCtx,
                              java.lang.String dcName)
Description copied from class: AbstractURLChildDefinition
Added to the child definitions for Backward Compatibility.
Overrides:
getMethodDef in class AbstractURLChildDefinition
Returns:

setId

public void setId(java.lang.String id)

getId

public java.lang.String getId()

Skip navigation links

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

E17483-04


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