|
Elexis API documentation as of September 4 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.text.model.SimpleStructuredDocument
public class SimpleStructuredDocument
SimpleStructuredText is an XML format to define structured texts. To simplify interpretation for different readers with different capabilities, text and structure are strictly separated.
Field Summary | |
---|---|
static java.lang.String |
ELEM_RECORD
|
static java.lang.String |
ELEM_ROOT
|
static java.lang.String |
ELEM_TEXT
|
static java.lang.String |
GENERATOR
|
static Namespace |
ns
|
static Namespace |
nsschema
|
static Namespace |
nsxsi
|
static java.lang.String |
VERSION
|
Constructor Summary | |
---|---|
SimpleStructuredDocument()
|
Method Summary | |
---|---|
void |
addRange(SSDRange r)
|
java.lang.String |
getPlaintext()
|
java.util.List<SSDRange> |
getRanges()
|
void |
insertText(java.lang.String ins,
int pos)
Insert some text |
void |
loadText(java.lang.String input,
boolean bAppend)
Parse an input String. |
java.lang.String |
remove(int pos,
int len)
remove some text |
java.lang.String |
toXML(boolean bCreateHeader)
Convert the contents to a SimpleStructuredDocument file. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final java.lang.String GENERATOR
public static final java.lang.String ELEM_ROOT
public static final java.lang.String ELEM_TEXT
public static final java.lang.String ELEM_RECORD
public static final Namespace ns
public static final Namespace nsxsi
public static final Namespace nsschema
Constructor Detail |
---|
public SimpleStructuredDocument()
Method Detail |
---|
public void loadText(java.lang.String input, boolean bAppend) throws ElexisException
input
- bAppend
- if true, new input will appended. If false, current contents will be erased first.
ElexisException
- if an XML input could not be parsedpublic java.lang.String getPlaintext()
public java.lang.String toXML(boolean bCreateHeader)
bCreateHeader
- if false, a representation without header information is created
public void insertText(java.lang.String ins, int pos)
ins
- the text to insertpos
- start position for insert. If pos is larger than text length, it will be appended
at the end. ig pos is negative, nothing will be inserted. If ins is null, nothing
will be inserted.public java.lang.String remove(int pos, int len)
pos
- position from which to removelen
- length of text to remove
public void addRange(SSDRange r)
public java.util.List<SSDRange> getRanges()
|
Elexis API documentation as of September 4 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |