public class XmlDomDataContext extends QueryPostprocessDataContext
XmlSaxDataContext
Modifier and Type | Field and Description |
---|---|
static String |
NATIVE_TYPE_ATTRIBUTE |
static String |
NATIVE_TYPE_FOREIGN_KEY |
static String |
NATIVE_TYPE_PRIMARY_KEY |
static String |
NATIVE_TYPE_TEXT |
INFORMATION_SCHEMA_NAME
Constructor and Description |
---|
XmlDomDataContext(File file)
Creates an XML DataContext strategy based on a file.
|
XmlDomDataContext(File file,
boolean autoFlattenTables) |
XmlDomDataContext(InputSource inputSource,
String schemaName,
boolean autoFlattenTables) |
XmlDomDataContext(Resource resource,
boolean autoFlattenTables)
Creates an XML DataContext strategy based on a file.
|
XmlDomDataContext(String schemaName,
Document document,
boolean autoFlattenTables)
Creates an XML DataContext strategy based on an already parsed Document.
|
XmlDomDataContext(URL url,
boolean autoFlattenTables) |
Modifier and Type | Method and Description |
---|---|
XmlDomDataContext |
autoFlattenTables()
Automatically flattens tables that only contain a single data carrying
column.
|
XmlDomDataContext |
flattenTables(Relationship relationship) |
static Attr[] |
getAttributes(Element element) |
static Element[] |
getChildElements(Element element) |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
static String |
getTextContent(Element element) |
static boolean |
hasSiblings(Element element) |
boolean |
isAutoFlattenTables() |
static boolean |
isRootElement(Element element) |
XmlDomDataContext |
loadSchema()
Loads the schema if it hasn't been loaded before
|
DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows)
Executes a simple one-table query against a table in the main schema of
the subclasses of this class.
|
XmlDomDataContext |
reloadSchema()
Forces a fresh load of the schema, even though it has already been loaded
|
void |
setAutoFlattenTables(boolean autoFlattenTables) |
addConverter, executeCountQuery, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getMainSchemaInternal, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTable, materializeTable, materializeTable
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemas
public static final String NATIVE_TYPE_PRIMARY_KEY
public static final String NATIVE_TYPE_FOREIGN_KEY
public static final String NATIVE_TYPE_ATTRIBUTE
public static final String NATIVE_TYPE_TEXT
public XmlDomDataContext(String schemaName, Document document, boolean autoFlattenTables)
schemaName
- document
- autoFlattenTables
- public XmlDomDataContext(Resource resource, boolean autoFlattenTables) throws IllegalArgumentException
resource
- the resource to parseautoFlattenTables
- a parameter indicating whether or not tags with only text
content or a single attribute should be flattened with it's
parent tableIllegalArgumentException
- if the file does not existpublic XmlDomDataContext(File file, boolean autoFlattenTables)
public XmlDomDataContext(InputSource inputSource, String schemaName, boolean autoFlattenTables)
public XmlDomDataContext(URL url, boolean autoFlattenTables) throws IllegalArgumentException
IllegalArgumentException
public XmlDomDataContext(File file)
file
- the file to parsepublic boolean isAutoFlattenTables()
public void setAutoFlattenTables(boolean autoFlattenTables)
public DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
QueryPostprocessDataContext
materializeMainSchemaTable
in class QueryPostprocessDataContext
table
- the table to querycolumns
- the columns of the table to querymaxRows
- the maximum amount of rows needed or -1 if all rows are
wanted.protected String getMainSchemaName() throws MetaModelException
getMainSchemaName
in class QueryPostprocessDataContext
MetaModelException
protected Schema getMainSchema() throws MetaModelException
getMainSchema
in class QueryPostprocessDataContext
MetaModelException
public XmlDomDataContext reloadSchema()
public XmlDomDataContext loadSchema()
public static boolean hasSiblings(Element element)
public static boolean isRootElement(Element element)
public XmlDomDataContext flattenTables(Relationship relationship)
public XmlDomDataContext autoFlattenTables()
Copyright © 2007–2016 The Apache Software Foundation. All rights reserved.