Class EmfFeatureValue

java.lang.Object
com.e1c.langtool.emf.collector.EmfFeatureValue
All Implemented Interfaces:
FeatureValue, ContextTranslationKey, EFeatureValue, TranslationKey, Serializable
Direct Known Subclasses:
V8FeatureValue

public class EmfFeatureValue extends Object implements EFeatureValue
The Class EmfFeatureValue contains feature string value, feature FQN key, object URI, feature settings and value is computed.
See Also:
  • 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 be null
      settings - the settings, cannot be null
      featureKey - the feature key, cannot be null
      value - the value, cannot be null
      computedValue - the computed value
      isUnknown - the is unknown
      isTag - 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 Value
      settings - the feature settins
      featureKey - the feature key
      featureValue - the feature value
      computedValue - whether the feature value is computed value
      isUnknown - whether the feature value is unknown value
      isTag - 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: ContextTranslationKey
      Gets 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:
      getResourceId in interface ContextTranslationKey
      Specified by:
      getResourceId in interface FeatureValue
      Returns:
      the resource id, cannot return null.
    • getResourceUri

      public org.eclipse.emf.common.util.URI getResourceUri()
      Gets the object uri.
      Specified by:
      getResourceUri in interface EFeatureValue
      Returns:
      the objectUri
    • getValue

      public String getValue()
      Gets the value of object feature.
      Specified by:
      getValue in interface FeatureValue
      Specified by:
      getValue in interface TranslationKey
      Returns:
      the value
    • getFeatureSettings

      public FeatureSettings getFeatureSettings()
      Gets the feature settings.
      Specified by:
      getFeatureSettings in interface FeatureValue
      Specified by:
      getFeatureSettings in interface TranslationKey
      Returns:
      the feature settings
    • getFeatureKey

      public FeatureKey getFeatureKey()
      Gets the feature key.
      Specified by:
      getFeatureKey in interface ContextTranslationKey
      Specified by:
      getFeatureKey in interface FeatureValue
      Returns:
      the featureKey
    • isComputedValue

      public boolean isComputedValue()
      Checks if the value is computed from base objects.
      Specified by:
      isComputedValue in interface FeatureValue
      Returns:
      the computedValue
    • isUnknown

      public boolean isUnknown()
      Description copied from interface: FeatureValue
      Checks if the value is unknown.
      Specified by:
      isUnknown in interface FeatureValue
      Returns:
      true if unknown value.
    • isTag

      public boolean isTag()
      Description copied from interface: FeatureValue
      Checks if is tag or tag parameter.
      Specified by:
      isTag in interface FeatureValue
      Returns:
      true, if is tag or tag parameter.
    • getLocalStrings

      public Map<String,String> getLocalStrings()
      Description copied from interface: FeatureValue
      Gets the local strings of object feature.
      Specified by:
      getLocalStrings in interface FeatureValue
      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()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getContextKey

      public ContextTranslationKey getContextKey()
      Description copied from interface: FeatureValue
      Gets the context translation key.
      Specified by:
      getContextKey in interface FeatureValue
      Returns:
      the context key, cannot return null.