Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.jxml.quick
Class Quick

    java.lang.Object
      |
      +--com.jxml.quick.Quick

public class Quick
extends Object

This class provides static access to a large majority of the Quick API.

source

Revised in 1.1

Field Summary
`static String` | `encoding` The encoding used by express in generating the encoding line.
`static QParserPool` | `parserPool`
`static QSoftDocHash` | `schemaHash`
`static String` | `xxx`

Constructor Summary
`Quick()`

Method Summary
`static QDoc` | `convert(QDoc doc, QDoc schema)` Use a conversion tree to create a second object tree.
`static QDoc` | `convert(QDoc doc, QDoc schema, String url)` Use a conversion tree to create a second object tree.
`static QDoc` | `createDoc(Object root, QDoc schema)` Create a new QDoc object.
`static QDoc` | `createDoc(String url, Object root, QDoc schema)` Create a new unique QDoc object.
`static String` | `express(QDoc doc)` Express an object tree as an XML document.
`static String` | `express(QDoc doc, boolean expressDefaults)` Express an object tree as an XML document.
`static void` | `express(QDoc doc, PrintWriter pw)` Express an object tree as an XML document.
`static void` | `express(QDoc doc, PrintWriter pw, boolean expressDefaults)` Express an object tree as an XML document.
`static void` | `express(QDoc doc, String filename)` Express an object tree as an XML document using the default encoding.
`static void` | `express(QDoc doc, String filename, boolean expressDefaults)` Express an object tree as an XML document using the default encoding.
`static String` | `genDocType(String encoding, QDoc doc)` generate the DOCTYPE for doc.
`static String` | `genDocType(String encoding, String rootTag, String PUBLIC, String SYSTEM)` generate the DOCTYPE for doc.
`static HRef` | `getHRef(QDoc doc, Object key)` Get the HRef of an object being referenced by an object tree.
`static String` | `getId(QDoc doc, Object value)` Returns the ID of an object.
`static Object` | `getRoot(QDoc doc)` Return the root object of the object tree held by the QDoc object.
`static QDoc` | `parse(QDoc schema, InputSource is)` Create a QDoc object which holds the object tree build from the XML document specified by a SAX InputSource object.
`static QDoc` | `parse(QDoc schema, String url)` Create a QDoc object which holds the object tree build from the XML document referenced by a URL.
`static QDoc` | `parseQIML(InputSource is, String url)` Create a (unique) QDoc object which holds the schema referenced by a URL.
`static QDoc` | `parseQIML(String url)` Create a (unique) QDoc object which holds the schema referenced by a URL.
`static QDoc` | `parseSchema(InputSource is, String url)` Create a (unique) QDoc object which holds the schema referenced by a URL.
`static QDoc` | `parseSchema(String url)` Create a (unique) QDoc object which holds the schema referenced by a URL.
`static QDoc` | `parseString(QDoc schema, String document)` Create a QDoc object which holds the object tree build from the XML document held in a String.
`static QDoc` | `QIMLSchema()` Returns the binding schema for QIML
`static void` | `setId(QDoc doc, String id, Object value)` Assign an ID to an object held by a QDoc object.
`static void` | `setParserClassName(String parserClassName)` Deprecated.
`static QDoc` | `transcribe(QDoc doc, QDoc schema)` Use the structure and content of one object tree to build a second object tree.
`static QDoc` | `transcribe(QDoc doc, QDoc schema, boolean expressDefaults)` Use the structure and content of one object tree to build a second object tree.
`static QDoc` | `transcribe(QDoc doc, QDoc schema, String url)` Use the structure and content of one object tree to build a second, unique object tree.
`static QDoc` | `transcribe(QDoc doc, QDoc schema, String url, boolean expressDefaults)` Use the structure and content of one object tree to build a second, unique object tree.
`static QDoc` | `uniqueParse(QDoc schema, InputSource is, String url)` Create a unique QDoc object which holds the object tree build from the XML document referenced by a URL.
`static QDoc` | `uniqueParse(QDoc schema, String url)` Create a unique QDoc object which holds the object tree build from the XML document referenced by a URL.
`static String` | `xmlEncoding(String encoding)` Format the character encoding.
`static String` | `xmlEncodingNo(String encoding)`

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

Field Detail

### parserPool

    public static QParserPool parserPool

### schemaHash

    public static QSoftDocHash schemaHash

### encoding

    public static String encoding

  The encoding used by express in generating the encoding line. Initialized to ISO-8859-1 encoding. When set to null, no encoding line is expressed.

### xxx

    public static String xxx

Constructor Detail

### Quick

    public Quick()

Method Detail

### setParserClassName

    public static void setParserClassName(String parserClassName)

  Deprecated.

  Set the SAX parser class name.

### getRoot

    public static Object getRoot(QDoc doc)

  Return the root object of the object tree held by the QDoc object.

### createDoc

    public static QDoc createDoc(Object root,
                                 QDoc schema)

  Create a new QDoc object.
  Parameters:
    `root` - The root object of the object tree.
    `schema` - The QDoc object which knows how to navigate the tree.
  Returns:
    The new QDoc object.

### createDoc

    public static QDoc createDoc(String url,
                                 Object root,
                                 QDoc schema)
                          throws SAXException

  Create a new unique QDoc object.
  Parameters:
    `url` - The String containing the URL or filename which names the document.
    `root` - The root object of the object tree.
    `schema` - The QDoc object which knows how to navigate the tree.
  Returns:
    The new QDoc object.

### getId

    public static String getId(QDoc doc,
                               Object value)
                        throws SAXException

  Returns the ID of an object. If no ID exists, one will be automatically generated. Note that the object tree held by the QDoc object does not contain the ID. This information is held by the QDoc object in a hash table.
  Parameters:
    `doc` - The QDoc object whose object tree includes the object.
    `value` - The object for which the ID is to be obtained.

### setId

    public static void setId(QDoc doc,
                             String id,
                             Object value)
                      throws SAXException

  Assign an ID to an object held by a QDoc object.
  Parameters:
    `doc` - The QDoc object which contains the object whose ID is to be set.
    `id` - The value of the ID to be assigned to the object.
    `value` - The object to which an ID is to be assigned.

### getHRef

    public static HRef getHRef(QDoc doc,
                               Object key)

  Get the HRef of an object being referenced by an object tree.
  Parameters:
    `doc` - The QDoc object which contains the object tree that references the object.
    `key` - The object being referenced.
  Returns:
    The HRef object or null.

### xmlEncoding

    public static String xmlEncoding(String encoding)

  Format the character encoding. When the encoding is null, the empty string is returned.
  Parameters:
    `encoding` - Example: ISO-8859
  Returns:
    The XML encoding.

### xmlEncodingNo

    public static String xmlEncodingNo(String encoding)

### genDocType

    public static String genDocType(String encoding,
                                    QDoc doc)

  generate the DOCTYPE for doc.

### genDocType

    public static String genDocType(String encoding,
                                    String rootTag,
                                    String PUBLIC,
                                    String SYSTEM)

  generate the DOCTYPE for doc.

### express

    public static void express(QDoc doc,
                               String filename)
                        throws SAXException,
                               IOException

  Express an object tree as an XML document using the default encoding.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
    `filename` - File name of the new XML document.

### express

    public static void express(QDoc doc,
                               String filename,
                               boolean expressDefaults)
                        throws SAXException,
                               IOException

  Express an object tree as an XML document using the default encoding.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
    `filename` - File name of the new XML document.
    `expressDefaults` - Turns on the expression of default values.

### express

    public static void express(QDoc doc,
                               PrintWriter pw)
                        throws SAXException,
                               IOException

  Express an object tree as an XML document.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
    `PW` - PrintWriter where the XML document is to be written.

### express

    public static void express(QDoc doc,
                               PrintWriter pw,
                               boolean expressDefaults)
                        throws SAXException,
                               IOException

  Express an object tree as an XML document.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
    `PW` - PrintWriter where the XML document is to be written.
    `expressDefaults` - Turns on the expression of default values.

### express

    public static String express(QDoc doc)
                          throws SAXException,
                                 IOException

  Express an object tree as an XML document.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
  Returns:
    The XML representation

### express

    public static String express(QDoc doc,
                                 boolean expressDefaults)
                          throws SAXException,
                                 IOException

  Express an object tree as an XML document.
  Parameters:
    `doc` - The QDoc object holding the object tree to be expressed in XML.
    `expressDefaults` - Turns on the expression of default values.
  Returns:
    The XML representation

### convert

    public static QDoc convert(QDoc doc,
                               QDoc schema)
                        throws SAXException,
                               IOException

  Use a conversion tree to create a second object tree. Do not use this method when the schema uses links.
  Parameters:
    `doc` - The QDoc object holding the conversion tree. The root object of this tree must implement the QConverter interface.
    `schema` - The schema for the object tree to be built.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### convert

    public static QDoc convert(QDoc doc,
                               QDoc schema,
                               String url)
                        throws SAXException,
                               IOException

  Use a conversion tree to create a second object tree. This method must be used when the schema uses links.
  Parameters:
    `doc` - The QDoc object holding the conversion tree. The root object of this tree must implement the QConverter interface.
    `schema` - The schema for the object tree to be built.
    `url` - The String containing the URL or filename which names the unique document.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### transcribe

    public static QDoc transcribe(QDoc doc,
                                  QDoc schema)
                           throws SAXException

  Use the structure and content of one object tree to build a second object tree. (Different classes can be used to build the second tree.) Do not use this method when the schema uses links.
  Parameters:
    `doc` - The QDoc object containing the data to be extracted.
    `schema` - The schema for the object tree to be built.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### transcribe

    public static QDoc transcribe(QDoc doc,
                                  QDoc schema,
                                  boolean expressDefaults)
                           throws SAXException

  Use the structure and content of one object tree to build a second object tree. (Different classes can be used to build the second tree.) Do not use this method when the schema uses links.
  Parameters:
    `doc` - The QDoc object containing the data to be extracted.
    `schema` - The schema for the object tree to be built.
    `expressDefaults` - Turns on the expression of default values.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### transcribe

    public static QDoc transcribe(QDoc doc,
                                  QDoc schema,
                                  String url)
                           throws SAXException

  Use the structure and content of one object tree to build a second, unique object tree. (Different classes can be used to build the second tree.) This method must be used when the schema uses links.
  Parameters:
    `doc` - The QDoc object containing the data to be extracted.
    `schema` - The schema for the object tree to be built.
    `url` - The String containing the URL or filename which names the unique document.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### transcribe

    public static QDoc transcribe(QDoc doc,
                                  QDoc schema,
                                  String url,
                                  boolean expressDefaults)
                           throws SAXException

  Use the structure and content of one object tree to build a second, unique object tree. (Different classes can be used to build the second tree.) This method must be used when the schema uses links.
  Parameters:
    `doc` - The QDoc object containing the data to be extracted.
    `schema` - The schema for the object tree to be built.
    `url` - The String containing the URL or filename which names the unique document.
    `expressDefaults` - Turns on the expression of default values.
  Returns:
    A new QDoc object holding the newly constructed object tree.

### QIMLSchema

    public static QDoc QIMLSchema()
                           throws SAXException

  Returns the binding schema for QIML

### parseQIML

    public static QDoc parseQIML(InputSource is,
                                 String url)
                          throws IOException,
                                 SAXException

  Create a (unique) QDoc object which holds the schema referenced by a URL. If url is http://www.jxml.com/qiml.qiml, then the internal schema is returned.
  Parameters:
    `is` - An InputSource object specifying the schema to be parsed.
    `url` - The String containing the unique name of the schema to be parsed.

### parseQIML

    public static QDoc parseQIML(String url)
                          throws IOException,
                                 SAXException

  Create a (unique) QDoc object which holds the schema referenced by a URL. If url is http://www.jxml.com/qiml.qiml, then the internal schema is returned.
  Parameters:
    `url` - The String containing the URL or filename of the QIML schema to be parsed.

### parseSchema

    public static QDoc parseSchema(InputSource is,
                                   String url)
                            throws IOException,
                                   SAXException

  Create a (unique) QDoc object which holds the schema referenced by a URL. The URL must end in .qiml or .qjml, or an exception will be raised.
  Parameters:
    `is` - An InputSource object specifying the schema to be parsed.
    `url` - The String containing the unique name of the schema to be parsed.

### parseSchema

    public static QDoc parseSchema(String url)
                            throws IOException,
                                   SAXException

  Create a (unique) QDoc object which holds the schema referenced by a URL. The URL must end in .qiml or .qjml, or an exception will be raised.
  Parameters:
    `url` - The String containing the URL or filename of the QJML or QIML schema to be parsed.

### uniqueParse

    public static QDoc uniqueParse(QDoc schema,
                                   String url)
                            throws IOException,
                                   SAXException

  Create a unique QDoc object which holds the object tree build from the XML document referenced by a URL.
  Parameters:
    `schema` - The schema for the object tree to be built.
    `url` - The String containing the URL or filename of the document to be parsed.

### uniqueParse

    public static QDoc uniqueParse(QDoc schema,
                                   InputSource is,
                                   String url)
                            throws IOException,
                                   SAXException

  Create a unique QDoc object which holds the object tree build from the XML document referenced by a URL.
  Parameters:
    `schema` - The schema for the object tree to be built.
    `is` - An InputSource object specifying the document to be parsed.
    `url` - The String containing the unique name of the document to be parsed.

### parse

    public static QDoc parse(QDoc schema,
                             String url)
                      throws IOException,
                             SAXException

  Create a QDoc object which holds the object tree build from the XML document referenced by a URL.
  Parameters:
    `schema` - The schema for the object tree to be built.
    `url` - The String containing the URL or filename of the document to be parsed.

### parse

    public static QDoc parse(QDoc schema,
                             InputSource is)
                      throws IOException,
                             SAXException

  Create a QDoc object which holds the object tree build from the XML document specified by a SAX InputSource object.
  Parameters:
    `schema` - The schema for the object tree to be built.
    `is` - An InputSource object specifying the document to be parsed.

### parseString

    public static QDoc parseString(QDoc schema,
                                   String document)
                            throws IOException,
                                   SAXException

  Create a QDoc object which holds the object tree build from the XML document held in a String.
  Parameters:
    `schema` - The schema for the object tree to be built.
    `document` - The String containing the XML document to be parsed.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD