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
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.