Class AnnotationLayer


  • public class AnnotationLayer
    extends java.lang.Object
    This class represents an annotation layer on a document.
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationLayer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getData()
      Get the contents of this annotation layer.
      java.lang.String getDocumentId()
      Returns the key of the document to which this annotation layer belongs.
      java.lang.String getLayerName()
      Returns the name/key of this annotation layer.
      java.lang.String getLayerObjectId()  
      int getPageSpecificIndex()
      -1 indicates that the annotations are not page-specific.
      java.util.Map getProperties()
      The properties map contains additional properties for this Annotation Layer.
      boolean isModified()
      Whether this annotation has been modified since it was last saved.
      boolean isNew()
      Whether this annotation has been saved before.
      void setData​(byte[] data)
      Sets the contents of this annotation layer.
      void setDocumentId​(java.lang.String documentId)
      Sets the document key of this annotation layer.
      void setLayerName​(java.lang.String layerId)
      Sets the name/key of this annotation layer.
      void setLayerObjectId​(java.lang.String layerObjectId)  
      void setModified​(boolean isModified)
      Set whether this annotation has been modified.
      void setNew​(boolean pNew)
      Set whether this annotation is new.
      void setPageSpecificIndex​(int psIndex)
      Set the specific page index for this annotation.
      void setProperties​(java.util.Map properties)
      Set the properties map for this annotation layer.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PROPERTIES_KEY_REDACTION_FLAG

        public static final java.lang.Object PROPERTIES_KEY_REDACTION_FLAG
        Key for redaction flag in the annotation properties map. Expected value type is Boolean.
      • PROPERTIES_KEY_PERMISSION_LEVEL

        public static final java.lang.Object PROPERTIES_KEY_PERMISSION_LEVEL
        Key for annotation permission level in annotation properties map. Expected values can be seen in the properties of PermissionLevel.
    • Constructor Detail

      • AnnotationLayer

        public AnnotationLayer()
    • Method Detail

      • getPageSpecificIndex

        public int getPageSpecificIndex()
        -1 indicates that the annotations are not page-specific. A positive value indicates that the annotations are only for that page index.
        Returns:
        page index for this annotation; -1 if annotation is not page-specific.
      • setPageSpecificIndex

        public void setPageSpecificIndex​(int psIndex)
        Set the specific page index for this annotation. The default of -1 means this annotation layer can contain annotations for all pages.
        Parameters:
        psIndex - specific page index
      • getData

        public byte[] getData()
        Get the contents of this annotation layer.
        Returns:
        the contents of this annotation layer as a byte array.
      • setData

        public void setData​(byte[] data)
        Sets the contents of this annotation layer.
        Parameters:
        data - The data to set.
      • getDocumentId

        public java.lang.String getDocumentId()
        Returns the key of the document to which this annotation layer belongs.
        Returns:
        Returns the documentId.
      • setDocumentId

        public void setDocumentId​(java.lang.String documentId)
        Sets the document key of this annotation layer.
        Parameters:
        documentId - The document key to set.
      • getLayerName

        public java.lang.String getLayerName()
        Returns the name/key of this annotation layer.
        Returns:
        Returns the layerId.
      • setLayerName

        public void setLayerName​(java.lang.String layerId)
        Sets the name/key of this annotation layer.
        Parameters:
        layerId - The annotation layer key to set.
      • isNew

        public boolean isNew()
        Whether this annotation has been saved before.
        Returns:
        whether this annotation has been saved before
      • setNew

        public void setNew​(boolean pNew)
        Set whether this annotation is new.
        Parameters:
        pNew - whether annotation is new
      • getLayerObjectId

        public java.lang.String getLayerObjectId()
        Returns:
        Returns the layerObjectId.
      • setLayerObjectId

        public void setLayerObjectId​(java.lang.String layerObjectId)
        Parameters:
        layerObjectId - The layerObjectId to set.
      • getProperties

        public java.util.Map getProperties()

        The properties map contains additional properties for this Annotation Layer. The information in the map may contain data according to the following keys:

        Key: PROPERTIES_KEY_REDACTION_FLAG
        Value: Boolean true or false depending on if this is a redaction layer.

        Key: PROPERTIES_KEY_PERMISSION_LEVEL
        Value: One of the values from the PermissionLevel class.

        Returns:
        a map with the properties of this annotation layer
      • setProperties

        public void setProperties​(java.util.Map properties)
        Set the properties map for this annotation layer.
        Parameters:
        properties - map of String to custom property value
      • isModified

        public boolean isModified()
        Whether this annotation has been modified since it was last saved.
        Returns:
        Whether this annotation has been modified
      • setModified

        public void setModified​(boolean isModified)
        Set whether this annotation has been modified.
        Parameters:
        isModified - whether annotation has been modified