org.jopendocument.dom
Enum ODPackage.RootElement

java.lang.Object
  extended by java.lang.Enum<ODPackage.RootElement>
      extended by org.jopendocument.dom.ODPackage.RootElement
All Implemented Interfaces:
Serializable, Comparable<ODPackage.RootElement>
Enclosing class:
ODPackage

public static enum ODPackage.RootElement
extends Enum<ODPackage.RootElement>

Root element of an OpenDocument document. See section 22.2.1 of v1.2-part1-cd04.

Author:
Sylvain CUAZ

Enum Constant Summary
CONTENT
          Document content and automatic styles used in the content, see 3.1.3.2
META
          Document metadata elements, see 3.1.3.4
SETTINGS
          Implementation-specific settings, see 3.1.3.5
SINGLE_CONTENT
          Contains the entire document, see 3.1.2 of OpenDocument-v1.2-part1-cd04
STYLES
          Styles used in document content and automatic styles used in styles, see 3.1.3.3
 
Method Summary
 org.jdom.DocType createDocType(XMLVersion version)
           
 org.jdom.Document createDocument(XMLFormatVersion fv)
           
static ODPackage.RootElement fromDocument(org.jdom.Document doc)
           
static ODPackage.RootElement fromElementName(String name)
           
 String getElementName()
           
 String getElementNSPrefix()
           
static EnumSet<ODPackage.RootElement> getPackageElements()
           
 String getZipEntry()
          The name of the zip entry in the package.
static ODPackage.RootElement valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ODPackage.RootElement[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SINGLE_CONTENT

public static final ODPackage.RootElement SINGLE_CONTENT
Contains the entire document, see 3.1.2 of OpenDocument-v1.2-part1-cd04


CONTENT

public static final ODPackage.RootElement CONTENT
Document content and automatic styles used in the content, see 3.1.3.2


STYLES

public static final ODPackage.RootElement STYLES
Styles used in document content and automatic styles used in styles, see 3.1.3.3


META

public static final ODPackage.RootElement META
Document metadata elements, see 3.1.3.4


SETTINGS

public static final ODPackage.RootElement SETTINGS
Implementation-specific settings, see 3.1.3.5

Method Detail

values

public static ODPackage.RootElement[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ODPackage.RootElement c : ODPackage.RootElement.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ODPackage.RootElement valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getPackageElements

public static final EnumSet<ODPackage.RootElement> getPackageElements()

fromDocument

public static final ODPackage.RootElement fromDocument(org.jdom.Document doc)

fromElementName

public static final ODPackage.RootElement fromElementName(String name)

getElementNSPrefix

public final String getElementNSPrefix()

getElementName

public final String getElementName()

createDocument

public final org.jdom.Document createDocument(XMLFormatVersion fv)

createDocType

public final org.jdom.DocType createDocType(XMLVersion version)

getZipEntry

public final String getZipEntry()
The name of the zip entry in the package.

Returns:
the path of the file, null if this element shouldn't be in a package.


Copyright © 2010 jOpenDocument All Rights Reserved.