|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDocumentWriter
public class DocumentWriter
This is the thing that writes documents.
This will create valid XML documents, given an object and a schema.
modules/library/xml (gt-xml.jar)
Field Summary | |
---|---|
static String |
BASE_ELEMENT
Element or String ... include a ref to an Element to be used, or a string representing the name of the element |
static String |
ENCODING
The Encoding which should be used for the Document which should be created. |
static Logger |
logger
DOCUMENT ME! |
static String |
SCHEMA_LOCATION_HINT
a map of URI->URI representing targetNamespace->Location |
static String |
SCHEMA_ORDER
Schema[] or String[]... |
static String |
USE_NEAREST
boolean ... include the key to use the "nearest" strategy for searching schemas. |
static String |
WRITE_SCHEMA
Writer ... include the key to represent true when writing to files, include a Writer to write to otherwise. |
Constructor Summary | |
---|---|
DocumentWriter()
|
Method Summary | |
---|---|
static void |
setLevel(Level l)
Sets the logger level |
static void |
writeDocument(Object value,
Schema schema,
File f,
Map hints)
Write value to file using provided schema. |
static void |
writeDocument(Object value,
Schema schema,
Writer w,
Map hints)
Entry Point to Document writer. |
static void |
writeFragment(Object value,
Schema schema,
File f,
Map hints)
Write value to file using provided schema. |
static void |
writeFragment(Object value,
Schema schema,
Writer w,
Map hints)
Entry Point to Document writer. |
static void |
writeSchema(Schema schema,
Writer w,
Map hints)
DOCUMENT ME! |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Logger logger
public static final String WRITE_SCHEMA
public static final String BASE_ELEMENT
public static final String SCHEMA_ORDER
public static final String ENCODING
public static final String USE_NEAREST
public static final String SCHEMA_LOCATION_HINT
Constructor Detail |
---|
public DocumentWriter()
Method Detail |
---|
public static void setLevel(Level l)
l
- Levelpublic static void writeDocument(Object value, Schema schema, File f, Map hints) throws OperationNotSupportedException, IOException
Hints:
value
- schema
- f
- hints
-
OperationNotSupportedException
IOException
public static void writeDocument(Object value, Schema schema, Writer w, Map hints) throws OperationNotSupportedException, IOException
Hints:
value
- schema
- w
- hints
- optional hints for writing
OperationNotSupportedException
IOException
public static void writeFragment(Object value, Schema schema, File f, Map hints) throws OperationNotSupportedException, IOException
Hints:
value
- schema
- f
- hints
-
OperationNotSupportedException
IOException
public static void writeFragment(Object value, Schema schema, Writer w, Map hints) throws OperationNotSupportedException, IOException
Hints:
value
- schema
- w
- hints
- optional hints for writing
OperationNotSupportedException
IOException
public static void writeSchema(Schema schema, Writer w, Map hints) throws IOException
schema
- DOCUMENT ME!w
- DOCUMENT ME!hints
- DOCUMENT ME!
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |