|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jopendocument.dom.OOXML
public abstract class OOXML
Various bits of OpenDocument XML.
get(XMLFormatVersion)
Field Summary | |
---|---|
static String |
LAST_FOR_UNKNOWN_PROP
If this system property is set to true then get(XMLFormatVersion) will
never return null , allowing to support unknown versions. |
Method Summary | |
---|---|
abstract boolean |
canValidate()
|
int |
compareTo(OOXML o)
Compare the date the specification was published. |
abstract org.jdom.Element |
createFormattingProperties(String family)
|
protected List |
encodeRT_L(String content,
Map<String,String> styles)
|
org.jdom.Element |
encodeRT(String content,
Map<String,String> styles)
Convert rich text (with [] tags) into XML. |
org.jdom.Element |
encodeWS(org.jdom.Element elem)
|
org.jdom.Element |
encodeWS(String s)
Encode a String to OO XML. |
void |
encodeWS(org.jdom.Text t)
|
List<org.jdom.Content> |
encodeWSasList(String s)
|
static OOXML |
get(org.jdom.Element root)
|
static OOXML |
get(XMLFormatVersion version)
Returns the instance that match the requested version. |
static OOXML |
get(XMLFormatVersion version,
boolean lastForUnknown)
|
BigDecimal[] |
getCoordinates(org.jdom.Element elem,
LengthUnit unit)
Return the coordinates of the top-left and bottom-right of the passed shape. |
BigDecimal[] |
getCoordinates(org.jdom.Element elem,
LengthUnit unit,
boolean horizontal,
boolean vertical)
Return the coordinates of the top-left and bottom-right of the passed shape. |
String |
getDateString()
The date the specification was published. |
static OOXML |
getDefault()
|
abstract String |
getEventListener()
|
abstract String[] |
getFontDecls()
Return the names of font face declarations. |
XMLFormatVersion |
getFormatVersion()
|
abstract String |
getFrameQName()
|
static OOXML |
getLast()
|
static OOXML |
getLast(XMLVersion version)
|
org.jdom.Element |
getLineBreak()
|
abstract String |
getOfficeEventListeners()
The name of the element where event listeners are defined. |
abstract String |
getOfficeScript()
The name of the elements where scripts are defined. |
abstract String |
getOfficeScripts()
Return the top-level script element in the content. |
abstract org.jdom.Element |
getTab()
|
abstract Validator |
getValidator(org.jdom.Document doc)
Verify that the passed document is a valid OpenOffice.org 1 or ODF document. |
XMLVersion |
getVersion()
|
static void |
setDefault(OOXML ns)
|
static List<OOXML> |
values()
Return all known instances in the order they were published. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String LAST_FOR_UNKNOWN_PROP
true
then get(XMLFormatVersion)
will
never return null
, allowing to support unknown versions.
Method Detail |
---|
public static OOXML get(XMLFormatVersion version)
version
- the version.
null
for unsupported versions.LAST_FOR_UNKNOWN_PROP
public static OOXML get(XMLFormatVersion version, boolean lastForUnknown)
public static OOXML get(org.jdom.Element root)
public static final List<OOXML> values()
compareTo(OOXML)
public static final OOXML getLast()
public static final OOXML getLast(XMLVersion version)
public static void setDefault(OOXML ns)
public static OOXML getDefault()
public final String getDateString()
public int compareTo(OOXML o)
compareTo
in interface Comparable<OOXML>
o
- the object to be compared.getDateString()
public final XMLVersion getVersion()
public final XMLFormatVersion getFormatVersion()
public abstract boolean canValidate()
public abstract Validator getValidator(org.jdom.Document doc)
doc
- the xml to test.
doc
.public abstract String[] getFontDecls()
public abstract String getOfficeScripts()
public abstract String getOfficeScript()
getOfficeScripts()
defining scripts.public abstract String getOfficeEventListeners()
getOfficeScripts()
defining event listeners.public abstract String getEventListener()
public final org.jdom.Element getLineBreak()
public abstract org.jdom.Element getTab()
public abstract String getFrameQName()
public abstract org.jdom.Element createFormattingProperties(String family)
protected final List encodeRT_L(String content, Map<String,String> styles)
public final org.jdom.Element encodeRT(String content, Map<String,String> styles)
content
- the string to convert, eg "texte [b]gras[/b]".styles
- the mapping from tagname (eg "b") to the name of the character style (eg
"Gras").
public final org.jdom.Element encodeWS(String s)
s
- a plain ole String, eg "term\tdefinition".
<text:span>term<text:tab-stop/>definition</text:span>.
public final List<org.jdom.Content> encodeWSasList(String s)
public final void encodeWS(org.jdom.Text t)
public final org.jdom.Element encodeWS(org.jdom.Element elem)
public final BigDecimal[] getCoordinates(org.jdom.Element elem, LengthUnit unit)
elem
- an XML element.unit
- the unit of the returned numbers.
null
if elem
is not a shape, numbers
themselves are never null
.public final BigDecimal[] getCoordinates(org.jdom.Element elem, LengthUnit unit, boolean horizontal, boolean vertical)
elem
- an XML element.unit
- the unit of the returned numbers.horizontal
- true
if the x coordinates should be computed,
false
meaning items 0 and 2 of the result are null
.vertical
- true
if the y coordinates should be computed, false
meaning items 1 and 3 of the result are null
.
null
if elem
is not a shape, numbers
themselves are only null
if requested with horizontal
or
vertical
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |