Class DataView

    • Constructor Detail

      • DataView

        protected DataView​(String type,
                           String pid,
                           String ref)
        Constructor.
        Parameters:
        type - the MIME type of this DataView
        pid - a persistent identifier or null
        ref - a reference URI or null
        Throws:
        NullPointerException - if a mandatory argument was not supplied
    • Method Detail

      • getMimeType

        public String getMimeType()
        Get the MIME type of this DataView.
        Returns:
        the MIME type of this DataView
      • isMimeType

        public boolean isMimeType​(String type)
        Convenience method to check if this DataView is of a certain MIME type.
        Parameters:
        type - the MIME type to test against
        Returns:
        true if the DataView is in the supplied MIME type, false otherwise
        Throws:
        NullPointerException - if any required arguments are not supplied
      • getPid

        public String getPid()
        Get the persistent identifier for this DataView.
        Returns:
        a persistent identifier or null of this DataView has none
      • getRef

        public String getRef()
        Get the reference URI for this DataView.
        Returns:
        a reference URI or null of this DataView has none