public class DefaultMolecularStructureDocument extends AbstractPluginDocument implements MolecularStructureDocument
PluginDocument.ReferencedDocumentsAlwaysLoaded, PluginDocument.ReferencedDocumentsNotLoaded, PluginDocument.SizeRequiredToLoadIntoMemoryProviderXMLSerializable.OldVersionCompatible, XMLSerializable.VersionSupportType| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAXIMUM_HTML_TEXT_LENGTH
the maximum length of the
getStructure() text returned from toHTML() |
FILE_DATA_ATTRIBUTE_NAME, MAXIMUM_HTML_LENGTH, MODIFIED_DATE_FIELDROOT_ELEMENT_NAME| Constructor and Description |
|---|
DefaultMolecularStructureDocument() |
| Modifier and Type | Method and Description |
|---|---|
String |
getDescription()
A human readable single line of text describing this document,
to appear in the description field in the document table.
|
List<DocumentField> |
getDisplayableFields()
A list of columns for display in the main document panel.
|
String |
getName()
A short name (preferably one or two words) for the document.
|
String |
getStructure()
A string representing the molecule structure.
|
void |
setDefaultValues(String defaultName,
Date defaultDate,
String data)
Save internally name, creation date and contents.
|
String |
toHTML()
Provide a textual view of document.
|
addDisplayableField, addReferencedDocumentUrn, clearReferencedDocumentUrns, createFromBaseElement, fromXML, getBaseElement, getBaseElementString, getCreationDate, getFieldValue, getFieldValueCodes, getReferencedDocumentUrns, getURN, getVersionSupport, hasProperties, setBaseElement, setCreated, setFieldValue, setFieldValue, setFieldValues, setURN, toXML, toXMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCreationDate, getFieldValue, getURNfromXML, toXMLprotected static final int MAXIMUM_HTML_TEXT_LENGTH
getStructure() text returned from toHTML()public void setDefaultValues(String defaultName, Date defaultDate, String data)
defaultName - document namedefaultDate - creation datedata - contents in various formatspublic List<DocumentField> getDisplayableFields()
PluginDocumentPluginDocument.getFieldValue(String).
Each column is specified by a Field. The fields should be obtained from a call to the appropriate
Field.createXXXXField, where XXXX is the appropriate type.
While it is not required, it is recommended that a PluginDocument
handle returning a complete list of its displayable fields before
the document has been properly constructed via a call to XMLSerializable.fromXML(org.jdom.Element)
The returned list need not and should not be modifiable.getDisplayableFields in interface PluginDocumentgetDisplayableFields in class AbstractPluginDocumentpublic String getDescription()
PluginDocumentgetDescription in interface PluginDocumentpublic String getName()
PluginDocumentAnnotatedPluginDocument then this method
will be overridden and delegate back to AnnotatedPluginDocument.getName(). One way to look at it is
that when you call PluginDocument.getName() you will get the current name of the document. If you are implementing PluginDocument.getName() then you are
returning the default name for the document.getName in interface PluginDocumentpublic String toHTML()
PluginDocument<html>toHTML in interface PluginDocumentpublic String getStructure()
MolecularStructureDocumentgetStructure in interface MolecularStructureDocument