public class DatabaseIO extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BASE64_ATTR_NAME
The name of the XML attribute use to denote that teh content of a data XML
element uses Base64 encoding.
|
static String |
DDLUTILS_NAMESPACE
The namespace used by DdlUtils.
|
static QName |
QNAME_ATTRIBUTE_AUTO_INCREMENT
Qualified name of the autoIncrement attribute.
|
static QName |
QNAME_ATTRIBUTE_DEFAULT
Qualified name of the default attribute.
|
static QName |
QNAME_ATTRIBUTE_DEFAULT_ID_METHOD
Qualified name of the defaultIdMethod attribute.
|
static QName |
QNAME_ATTRIBUTE_DESCRIPTION
Qualified name of the description attribute.
|
static QName |
QNAME_ATTRIBUTE_FOREIGN
Qualified name of the foreign attribute.
|
static QName |
QNAME_ATTRIBUTE_FOREIGN_TABLE
Qualified name of the foreignTable attribute.
|
static QName |
QNAME_ATTRIBUTE_JAVA_NAME
Qualified name of the javaName attribute.
|
static QName |
QNAME_ATTRIBUTE_LOCAL
Qualified name of the local attribute.
|
static QName |
QNAME_ATTRIBUTE_NAME
Qualified name of the name attribute.
|
static QName |
QNAME_ATTRIBUTE_ON_DELETE
Qualified name of the onDelete attribute.
|
static QName |
QNAME_ATTRIBUTE_ON_UPDATE
Qualified name of the onUpdate attribute.
|
static QName |
QNAME_ATTRIBUTE_PRIMARY_KEY
Qualified name of the primaryKey attribute.
|
static QName |
QNAME_ATTRIBUTE_REQUIRED
Qualified name of the required attribute.
|
static QName |
QNAME_ATTRIBUTE_SIZE
Qualified name of the size attribute.
|
static QName |
QNAME_ATTRIBUTE_TYPE
Qualified name of the type attribute.
|
static QName |
QNAME_ATTRIBUTE_VERSION
Qualified name of the version attribute.
|
static QName |
QNAME_ELEMENT_COLUMN
Qualified name of the column element.
|
static QName |
QNAME_ELEMENT_DATABASE
Qualified name of the database element.
|
static QName |
QNAME_ELEMENT_FOREIGN_KEY
Qualified name of the foreign-key element.
|
static QName |
QNAME_ELEMENT_INDEX
Qualified name of the index element.
|
static QName |
QNAME_ELEMENT_INDEX_COLUMN
Qualified name of the index-column element.
|
static QName |
QNAME_ELEMENT_REFERENCE
Qualified name of the reference element.
|
static QName |
QNAME_ELEMENT_TABLE
Qualified name of the table element.
|
static QName |
QNAME_ELEMENT_UNIQUE
Qualified name of the unique element.
|
static QName |
QNAME_ELEMENT_UNIQUE_COLUMN
Qualified name of the unique-column element.
|
| Constructor and Description |
|---|
DatabaseIO() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isUseInternalDtd()
Deprecated.
Switched to XML schema, and the internal XML schema should always be used
|
boolean |
isValidateXml()
Returns whether XML is validated upon reading it.
|
Database |
read(File file)
Reads the database model contained in the specified file.
|
Database |
read(InputSource source)
Reads the database model from the given input source.
|
Database |
read(Reader reader)
Reads the database model given by the reader.
|
Database |
read(String filename)
Reads the database model contained in the specified file.
|
void |
setUseInternalDtd(boolean useInternalDtd)
Deprecated.
Switched to XML schema, and the internal XML schema should always be used
|
void |
setValidateXml(boolean validateXml)
Specifies whether XML shall be validated upon reading it.
|
void |
write(Database model,
OutputStream output)
Writes the database model to the given output stream.
|
void |
write(Database model,
String filename)
Writes the database model to the specified file.
|
void |
write(Database model,
Writer output)
Writes the database model to the given output writer.
|
public static final String BASE64_ATTR_NAME
public static final String DDLUTILS_NAMESPACE
public static final QName QNAME_ELEMENT_COLUMN
public static final QName QNAME_ELEMENT_DATABASE
public static final QName QNAME_ELEMENT_FOREIGN_KEY
public static final QName QNAME_ELEMENT_INDEX
public static final QName QNAME_ELEMENT_INDEX_COLUMN
public static final QName QNAME_ELEMENT_REFERENCE
public static final QName QNAME_ELEMENT_TABLE
public static final QName QNAME_ELEMENT_UNIQUE
public static final QName QNAME_ELEMENT_UNIQUE_COLUMN
public static final QName QNAME_ATTRIBUTE_AUTO_INCREMENT
public static final QName QNAME_ATTRIBUTE_DEFAULT
public static final QName QNAME_ATTRIBUTE_DEFAULT_ID_METHOD
public static final QName QNAME_ATTRIBUTE_DESCRIPTION
public static final QName QNAME_ATTRIBUTE_FOREIGN
public static final QName QNAME_ATTRIBUTE_FOREIGN_TABLE
public static final QName QNAME_ATTRIBUTE_JAVA_NAME
public static final QName QNAME_ATTRIBUTE_LOCAL
public static final QName QNAME_ATTRIBUTE_NAME
public static final QName QNAME_ATTRIBUTE_ON_DELETE
public static final QName QNAME_ATTRIBUTE_ON_UPDATE
public static final QName QNAME_ATTRIBUTE_PRIMARY_KEY
public static final QName QNAME_ATTRIBUTE_REQUIRED
public static final QName QNAME_ATTRIBUTE_SIZE
public static final QName QNAME_ATTRIBUTE_TYPE
public static final QName QNAME_ATTRIBUTE_VERSION
public boolean isValidateXml()
true if read XML is validatedpublic void setValidateXml(boolean validateXml)
validateXml - true if read XML shall be validatedpublic boolean isUseInternalDtd()
true if parsing uses the internal dtdpublic void setUseInternalDtd(boolean useInternalDtd)
useInternalDtd - Whether to use the internal dtdpublic Database read(String filename) throws DdlUtilsXMLException
filename - The model file nameDdlUtilsXMLExceptionpublic Database read(File file) throws DdlUtilsXMLException
file - The model fileDdlUtilsXMLExceptionpublic Database read(Reader reader) throws DdlUtilsXMLException
reader - The reader that returns the model XMLDdlUtilsXMLExceptionpublic Database read(InputSource source) throws DdlUtilsXMLException
source - The input sourceDdlUtilsXMLExceptionpublic void write(Database model, String filename) throws DdlUtilsXMLException
model - The database modelfilename - The model file nameDdlUtilsXMLExceptionpublic void write(Database model, OutputStream output) throws DdlUtilsXMLException
model - The database modeloutput - The output streamDdlUtilsXMLExceptionpublic void write(Database model, Writer output) throws DdlUtilsXMLException
model - The database modeloutput - The output writerDdlUtilsXMLExceptionCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.