public abstract class BaseDescriptor extends java.lang.Object implements ITransformationDescriptor, ITransformationLicenseProvider
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
E_LICENSE |
protected static java.lang.String |
E_PROPERTY
Define the names of the XML elements that are parsed.
|
protected static java.lang.String |
E_TRANSFORMATION |
protected java.util.HashMap<java.lang.String,ITransformationLicense> |
licenseTable
The list of licenses associated with the transformation
key = license name (e.g., )
value = version
|
protected java.util.HashMap |
propertyTable
The list of properties associated with the transformation.
|
AUTHOR, DESCRIPTION, DOCUMENT, EXECUTION_LIST, EXTENSIBLE, GROUP_PATH, GROUP_PATH_DELIMITERS, ICON, ID, KEYWORDS, KEYWORDS_DELIMITERS, LICENSE_ID, LICENSE_VERSION, MODEL_TYPE_DELIMITERS, NAME, PROFILES, PROFILES_DELIMITERS, PROVIDER, PUBLIC, REVERSE_TRANSFORM_ID, SOURCE_MODEL_TYPE, SOURCE_MODEL_TYPE_DELIMITERS, SUPPORTS_SILENT, SUPPORTS_SOURCE_OVERRIDE, TARGET_MODEL_TYPE, TARGET_MODEL_TYPE_DELIMITERS, TRANSFORM_GUI, VERSION| Constructor and Description |
|---|
BaseDescriptor()
Default BaseDescriptor constructor.
|
BaseDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
Transformation Descriptor Constructor
This constructor creates a base descriptor from a plug-in
configuration element.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCustomProperties()
Add the custom properties from the configuration element.
|
protected java.lang.String |
addElementProperty(java.lang.String propertyId,
java.lang.String propertyName)
Add a predefined XML element property to the property table.
|
boolean |
addLicense(ITransformationLicense newLicense)
Add a license to the license table.
|
protected void |
addLicenses()
Add the licenses from the configuration element.
|
protected void |
addPredefinedProperties()
Add the predefined properties from the configuration element.
|
boolean |
addProperty(ITransformationProperty newProperty)
Add a property to the property table.
|
protected boolean |
checkProperty(java.lang.String propertyId,
boolean logError)
Check for a required property
|
boolean |
equals(java.lang.Object o) |
protected java.lang.String |
getDelimiters(java.lang.String propertyId)
Determine which properties are lists of values
|
java.lang.String |
getDescription()
Retrieve the localized description of the transformation item.
|
org.eclipse.core.runtime.IConfigurationElement |
getElement()
Return the XML configuration element associated with this transformation.
|
java.lang.String |
getId()
Retrieve the unique id of the transformation item.
|
ITransformationLicense |
getLicense(java.lang.String licenseId)
Returned the specified license associated with this transformation.
|
java.lang.String[] |
getLicenseIds()
List the identifiers of licenses associated with this transformation.
|
ITransformationLicense[] |
getLicenses()
Return all defined licenses associated with this transformation.
|
java.lang.String |
getName()
Retrieve the localized name of the transformation item.
|
ITransformationProperty[] |
getProperties()
Return all defined properties associated with this transformation.
|
ITransformationProperty |
getProperty(java.lang.String propertyId)
Return the specified property associated with this transformation.
|
java.lang.String[] |
getPropertyIds()
List the identifiers of properties associated with this transformation.
|
int |
hashCode() |
boolean |
isPublic()
Return true if the transformation is public (visible in UI).
|
boolean |
isValid()
Verfiy the descriptor
|
boolean |
removeProperty(ITransformationProperty oldProperty)
Remove a property from the property table.
|
protected java.util.HashMap propertyTable
protected java.util.HashMap<java.lang.String,ITransformationLicense> licenseTable
protected static final java.lang.String E_PROPERTY
protected static final java.lang.String E_TRANSFORMATION
protected static final java.lang.String E_LICENSE
public BaseDescriptor()
public BaseDescriptor(org.eclipse.core.runtime.IConfigurationElement element)
element - The XML configuration element for this transformation.protected void addPredefinedProperties()
protected void addCustomProperties()
protected void addLicenses()
protected java.lang.String addElementProperty(java.lang.String propertyId,
java.lang.String propertyName)
If the property name (localized) is not specified, the resource manager of the transform.core plugin is used to look it up. If a name is not provided and it is not a predefined transformation property, the resource manager will automatically print a missing resource exception.
propertyId - the unique ID of the proeprtypropertyName - the localized property name or nullprotected java.lang.String getDelimiters(java.lang.String propertyId)
propertyId - the property identifierpublic boolean addProperty(ITransformationProperty newProperty)
newProperty - the property to be addedpublic boolean addLicense(ITransformationLicense newLicense)
newLicense - the license to be addedpublic boolean removeProperty(ITransformationProperty oldProperty)
oldProperty - the property to be removedpublic org.eclipse.core.runtime.IConfigurationElement getElement()
public ITransformationProperty[] getProperties()
ITransformationDescriptorgetProperties in interface ITransformationDescriptorpublic ITransformationProperty getProperty(java.lang.String propertyId)
ITransformationDescriptorgetProperty in interface ITransformationDescriptorpropertyId - the identifier of the propertypublic java.lang.String[] getPropertyIds()
ITransformationDescriptorgetPropertyIds in interface ITransformationDescriptorpublic ITransformationLicense[] getLicenses()
ITransformationLicenseProvidergetLicenses in interface ITransformationLicenseProviderpublic ITransformationLicense getLicense(java.lang.String licenseId)
ITransformationLicenseProvidergetLicense in interface ITransformationLicenseProviderlicenseId - the identifier of the licensepublic java.lang.String[] getLicenseIds()
ITransformationLicenseProvidergetLicenseIds in interface ITransformationLicenseProviderpublic boolean isPublic()
ITransformationDescriptorThis is a convenience method for returning the value of the PUBLIC property.
isPublic in interface ITransformationDescriptorpublic java.lang.String getId()
ITransformationItemgetId in interface ITransformationItempublic java.lang.String getName()
ITransformationItemgetName in interface ITransformationItempublic java.lang.String getDescription()
ITransformationItemgetDescription in interface ITransformationItemprotected boolean checkProperty(java.lang.String propertyId,
boolean logError)
propertyId - the ID of the property to checklogError - - true if an invalid property should be loggedpublic boolean isValid()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object