Class DocumentCollection

    • Constructor Detail

      • DocumentCollection

        public DocumentCollection()
    • Method Detail

      • addReferencedDocument

        public void addReferencedDocument​(AnnotatedPluginDocument document)
        Adds the given document to a list of documents to be referenced. This function should only be called during the initial construction of the DocumentCollection. The reference document will be available later via getReferencedDocuments().
        Parameters:
        document -
      • getReferencedDocuments

        public java.util.List<AnnotatedPluginDocument> getReferencedDocuments()
        Any time, either during initial construction of the DocumentCollection, or after this DocumentCollection has been reloaded from the local database, this function can be called to retrieve the list of documents previously remembered using the addReferencedDocument(AnnotatedPluginDocument) function. Note: if the user has deleted one or more of the referenced documents from their local database, then those documents still be available via this function. Documents are not really deleted (just hidden from the user) until all documents that reference it are also deleted.
        Returns:
        the list of remembered documents
      • toXML

        public org.jdom.Element toXML()
        Description copied from interface: XMLSerializable
        Convert object to a JDOM element. The representation should be complete so that XMLSerializable.fromXML(org.jdom.Element) can completely restore the object's representation.

        It is recommended that the returned element use XMLSerializable.ROOT_ELEMENT_NAME as its name, in which case it must not define an attribute called "type". In this case, fromXML, will be called with an element whose name may differ from the element return from this function. This recommendation allows a more compact representation of the XML can be stored.

        This method generally should not be called directly. Instead, you should usually call XMLSerializer.classToXML(String, XMLSerializable) which calls this method internally.

        PluginDocument implementations of this method may choose to throw an XMLSerializationException, enclosed in a RuntimeException.

        Specified by:
        toXML in interface XMLSerializable
        Overrides:
        toXML in class AbstractPluginDocument
        Returns:
        object encoded as a JDOM element
      • getName

        public java.lang.String getName()
        Description copied from interface: PluginDocument
        A short name (preferably one or two words) for the document.

        If this PluginDocument is wrapped inside an AnnotatedPluginDocument 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.

        Specified by:
        getName in interface PluginDocument
        Returns:
        document name. Cannot be null but may be an empty string.
      • getDescription

        public java.lang.String getDescription()
        Description copied from interface: PluginDocument
        A human readable single line of text describing this document, to appear in the description field in the document table.
        Specified by:
        getDescription in interface PluginDocument
        Returns:
        a one line simple text description of the document, or null if no description is available.
      • toHTML

        public java.lang.String toHTML()
        Description copied from interface: PluginDocument
        Provide a textual view of document. The contents should be at most 30K-60K characters. One reason is that this text is rendered using JTextPane, which is horrendously slow when handling large text. The more fundamental reason is that large amounts of text are generally not useful for a user. The whole idea of using a tool such as Geneious is to provide specialized viewers which make the large amount of bioinformatics data perceivable and comprehensible to a human user.

        Return an HTML body fragment (i.e. a fragment which sits inside a <body></body> tag). (Header,stylesheet and annotations are automatically added by GENEious code).

        Can optionally return an entire html tag set, as long as the first six characters are <html>

        Specified by:
        toHTML in interface PluginDocument
        Returns:
        an HTML fragment of tag set, or null to have no text view.