|
Project JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.document.TextElementCommon
net.jxta.impl.document.XMLElementCommon
net.jxta.impl.document.LiteXMLElement
net.jxta.impl.document.LiteXMLDocument
public class LiteXMLDocument
This class is an implementation of the StructuredDocument interface using a simplified XML implementation.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.jxta.impl.document.LiteXMLElement |
---|
LiteXMLElement.charRange, LiteXMLElement.tagRange |
Nested classes/interfaces inherited from interface net.jxta.impl.document.TextDocumentCommon |
---|
TextDocumentCommon.Utils |
Field Summary | |
---|---|
(package private) StringBuffer |
docContent
The actual document contents. |
static StructuredDocumentFactory.TextInstantiator |
INSTANTIATOR
The instantiator for instances of our documents. |
Fields inherited from class net.jxta.impl.document.LiteXMLElement |
---|
doc, loc, paranoidConsistencyChecking, parent, verboseLogging |
Constructor Summary | |
---|---|
LiteXMLDocument(MimeMediaType mimeType,
InputStream in)
Creates new LiteXMLDocument |
|
LiteXMLDocument(MimeMediaType mimeType,
Reader in)
Creates new LiteXMLDocument |
|
LiteXMLDocument(MimeMediaType mimeType,
String type)
Creates new LiteXMLDocument |
|
LiteXMLDocument(MimeMediaType mimeType,
String type,
String textValue)
Creates new LiteXMLDocument with a textValue in the root element |
Method Summary | |
---|---|
protected TextElement |
createElement(LiteXMLElement.tagRange loc)
Create a new text element as a sub-range of this document. |
Element |
createElement(Object key)
|
Element |
createElement(Object key,
Object val)
|
TextElement |
createElement(String name)
|
TextElement |
createElement(String name,
String val)
|
protected LiteXMLElement.charRange |
getDocType(StringBuffer source,
boolean wholeElement)
|
(package private) LiteXMLDocument |
getDocument()
The document we are a part of. |
String |
getFileExtension()
|
MimeMediaType |
getMimeType()
|
Reader |
getReader()
|
StructuredDocument |
getRoot()
|
InputStream |
getStream()
|
protected void |
init(Reader in)
Initialises LiteXMLDocument. |
void |
sendToStream(OutputStream stream)
|
void |
sendToWriter(Writer writer)
|
String |
toString()
A toString implementation for debugging purposes. |
Methods inherited from class net.jxta.impl.document.LiteXMLElement |
---|
addAttribute, addAttribute, addChildTags, adjustLocations, appendChild, checkConsistency, decodeEscaped, encodeEscaped, equals, getAttribute, getAttributeLoc, getAttributes, getChildren, getChildren, getName, getParent, getTagRanges, getTextValue, getTextValue, printNice |
Methods inherited from class net.jxta.impl.document.TextElementCommon |
---|
appendChild, getChildren, getKey, getValue |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getKey, getParent, getValue |
Methods inherited from interface net.jxta.document.TextElement |
---|
appendChild, getChildren, getName, getTextValue |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getKey, getParent, getValue |
Methods inherited from interface net.jxta.document.TextElement |
---|
appendChild, getChildren, getName, getTextValue |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getKey, getParent, getValue |
Methods inherited from interface net.jxta.document.Attributable |
---|
addAttribute, addAttribute, getAttribute, getAttributes |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getKey, getParent, getValue |
Methods inherited from interface net.jxta.document.TextElement |
---|
appendChild, getChildren, getName, getTextValue |
Methods inherited from interface net.jxta.document.Element |
---|
appendChild, getChildren, getChildren, getKey, getParent, getValue |
Field Detail |
---|
public static final StructuredDocumentFactory.TextInstantiator INSTANTIATOR
final StringBuffer docContent
Constructor Detail |
---|
LiteXMLDocument(MimeMediaType mimeType, String type)
LiteXMLDocument(MimeMediaType mimeType, String type, String textValue)
LiteXMLDocument(MimeMediaType mimeType, InputStream in) throws IOException
IOException
LiteXMLDocument(MimeMediaType mimeType, Reader in) throws IOException
IOException
Method Detail |
---|
public String toString()
toString
in interface TextDocument
toString
in class LiteXMLElement
public MimeMediaType getMimeType()
getMimeType
in interface Document
public String getFileExtension()
getFileExtension
in interface Document
public Element createElement(Object key)
createElement
in interface StructuredDocument
public Element createElement(Object key, Object val)
createElement
in interface StructuredDocument
public TextElement createElement(String name)
createElement
in interface StructuredTextDocument
public TextElement createElement(String name, String val)
createElement
in interface StructuredTextDocument
protected TextElement createElement(LiteXMLElement.tagRange loc)
loc
- The document range for the new element.
public Reader getReader()
getReader
in interface TextDocument
public StructuredDocument getRoot()
getRoot
in interface Element
getRoot
in class LiteXMLElement
public InputStream getStream() throws IOException
getStream
in interface Document
IOException
public void sendToWriter(Writer writer) throws IOException
sendToWriter
in interface TextDocument
IOException
public void sendToStream(OutputStream stream) throws IOException
sendToStream
in interface Document
IOException
protected void init(Reader in) throws IOException
IOException
protected LiteXMLElement.charRange getDocType(StringBuffer source, boolean wholeElement)
LiteXMLDocument getDocument()
getDocument
in class LiteXMLElement
|
JXTA J2SE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |