Class FormatDesc


  • public class FormatDesc
    extends Object
    This class is used by Pepper to describe a linguistic data format. Such an object is used for instance to describe the set of formats which can be handled by a PepperImporter or a PepperExporter . Or it can be used to determine the format of a corpus resource as given in CorpusDesc.
    Main fields are:
    • formatName - to determine the name of the format
    • formatVersion - to determine the version of the format
    • formatReference - to set a link to a more detailed description, in most cases this is optional
    Author:
    Florian Zipser
    • Field Detail

      • formatName

        protected String formatName
        Name of the linguistic format.
      • formatVersion

        protected String formatVersion
        The version of the format.
      • formatReference

        protected org.eclipse.emf.common.util.URI formatReference
        Documentation reference for the linguistic format.
    • Constructor Detail

      • FormatDesc

        public FormatDesc()
        Initilizes an object.
    • Method Detail

      • setFormatName

        public FormatDesc setFormatName​(String formatName)
        Sets the name of the linguistic format.
        Parameters:
        formatName - name of the format to be used
        Returns:
        this
      • getFormatName

        public String getFormatName()
        Returns the name of the linguistic format.
        Returns:
        name of the format.
      • getFormatVersion

        public String getFormatVersion()
        Returns the version of the linguistic format.
        Returns:
        version of the format
      • setFormatVersion

        public FormatDesc setFormatVersion​(String formatVersion)
        Sets the version of the linguistic format.
        Parameters:
        formatVersion - version of the format
        Returns:
        this
      • getFormatReference

        public org.eclipse.emf.common.util.URI getFormatReference()
        Returns the documentation reference for the linguistic format.
        Parameters:
        link - to a documentation
      • setFormatReference

        public FormatDesc setFormatReference​(org.eclipse.emf.common.util.URI formatReference)
        Sets the documentation reference for the linguistic format.
        Parameters:
        formatReference - link to documentation
        Returns:
        this
      • equals

        public boolean equals​(Object obj)
        Compares a CorpusDesc object with this object. Both objects are equal, if and only if the have the same format name and format version. The comparison is case insensitive.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        This method is overwritten because of findbugs.
        Overrides:
        hashCode in class Object
      • toString

        public String toString()
        Returns a String representation of this object. Note: This String cannot be used for serialization/ deserialization.
        Overrides:
        toString in class Object
        Returns:
        a String representation of this object.