com.levigo.jadice.document.metadata
Interface Metadata

All Superinterfaces:
NamespaceContext
All Known Subinterfaces:
MetadataNamespaceContext

public interface Metadata
extends NamespaceContext


Field Summary
static String DEFAULT_NAMESPACE
           
 
Method Summary
 MetadataNamespaceContext createNamespaceContext()
          Create a facade which allows a new mapping of namespace prefixes to be used to navigate and query nodes without changing the base document.
 MetadataNode getRoot()
           
 Metadata normalize()
          Normalize the meta-data XML.
 Document toDocument()
          Return the DOM Document representation of the metadata-tree to which this node belongs.
 Result toResult()
          Return the Result representation of this document.
 Metadata toResult(Result out)
          Transform this document into the given result.
 Metadata toResult(Result out, String encoding)
          Transform this document into the given result.
 Result toResult(String encoding)
          Return the Result representation of this document using the given encoding.
 Source toSource()
           
 String toString()
           
 String toString(String encoding)
           
 void trimWhitespace()
           
 com.levigo.jadice.document.internal.metadata.ValidationResult validate(Source... schemas)
          Validate this document against specifief schemas
 com.levigo.jadice.document.internal.metadata.ValidationResult validate(URL... schemaLocations)
          Validate this document against specifief schemas
 Metadata writeTo(OutputStream out)
          Write this document to a stream
 Metadata writeTo(OutputStream out, String encoding)
          Write this document to a stream
 Metadata writeTo(Writer out)
          Write this document to a stream
 Metadata writeTo(Writer out, String encoding)
          Write this document to a stream
 Metadata writeTo(XMLEventWriter writer)
          Write this document to an XMLEventWriter.
 
Methods inherited from interface javax.xml.namespace.NamespaceContext
getNamespaceURI, getPrefix, getPrefixes
 

Field Detail

DEFAULT_NAMESPACE

static final String DEFAULT_NAMESPACE
See Also:
Constant Field Values
Method Detail

getRoot

MetadataNode getRoot()

toDocument

Document toDocument()
Return the DOM Document representation of the metadata-tree to which this node belongs.

Returns:
the Document

toSource

Source toSource()
Returns:
This document as Source

toString

String toString()
Overrides:
toString in class Object
Returns:
a string representation of the document in UTF-8 (Unicode)

toString

String toString(String encoding)
Parameters:
encoding - destination encoding of XML document
Returns:
a string representation of the document

writeTo

Metadata writeTo(OutputStream out)
Write this document to a stream

Parameters:
out - The output result
Returns:
this

writeTo

Metadata writeTo(OutputStream out,
                 String encoding)
Write this document to a stream

Parameters:
out - The output result
encoding - The new encoding
Returns:
this

writeTo

Metadata writeTo(Writer out)
Write this document to a stream

Parameters:
out - The output result
Returns:
this

writeTo

Metadata writeTo(Writer out,
                 String encoding)
Write this document to a stream

Parameters:
out - The output result
encoding - The new encoding
Returns:
this

writeTo

Metadata writeTo(XMLEventWriter writer)
                 throws XMLStreamException
Write this document to an XMLEventWriter.

Parameters:
writer - destination writer
Returns:
this
Throws:
XMLStreamException

validate

com.levigo.jadice.document.internal.metadata.ValidationResult validate(Source... schemas)
Validate this document against specifief schemas

Parameters:
schemas - A list of schemas
Returns:
A validation result object containing exception list occured if any

validate

com.levigo.jadice.document.internal.metadata.ValidationResult validate(URL... schemaLocations)
Validate this document against specifief schemas

Parameters:
schemaLocations - A list of schemas
Returns:
A validation result object containing exception list occured if any

toResult

Metadata toResult(Result out)
Transform this document into the given result. default encoding.

Parameters:
out - the output result
Returns:
this

toResult

Metadata toResult(Result out,
                  String encoding)
Transform this document into the given result. Use the given encoding instead of the document's default encoding.

Parameters:
out - the output result
encoding - the encoding
Returns:
this

toResult

Result toResult()
Return the Result representation of this document. Useful when using web services for example.

Returns:
a Result

toResult

Result toResult(String encoding)
Return the Result representation of this document using the given encoding. Useful when using web services for example.

Returns:
a Result

normalize

Metadata normalize()
Normalize the meta-data XML.

Returns:
this
See Also:
Document.normalizeDocument()

trimWhitespace

void trimWhitespace()

createNamespaceContext

MetadataNamespaceContext createNamespaceContext()
Create a facade which allows a new mapping of namespace prefixes to be used to navigate and query nodes without changing the base document.

Returns:
Throws:
MetadataException - If the namespace handling has been disabled on this Metadata.


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.