Class RepInfo

  • All Implemented Interfaces:
    Cloneable

    public class RepInfo
    extends Object
    implements Cloneable
    This class encapsulates representation information, as defined by ISO/IEC 14721, about a content stream.
    See Also:
    ISO/IEC 14721 (PDF)
    • Constructor Detail

      • RepInfo

        public RepInfo​(String uri)
        Creates a RepInfo with a URI reference
        Parameters:
        uri - Object file pathname or URI
      • RepInfo

        public RepInfo​(String uri,
                       RepInfo external)
        Creates a RepInfo with a URI reference and an external RepInfo. By default, urlFlag is false.
        Parameters:
        uri - Object file pathname or URI
        external - External representation information
    • Method Detail

      • clone

        public Object clone()
        Clones the RepInfo one level deep, making fresh copies of the checksum, message, profile, signature match, and property fields. The external RepInfo (if any) is not cloned, but is attached directly to the clone.
        Overrides:
        clone in class Object
      • copy

        public void copy​(RepInfo info)
        Copies all the information out of the parameter object. This is a "shallow" copy; it is assumed that the parameter object is a temporary one that will not be further modified.
      • getChecksum

        public List<Checksum> getChecksum()
        Returns this object's list of Checksums
      • getCreated

        public Date getCreated()
        Returns the creation date stored in this object. A creation date is not automatically generated, but must be explicitly stored.
      • getFormat

        public String getFormat()
        Return the format identifier
      • getLastModified

        public Date getLastModified()
        Returns the last modified date stored in this object. A date is not automatically generated, but must be explicitly stored.
      • getMessage

        public List<Message> getMessage()
        Returns the message list stored in this object
      • getMimeType

        public String getMimeType()
        Returns the MIME type string stored in this object
      • getModule

        public Module getModule()
        Return the module.
      • getProfile

        public List<String> getProfile()
        Returns the list of profiles (Strings) stored in this object
      • getProperty

        public Map<String,​Property> getProperty()
        Returns the Property map stored in this object. The Property map contains key-value pairs whose key is a String and whose value is a Property.
      • getProperty

        public Property getProperty​(String name)
        Returns a named Property from the Property map
        Parameters:
        name - The name of the Property.
      • getSize

        public long getSize()
        Returns the size property stored in this object.
      • getUri

        public String getUri()
        Returns the URI property stored in this object.
      • getURLFlag

        public boolean getURLFlag()
        Returns a flag which, if true, indicates the object is a URL.
      • isConsistent

        public boolean isConsistent()
        Returns the value of the consistency flag.
      • getWellFormed

        public int getWellFormed()
        Returns the value of the well-formed flag. Can return TRUE, FALSE, or UNDETERMINED.
      • getValid

        public int getValid()
        Returns the value of the validity flag. Can return TRUE, FALSE, or UNDETERMINED.
      • getVersion

        public String getVersion()
        Returns the version property stored in this object
      • getNote

        public String getNote()
        Returns the note property stored in this object
      • getSigMatch

        public List<String> getSigMatch()
        Returns the list of matching signatures. JhoveBase will make this value persistent across module invocations for a given document, so the list returned will reflect all modules that have looked at the document so far.
      • getByName

        public Property getByName​(String name)
        Return property by name, regardless of its position in the property hierarchy.
        Parameters:
        name - Property name
        Returns:
        Named property (or null)
      • setChecksum

        public void setChecksum​(Checksum checksum)
        Append a Checksum object to the checksum list.
      • setConsistent

        public void setConsistent​(boolean consistent)
        Set the value of the consistency flag
      • setCreated

        public void setCreated​(Date created)
        Set the creation date
      • setFormat

        public void setFormat​(String format)
        Set the format identifier
      • setLastModified

        public void setLastModified​(Date lastModified)
        Set the last modified date
      • setMessage

        public void setMessage​(Message message)
        Append a Message object to the message list
      • setMimeType

        public void setMimeType​(String mimeType)
        Set the MIME type string
      • setModule

        public void setModule​(Module module)
        Add the module.
      • setProfile

        public void setProfile​(String profile)
        Append a profile String to the profile list
      • setProperty

        public void setProperty​(Property property)
        Add a Property to the property map. The name of the Property becomes its key in the map.
      • setSize

        public void setSize​(long size)
        Set the size property
      • setURLFlag

        public void setURLFlag​(boolean flag)
        Set the flag to indicate whether this is a URL (true) or a file (false)
      • setWellFormed

        public void setWellFormed​(boolean wellFormed)
        Set the well-formed flag
        Parameters:
        wellFormed - Boolean argument that maps to an integer value: true maps to TRUE, and false to FALSE.
      • setWellFormed

        public void setWellFormed​(int wellFormed)
        Set the wellFormed flag. Setting wellFormed to false forces the consistent and valid flags to be false as well.
      • setValid

        public void setValid​(boolean valid)
        Set the validity flag
        Parameters:
        valid - Boolean argument that maps to an integer value: true maps to TRUE, and false to FALSE.
      • setValid

        public void setValid​(int valid)
        Set the validity flag
        Parameters:
        valid - Permitted values are TRUE, FALSE, AND UNDETERMINED. The effect of using other values is undefined.
      • setVersion

        public void setVersion​(String version)
        Set the version string
      • setNote

        public void setNote​(String note)
        Set the note string
      • setSigMatch

        public void setSigMatch​(String modname)
        Adds the name of a module, signifying that the document signature matched the module's requirements. JhoveBase will make this value persistent across module invocations for a given document.
      • setSigMatch

        public void setSigMatch​(List<String> modnames)
        Adds a list of module names, signifying that the document signature matched the module's requirements. Any previous list is lost. JhoveBase will make this value persistent across module invocations for a given document.
      • show

        public void show​(OutputHandler handler)
        Output the information in this object. The format and destination of the output are determined by the OutputHandler.