Class OpenDocumentBean

  • All Implemented Interfaces:
    java.io.Serializable

    public class OpenDocumentBean
    extends java.lang.Object
    implements java.io.Serializable
    Bean holding information for a viewer-popup.
    See Also:
    Serialized Form
    • Field Detail

      • ANNOTATION_COUNT

        public static final java.lang.String ANNOTATION_COUNT
        Property annotationCount in OpenDocumentBean. Used to remember the number of annotations for editing.
        See Also:
        Constant Field Values
      • DOCUMENT_FORMAT

        public static final java.lang.String DOCUMENT_FORMAT
        Property used to memorize the document's formats.
        See Also:
        Constant Field Values
      • VIRTUAL_VIEWER_ERROR

        public static final java.lang.String VIRTUAL_VIEWER_ERROR
        Property used to signal an error.
        See Also:
        Constant Field Values
      • DOCUMENT_ROTATE_ANGLE

        public static final java.lang.String DOCUMENT_ROTATE_ANGLE
        Property used to store the angle the document was rotated.
        See Also:
        Constant Field Values
      • ANNOTATIONS_INI

        public static final java.lang.String ANNOTATIONS_INI
        Property used to store the annotations of the current element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OpenDocumentBean

        public OpenDocumentBean​(DocumentId documentId,
                                boolean currentRevision,
                                boolean editMode,
                                java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList,
                                java.io.InputStream pageStream)
        Instantiates a new open document bean.
        Parameters:
        documentId - the document id
        currentRevision - resolve current revision or not when displaying the document
        editMode - edit mode of viewer enabled or disabled
        elementList - the list of structure-elements of the document
        pageStream - stream containing the content of the page file or null if not available
      • OpenDocumentBean

        public OpenDocumentBean​(DocumentId documentId,
                                boolean currentRevision,
                                boolean editMode,
                                ResultSetViewImpl view,
                                java.util.List<DocumentArchiveMetaInfo.ElementArchiveMetaInfo> elementList,
                                java.io.InputStream pageStream)
        Instantiates a new open document bean.
        Parameters:
        documentId - the document id
        currentRevision - resolve current revision or not when displaying the document
        editMode - edit mode of viewer enabled or disabled
        view - the result set view
        elementList - the list of structure-elements of the document
        pageStream - stream containing the content of the page file or null if not available
    • Method Detail

      • getDocumentId

        public DocumentId getDocumentId()
        Gets the document id.
        Returns:
        the document id
      • setDocumentId

        public void setDocumentId​(DocumentId id)
        Sets the document id.
        Parameters:
        id - the new document id
      • isCurrentRevision

        public boolean isCurrentRevision()
        Checks if current revision is set.
        Returns:
        true, if current revision is set
      • setCurrentRevision

        public void setCurrentRevision​(boolean currentRevision)
        Sets the currentRevision flag.
        Parameters:
        currentRevision - true or false
      • isEditMode

        public boolean isEditMode()
        Checks if edit mode is set.
        Returns:
        true, if edit mode is set
      • setEditMode

        public void setEditMode​(boolean editMode)
        Sets the edit mode.
        Parameters:
        editMode - the new edit mode
      • getFirstFilename

        public java.lang.String getFirstFilename()
        Gets the filename of the first element that is not a chunk or a structure-element.
        Returns:
        filename or empty string if not available
      • getFirstElementNumber

        public int getFirstElementNumber()
        Returns:
        the number of the first element that is not a chunk or a structure-element.
      • getCurrentFilename

        public java.lang.String getCurrentFilename()
        Gets the current filename.
        Returns:
        the current filename
      • getCurrentElement

        public int getCurrentElement()
        Gets the current element.
        Returns:
        the current element
      • setCurrentElement

        public void setCurrentElement​(int element)
        Sets the current element.
        Parameters:
        element - the new current element
      • setTemporaryDocumentId

        public void setTemporaryDocumentId​(TemporaryDocumentId tempDocId)
      • isTemporary

        public boolean isTemporary()
      • addProperty

        public void addProperty​(java.lang.String key,
                                java.lang.Object value)
        Adds the property.
        Parameters:
        key - the key
        value - the value
      • removeProperty

        public java.lang.Object removeProperty​(java.lang.String key)
        Removes the property.
        Parameters:
        key - the key
        Returns:
        the propertie's value
      • getProperty

        public java.lang.Object getProperty​(java.lang.String key)
        Gets the property.
        Parameters:
        key - the key
        Returns:
        the property
      • hasProperty

        public boolean hasProperty​(java.lang.String key)
        Checks for property.
        Parameters:
        key - the key
        Returns:
        true, if successful
      • getPageList

        public PageList getPageList()
        Reads the page list for this document.
        Returns:
        The page list object or null, if no page list exists
      • getSearchList

        public final java.util.Map<java.lang.String,​int[]> getSearchList()
        Reads the search index list.
        Returns:
        Search index list
      • setSearchList

        public final void setSearchList​(java.util.Map<java.lang.String,​int[]> searchList)
        Sets the search index list.
        Parameters:
        searchList - Search index list
      • isDocumentUpdated

        public boolean isDocumentUpdated()
        Returns:
        true if the document was updated.
      • setDocumentUpdated

        public void setDocumentUpdated​(boolean documentUpdated)
        Parameters:
        documentUpdated - whether the document was updated or not
      • isDocumentRendered

        public boolean isDocumentRendered()
        Returns:
        true if the document was rendered from renderengine.
      • setDocumentRendered

        public void setDocumentRendered​(boolean documentRendered)
        Parameters:
        documentRendered - whether the document was rendered from renderengine or not.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object