Package com.e1c.langtool.emf.collector
Class EmfFeatureValue
java.lang.Object
com.e1c.langtool.emf.collector.EmfFeatureValue
- All Implemented Interfaces:
FeatureValue,ContextTranslationKey,EFeatureValue,TranslationKey,Serializable
- Direct Known Subclasses:
V8FeatureValue
The Class EmfFeatureValue contains feature string value, feature FQN key, object URI, feature settings
and value is computed.
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEmfFeatureValue(org.eclipse.emf.common.util.URI objectUri, EFeatureSettings settings, FeatureKey featureKey, String value, boolean computedValue, boolean isUnknown, boolean isTag) Instantiates a new feature value. -
Method Summary
Modifier and TypeMethodDescriptionstatic EmfFeatureValuecreate(org.eclipse.emf.common.util.URI resourceUri, EFeatureSettings settings, FeatureKey featureKey, String featureValue, boolean computedValue, boolean isUnknown, boolean isTag) Low-level factory method.booleanGets the context translation key.Gets the feature key.Gets the feature settings.Gets the local strings of object feature.org.eclipse.core.runtime.IPathGets the id of resource of translatable feature.org.eclipse.emf.common.util.URIGets the object uri.getValue()Gets the value of object feature.inthashCode()booleanChecks if the value is computed from base objects.booleanisTag()Checks if is tag or tag parameter.booleanChecks if the value is unknown.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.e1c.langtool.collector.FeatureValue
getComment, getFullPath, getSourceProject
-
Constructor Details
-
EmfFeatureValue
protected EmfFeatureValue(org.eclipse.emf.common.util.URI objectUri, EFeatureSettings settings, FeatureKey featureKey, String value, boolean computedValue, boolean isUnknown, boolean isTag) Instantiates a new feature value.- Parameters:
objectUri- the resouce or object uri, cannot benullsettings- the settings, cannot benullfeatureKey- the feature key, cannot benullvalue- the value, cannot benullcomputedValue- the computed valueisUnknown- the is unknownisTag- the is tag or tag parameter
-
-
Method Details
-
create
public static EmfFeatureValue create(org.eclipse.emf.common.util.URI resourceUri, EFeatureSettings settings, FeatureKey featureKey, String featureValue, boolean computedValue, boolean isUnknown, boolean isTag) Low-level factory method.- Parameters:
resourceUri- the resource URI of newly created Feature Valuesettings- the feature settinsfeatureKey- the feature keyfeatureValue- the feature valuecomputedValue- whether the feature value is computed valueisUnknown- whether the feature value is unknown valueisTag- the is tag or tag parameter- Returns:
- the emf feature value
- Throws:
IllegalArgumentException- if the object, feature settins or key is null
-
getResourceId
public org.eclipse.core.runtime.IPath getResourceId()Description copied from interface:ContextTranslationKeyGets the id of resource of translatable feature. It must be unique in project scope and free of project name in prefix that is mean id is project related.- Specified by:
getResourceIdin interfaceContextTranslationKey- Specified by:
getResourceIdin interfaceFeatureValue- Returns:
- the resource id, cannot return
null.
-
getResourceUri
public org.eclipse.emf.common.util.URI getResourceUri()Gets the object uri.- Specified by:
getResourceUriin interfaceEFeatureValue- Returns:
- the objectUri
-
getValue
Gets the value of object feature.- Specified by:
getValuein interfaceFeatureValue- Specified by:
getValuein interfaceTranslationKey- Returns:
- the value
-
getFeatureSettings
Gets the feature settings.- Specified by:
getFeatureSettingsin interfaceFeatureValue- Specified by:
getFeatureSettingsin interfaceTranslationKey- Returns:
- the feature settings
-
getFeatureKey
Gets the feature key.- Specified by:
getFeatureKeyin interfaceContextTranslationKey- Specified by:
getFeatureKeyin interfaceFeatureValue- Returns:
- the featureKey
-
isComputedValue
public boolean isComputedValue()Checks if the value is computed from base objects.- Specified by:
isComputedValuein interfaceFeatureValue- Returns:
- the computedValue
-
isUnknown
public boolean isUnknown()Description copied from interface:FeatureValueChecks if the value is unknown.- Specified by:
isUnknownin interfaceFeatureValue- Returns:
trueif unknown value.
-
isTag
public boolean isTag()Description copied from interface:FeatureValueChecks if is tag or tag parameter.- Specified by:
isTagin interfaceFeatureValue- Returns:
true, if is tag or tag parameter.
-
getLocalStrings
Description copied from interface:FeatureValueGets the local strings of object feature.- Specified by:
getLocalStringsin interfaceFeatureValue- Returns:
- the Map of local strings. The key of entry is "Language code" and the value of entry
is the "local string" in this language. Cannot be
null.
-
hashCode
public int hashCode() -
equals
-
toString
-
getContextKey
Description copied from interface:FeatureValueGets the context translation key.- Specified by:
getContextKeyin interfaceFeatureValue- Returns:
- the context key, cannot return
null.
-