Class MetaData


  • public class MetaData
    extends Object
    Metadata embedded in a media, whatever its type or format. It wraps the Tika Metadata to both provide unified access to a metadata property that can have a different name according to type of the format of the media, and to avoid Tika property name or namespace evolution in the time.
    • Method Detail

      • getValue

        public String getValue​(String name)
        Gets the value of the specified property name.
        Parameters:
        name - the name of a metadata property.
        Returns:
        the value of the property.
      • getAvailablePropertyNames

        public List<String> getAvailablePropertyNames()
        Gets all name of all the properties in this metadata instance.
        Returns:
        a list of property names.
      • getTitle

        public String getTitle()
        Gets the title as set in the media's metadata.
        Returns:
        the title the media related by this metadata
      • getSubject

        public String getSubject()
        Gets the subject as set in the media's metadata. Because the subject can be covered by a property that differs from a media format to another one, this property is seeked for each of them. And because the property in which the subject is set can also refer others values than the subject itself, the subject is figured out from the values of such a property.
        Returns:
        the subject of the media related by this metadata.
      • getAuthor

        public String getAuthor()
        Gets the initial author, id est the creator, of the media as set in the media's metadata. The author can be a person, an organisation or a service.
        Returns:
        the name of the author of the media related by this metadata.
      • getLastAuthor

        public String getLastAuthor()
        Gets the last author (the more recent one), id est the last modifier, of the media as set in the media's metadata. The author can be a person, an organisation or a service.
        Returns:
        the name of the more recent author of the media related by this metadata.
      • getComments

        public String getComments()
        Gets any comments set in the media's metadata.
        Returns:
        the comment on the media related by this metadata.
      • getKeywords

        public String[] getKeywords()
        Gets the keywords as set in the media's metadata. This property is supported only for office documents.
        Returns:
        an array of keywords qualifying the office document related by this metadata.
      • getSilverId

        public String getSilverId()
        Gets the Silverpeas identifier of the media related by this metadata.
        Returns:
        the silverpeas identifier.
      • getSilverName

        public String getSilverName()
        Gets the name of the media in Silverpeas. The name of the media itself can differ from the name set in Silverpeas by a user for the media related by this metadata.
        Returns:
        the name of the media related by this metadata as set by the user in Silverpeas.
      • getLastSaveDateTime

        public Date getLastSaveDateTime()
        Gets the date at which the media related by this metadata has been lastly saved.
        Returns:
        the date of the last modification of the media related by this metadata.
      • getCreationDate

        public Date getCreationDate()
        Gets the date at which the media related by this metadata has been created.
        Returns:
        the date of the creation of the media related by this metadata.
      • getDefinition

        public Definition getDefinition()
        Gets the definition of the media related by this metadata. Only images and videos are supported by this metadata property.
        Returns:
        the image or video definition (id est the width x height of the picture or frame)
      • getFramerate

        public BigDecimal getFramerate()
        Gets the frame rate of the media related by this metadata. Only videos are supported by this metadata property.
        Returns:
        the frame rate of the video (id est the number of frames per second)
      • getDuration

        public Duration getDuration()
        Gets the duration of the media related by this metadata. Only videos are supported by this metadata property.
        Returns:
        the duration of the video.
      • getMemoryData

        public MemoryData getMemoryData()
        Gets the memory foootprint of the media related by this metadata.
        Returns:
        data of the memory taken by the media (id est the size of the storage space)