Package org.corpus_tools.pepper.common
Class PepperModuleDesc
- java.lang.Object
-
- org.corpus_tools.pepper.common.PepperModuleDesc
-
- All Implemented Interfaces:
Comparable<PepperModuleDesc>
public class PepperModuleDesc extends Object implements Comparable<PepperModuleDesc>
This class is a kind of a fingerprint of a Pepper module and provides some information about a module.- Author:
- Florian Zipser
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.emf.common.util.URIhpprotected org.eclipse.emf.common.util.URIsupplierContact
-
Constructor Summary
Constructors Constructor Description PepperModuleDesc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormatDescaddSupportedFormat(String formatName, String formatVersion, org.eclipse.emf.common.util.URI formatReference)Creates a newFormatDescobject containing the passed name, version and reference to the list of ofFormatDescobjects describing all formats supported by the Pepper module, this object describes.intcompareTo(PepperModuleDesc o)Compares the passedPepperModuleDescobject with this.booleanequals(Object obj)This method was overwritten because of a findbugs warningStringgetDesc()Returns a short description of this module.MODULE_TYPEgetModuleType()Returns the type of this module.StringgetName()Returns the name of a Pepper module described by thisPepperModuleDescobject.PepperModulePropertiesgetProperties()Returns aPepperModulePropertiesobject containing properties to customize the behavior of thisPepperModule.org.eclipse.emf.common.util.URIgetSupplierContact()Returns a uri where to find more information about this module and where to find some contact information to contact the supllier.org.eclipse.emf.common.util.URIgetSupplierHomepage()Sets theURIto the homepage describing the functionality of the module.List<FormatDesc>getSupportedFormats()Returns a list ofFormatDescobjects describing all formats supported by the Pepper module, this object describes.StringgetVersion()Returns the version of a Pepper module described by thisPepperModuleDescobject.inthashCode()This method was overwritten because of a findbugs warningvoidsetDesc(String desc)Sets a short description of this module.voidsetModuleType(MODULE_TYPE moduleType)Sets the type of this module.voidsetName(String moduleName)Sets the name of a Pepper module described by thisPepperModuleDescobject.voidsetProperties(PepperModuleProperties properties)Sets thePepperModulePropertiesobject containing properties to customize the behavior of thisPepperModule.voidsetSupplierContact(org.eclipse.emf.common.util.URI supplierContact)Sets a uri where to find more information about this module and where to find some contact information to contact the supllier.voidsetSupplierHomepage(org.eclipse.emf.common.util.URI hp)Returns theURIto the homepage describing the functionality of the module.voidsetVersion(String version)Sets the version of a Pepper module described by thisPepperModuleDescobject.StringtoString()Returns a String representation of this object.
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of a Pepper module described by thisPepperModuleDescobject.- Returns:
- name of the Pepper module
-
setName
public void setName(String moduleName)
Sets the name of a Pepper module described by thisPepperModuleDescobject.- Parameters:
moduleName- name of the Pepper module
-
getVersion
public String getVersion()
Returns the version of a Pepper module described by thisPepperModuleDescobject.- Returns:
- version of the Pepper module
-
setVersion
public void setVersion(String version)
Sets the version of a Pepper module described by thisPepperModuleDescobject.- Parameters:
version- of the Pepper module
-
getModuleType
public MODULE_TYPE getModuleType()
Returns the type of this module.- Returns:
- type of module
-
setModuleType
public void setModuleType(MODULE_TYPE moduleType)
Sets the type of this module.- Parameters:
moduleType- type of module
-
getDesc
public String getDesc()
Returns a short description of this module. Please support some information, for the user, of what task this module does.- Returns:
- a short description of the task of this module
-
setDesc
public void setDesc(String desc)
Sets a short description of this module. Please support some information, for the user, of what task this module does.- Parameters:
desc- a short description of the task of this module
-
getSupplierContact
public org.eclipse.emf.common.util.URI getSupplierContact()
Returns a uri where to find more information about this module and where to find some contact information to contact the supllier.- Returns:
- contact address like eMail address or homepage address
-
setSupplierContact
public void setSupplierContact(org.eclipse.emf.common.util.URI supplierContact)
Sets a uri where to find more information about this module and where to find some contact information to contact the supllier.- Parameters:
uri- contact address like eMail address or homepage address
-
getSupplierHomepage
public org.eclipse.emf.common.util.URI getSupplierHomepage()
Sets theURIto the homepage describing the functionality of the module.- Returns:
URIto the homepage
-
setSupplierHomepage
public void setSupplierHomepage(org.eclipse.emf.common.util.URI hp)
Returns theURIto the homepage describing the functionality of the module.- Parameters:
hp-URIto the homepage
-
getSupportedFormats
public List<FormatDesc> getSupportedFormats()
Returns a list ofFormatDescobjects describing all formats supported by the Pepper module, this object describes.- Returns:
- list of format descriptions
-
addSupportedFormat
public FormatDesc addSupportedFormat(String formatName, String formatVersion, org.eclipse.emf.common.util.URI formatReference)
Creates a newFormatDescobject containing the passed name, version and reference to the list of ofFormatDescobjects describing all formats supported by the Pepper module, this object describes.- Parameters:
formatName- name of the supported formatformatVersion- version of the supported formatformatReference- a reference for information about the format if exist- Returns:
- a
FormatDesc
-
getProperties
public PepperModuleProperties getProperties()
Returns aPepperModulePropertiesobject containing properties to customize the behavior of thisPepperModule.- Returns:
-
setProperties
public void setProperties(PepperModuleProperties properties)
Sets thePepperModulePropertiesobject containing properties to customize the behavior of thisPepperModule. Please make sure, that this method is called in constructor of your module. If not, a generalPepperModulePropertiesobject is created by the pepper framework and will be initialized. This means, when calling this method later, all properties for customizing the module will be overridden.- Parameters:
properties-
-
toString
public String toString()
Returns a String representation of this object. Please note, that this representation cannot be used for serialization/deserialization purposes
-
compareTo
public int compareTo(PepperModuleDesc o)
Compares the passedPepperModuleDescobject with this. The sorting order follows the rules: and ascending name inside the three types.- Specified by:
compareToin interfaceComparable<PepperModuleDesc>
-
equals
public boolean equals(Object obj)
This method was overwritten because of a findbugs warning
-
-