org.jopendocument.dom
Class Library

java.lang.Object
  extended by org.jopendocument.dom.Library
Direct Known Subclasses:
Library.EmbeddedLibrary, Library.LinkedLibrary

public abstract class Library
extends Object

A BASIC script library.

Author:
Sylvain

Nested Class Summary
static class Library.EmbeddedLibrary
           
static class Library.LinkedLibrary
           
 
Field Summary
static String DIALOG_DIR_NAME
           
static String DIALOG_LIBRARY_LIST_FILENAME
           
static String DIALOG_LIST_FILENAME
           
static String DIR_NAME
           
static String LIBRARY_LIST_FILENAME
           
static String MODULE_LIST_FILENAME
           
 
Method Summary
abstract  boolean canBeMerged(Library other)
          Whether this library can be merged with the passed one.
 boolean equals(Object obj)
           
 String getName()
           
 int hashCode()
           
 boolean isReadonly()
           
static boolean removeFromPackage(ODPackage pkg, String libName)
           
abstract  org.jdom.Element toFlatXML(XMLFormatVersion vers)
          The element to define this in a flat XML.
abstract  Map<String,org.jdom.Document> toPackageDialogDocuments(XMLFormatVersion vers)
           
abstract  Map<String,org.jdom.Document> toPackageDocuments(XMLFormatVersion vers)
          The documents to include in a package.
abstract  org.jdom.Element toPackageLibrariesElement(XMLFormatVersion vers)
          The element to include in the "script-lc.xml" entry in a package.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DIR_NAME

public static final String DIR_NAME
See Also:
Constant Field Values

DIALOG_DIR_NAME

public static final String DIALOG_DIR_NAME
See Also:
Constant Field Values

LIBRARY_LIST_FILENAME

public static final String LIBRARY_LIST_FILENAME
See Also:
Constant Field Values

MODULE_LIST_FILENAME

public static final String MODULE_LIST_FILENAME
See Also:
Constant Field Values

DIALOG_LIBRARY_LIST_FILENAME

public static final String DIALOG_LIBRARY_LIST_FILENAME
See Also:
Constant Field Values

DIALOG_LIST_FILENAME

public static final String DIALOG_LIST_FILENAME
See Also:
Constant Field Values
Method Detail

removeFromPackage

public static final boolean removeFromPackage(ODPackage pkg,
                                              String libName)

getName

public final String getName()

isReadonly

public final boolean isReadonly()

toFlatXML

public abstract org.jdom.Element toFlatXML(XMLFormatVersion vers)
The element to define this in a flat XML.

Parameters:
vers - the version of the format.
Returns:
an element totally defining this.

toPackageLibrariesElement

public abstract org.jdom.Element toPackageLibrariesElement(XMLFormatVersion vers)
The element to include in the "script-lc.xml" entry in a package.

Parameters:
vers - the version of the format.
Returns:
an element defining the properties of this.
See Also:
toPackageDocuments(XMLFormatVersion)

toPackageDocuments

public abstract Map<String,org.jdom.Document> toPackageDocuments(XMLFormatVersion vers)
The documents to include in a package.

Parameters:
vers - the version of the format.
Returns:
documents totally defining this, by file name.

toPackageDialogDocuments

public abstract Map<String,org.jdom.Document> toPackageDialogDocuments(XMLFormatVersion vers)

canBeMerged

public abstract boolean canBeMerged(Library other)
Whether this library can be merged with the passed one. The merge can happen if there's no overlap between the two, or if the content of the overlap is equal (e.g. both define the module 'foo' with the same content).

Parameters:
other - another library.
Returns:
true if this library and the other can be merged.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 jOpenDocument All Rights Reserved.