JXTA

net.jxta.document
Interface StructuredDocument<E extends Element<E>>

All Superinterfaces:
Document, DocumentStreamIO, Element<E>
All Known Subinterfaces:
StructuredTextDocument<T>, XMLDocument<X>

public interface StructuredDocument<E extends Element<E>>
extends Document, Element<E>

An extension of Document which allows the content of a document to be specified by a hierarchy of elements. This allows the content of many document types to be manipulated in an abstract way without regard to the physical representation of the documents.

StructuredDocuments are one of the elementary components that is manipulated by the JXTA core. StructuredDocuments are used to represent most core objects such as peer, peergroup or pipe advertisements.

See Also:
Document, StructuredTextDocument, StructuredDocumentFactory

Method Summary
 E createElement(Object key)
          Create a new element without value.
 E createElement(Object key, Object value)
          Create a new element with value.
 
Methods inherited from interface net.jxta.document.Document
getFileExtension, getMimeType
 
Methods inherited from interface net.jxta.document.DocumentStreamIO
getStream, sendToStream
 
Methods inherited from interface net.jxta.document.Element
appendChild, getChildren, getChildren, getKey, getParent, getRoot, getValue
 

Method Detail

createElement

E createElement(Object key)
Create a new element without value.

Parameters:
key - The key of the element to be created.
Returns:
The new element.

createElement

E createElement(Object key,
                Object value)
Create a new element with value.

Parameters:
key - The name of the element to be created.
value - The value of the element to be created or null if no value is desired.
Returns:
The new element.

JXSE