Package org.corpus_tools.pepper.common
Class FormatDesc
- java.lang.Object
-
- org.corpus_tools.pepper.common.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 aPepperImporteror aPepperExporter. Or it can be used to determine the format of a corpus resource as given inCorpusDesc.
Main fields are:formatName- to determine the name of the formatformatVersion- to determine the version of the formatformatReference- to set a link to a more detailed description, in most cases this is optional
- Author:
- Florian Zipser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFormatDesc.FormatDescBuilder
-
Field Summary
Fields Modifier and Type Field Description protected StringformatNameName of the linguistic format.protected org.eclipse.emf.common.util.URIformatReferenceDocumentation reference for the linguistic format.protected StringformatVersionThe version of the format.
-
Constructor Summary
Constructors Constructor Description FormatDesc()Initilizes an object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Compares aCorpusDescobject with this object.StringgetFormatName()Returns the name of the linguistic format.org.eclipse.emf.common.util.URIgetFormatReference()Returns the documentation reference for the linguistic format.StringgetFormatVersion()Returns the version of the linguistic format.inthashCode()This method is overwritten because of findbugs.FormatDescsetFormatName(String formatName)Sets the name of the linguistic format.FormatDescsetFormatReference(org.eclipse.emf.common.util.URI formatReference)Sets the documentation reference for the linguistic format.FormatDescsetFormatVersion(String formatVersion)Sets the version of the linguistic format.StringtoString()Returns a String representation of this 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 aCorpusDescobject 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.
-
hashCode
public int hashCode()
This method is overwritten because of findbugs.
-
-