Package adalid.core

Class AbstractExpression

java.lang.Object
adalid.core.AbstractArtifact
adalid.core.AbstractExpression
All Implemented Interfaces:
Wrappable, Artifact, Expression, NaryExpression, NaryOperation, TypedArtifact
Direct Known Subclasses:
AbstractComparisonX, AbstractConditionalX, AbstractDataAggregateX, AbstractNaryVectorX, AbstractOrderedPairX, AbstractRowsAggregateX, AbstractScalarX, VariantX

public abstract class AbstractExpression extends AbstractArtifact implements NaryExpression
Author:
Jorge Campins
  • Constructor Details

    • AbstractExpression

      public AbstractExpression()
  • Method Details

    • getInitialStateBusinessOperationsList

      public List<Operation> getInitialStateBusinessOperationsList()
    • getFinalStateBusinessOperationsList

      public List<Operation> getFinalStateBusinessOperationsList()
    • getDataType

      public Class<?> getDataType()
      Specified by:
      getDataType in interface TypedArtifact
      Returns:
      the data type
    • setDataType

      protected void setDataType(Class<?> dataType)
      Parameters:
      dataType - the type to set
    • getParentExpression

      public Expression getParentExpression()
      Specified by:
      getParentExpression in interface Expression
      Returns:
      the parent expression
    • getForeignExpressionField

      public Field getForeignExpressionField()
      Returns:
      the foreign expression field
    • setForeignExpressionField

      protected void setForeignExpressionField(Field foreignExpressionField)
      Parameters:
      foreignExpressionField - the foreign expression field to set
    • getForeignExpressionName

      public String getForeignExpressionName()
      Returns:
      the foreign expression name
    • getForeignExpressionType

      public Class<?> getForeignExpressionType()
      Returns:
      the foreign expression type
    • getVerifiedUsages

      public List<ExpressionUsage> getVerifiedUsages()
      Specified by:
      getVerifiedUsages in interface Expression
      Returns:
      the verified usages
    • getVerifiedUsageMap

      public Map<ExpressionUsage,Set<Artifact>> getVerifiedUsageMap()
      Specified by:
      getVerifiedUsageMap in interface Expression
      Returns:
      the verified usages
    • getVerifiedUsers

      public Set<Artifact> getVerifiedUsers(ExpressionUsage usage)
      Specified by:
      getVerifiedUsers in interface Expression
      Parameters:
      usage - the expression usage
      Returns:
      the verified user list
    • addVerifiedUsage

      public Set<Artifact> addVerifiedUsage(ExpressionUsage usage, Artifact user)
      Specified by:
      addVerifiedUsage in interface Expression
      Parameters:
      usage - the expression usage
      user - the artifact that makes use of this expression
      Returns:
      the verified user list
    • isLogicalTautology

      public boolean isLogicalTautology()
    • setLogicalTautology

      public void setLogicalTautology(boolean tautology)
    • getTransitionTimestamp

      public Property getTransitionTimestamp()
    • setTransitionTimestamp

      public void setTransitionTimestamp(TimestampProperty timestamp)
    • setTransitionDate

      public void setTransitionDate(DateProperty date)
    • getStringsSet

      public Set<String> getStringsSet()
      Specified by:
      getStringsSet in interface Expression
      Returns:
      the strings set
    • getReferencedColumnsList

      public List<Property> getReferencedColumnsList()
      Specified by:
      getReferencedColumnsList in interface Expression
      Returns:
      the referenced columns list
    • getCorrespondingReferencedColumnsList

      public List<Property> getCorrespondingReferencedColumnsList(QueryTable searchQueryTable1, QueryTable searchQueryTable2)
    • getReferencedColumnsMap

      public Map<String,Property> getReferencedColumnsMap()
      Specified by:
      getReferencedColumnsMap in interface Expression
      Returns:
      the referenced columns map
    • getReferencedJoinsList

      public List<QueryJoin> getReferencedJoinsList()
      Specified by:
      getReferencedJoinsList in interface Expression
      Returns:
      the referenced joins list
    • getReferencedJoinsList

      public List<QueryJoin> getReferencedJoinsList(QueryTable queryTable)
      Specified by:
      getReferencedJoinsList in interface Expression
      Parameters:
      queryTable - query table
      Returns:
      the referenced joins list
    • getReferencedJoinsMap

      public Map<String,QueryJoin> getReferencedJoinsMap()
      Specified by:
      getReferencedJoinsMap in interface Expression
      Returns:
      the referenced joins map
    • getReferencedJoinsMap

      public Map<String,QueryJoin> getReferencedJoinsMap(QueryTable queryTable)
      Specified by:
      getReferencedJoinsMap in interface Expression
      Parameters:
      queryTable - query table
      Returns:
      the referenced joins map
    • getCrossReferencedExpressionsSet

      public Set<String> getCrossReferencedExpressionsSet()
      Specified by:
      getCrossReferencedExpressionsSet in interface Expression
      Returns:
      the referenced expressions map
    • getCrossReferencedExpressionsSet

      public Set<String> getCrossReferencedExpressionsSet(Entity declaringEntity)
      Specified by:
      getCrossReferencedExpressionsSet in interface Expression
      Parameters:
      declaringEntity - declaring entity
      Returns:
      the referenced expressions map
    • getCrossReferencedExpressionsKey

      public String getCrossReferencedExpressionsKey()
      Specified by:
      getCrossReferencedExpressionsKey in interface Expression
    • isCrossReferencedExpression

      public boolean isCrossReferencedExpression()
      Specified by:
      isCrossReferencedExpression in interface Expression
    • isSingleEntityExpression

      public boolean isSingleEntityExpression()
      Specified by:
      isSingleEntityExpression in interface Expression
      Returns:
      true if is a TemporalExpression; otherwise false
    • isSingleEntityExpression

      public boolean isSingleEntityExpression(Entity declaringEntity)
      Specified by:
      isSingleEntityExpression in interface Expression
      Parameters:
      declaringEntity - declaring entity
      Returns:
      true if is a TemporalExpression; otherwise false
    • isBooleanExpression

      public boolean isBooleanExpression()
      Returns:
      true if is a BooleanExpression; otherwise false
    • isCharacterExpression

      public boolean isCharacterExpression()
      Returns:
      true if is a CharacterExpression; otherwise false
    • isEntityExpression

      public boolean isEntityExpression()
      Returns:
      true if is a EntityExpression; otherwise false
    • isNumericExpression

      public boolean isNumericExpression()
      Returns:
      true if is a NumericExpression; otherwise false
    • isTemporalExpression

      public boolean isTemporalExpression()
      Returns:
      true if is a TemporalExpression; otherwise false
    • isComparisonExpression

      public boolean isComparisonExpression()
      Returns:
      true if is a ComparisonX; otherwise false
    • isConditionalExpression

      public boolean isConditionalExpression()
      Returns:
      true if is a ConditionalX; otherwise false
    • isDataAggregateExpression

      public boolean isDataAggregateExpression()
      Returns:
      true if is a DataAggregateX; otherwise false
    • isOrderedPairExpression

      public boolean isOrderedPairExpression()
      Returns:
      true if is a OrderedPairX; otherwise false
    • isRowsAggregateExpression

      public boolean isRowsAggregateExpression()
      Returns:
      true if is a RowsAggregateX; otherwise false
    • isScalarExpression

      public boolean isScalarExpression()
      Returns:
      true if is a ScalarX; otherwise false
    • isVariantExpression

      public boolean isVariantExpression()
      Returns:
      true if is a TemporalExpression; otherwise false
    • finalise

      public boolean finalise()
      Description copied from interface: Artifact
      dot the i's and cross the t's
      Specified by:
      finalise in interface Artifact
      Overrides:
      finalise in class AbstractArtifact
      Returns:
      true if this artifact was successfully finalised; otherwise false
    • checkArguments

      protected void checkArguments()
    • checkUnusualArguments

      protected void checkUnusualArguments(String expression, org.apache.log4j.Level level)
    • checkUnusualInstance

      protected void checkUnusualInstance(String expression, org.apache.log4j.Level level, Instance argument)
    • checkStateAttributes

      protected void checkStateAttributes()
    • copyDataType

      protected void copyDataType(Object object)
    • getObjectDataType

      protected Class<?> getObjectDataType(Object object)
    • getForeignExpression

      public Expression getForeignExpression()
    • getDefaultWrapperClass

      public Class<? extends ExpressionWrapper> getDefaultWrapperClass()
      Specified by:
      getDefaultWrapperClass in interface Wrappable
      Overrides:
      getDefaultWrapperClass in class AbstractArtifact
      Returns:
      the default wrapper class
    • getLocalizedLabel

      public String getLocalizedLabel(Locale locale)
      Specified by:
      getLocalizedLabel in interface Artifact
      Overrides:
      getLocalizedLabel in class AbstractArtifact
      Parameters:
      locale - the locale for the label
      Returns:
      the localized label
    • getLocalizedShortLabel

      public String getLocalizedShortLabel(Locale locale)
      Specified by:
      getLocalizedShortLabel in interface Artifact
      Overrides:
      getLocalizedShortLabel in class AbstractArtifact
      Parameters:
      locale - the locale for the short label
      Returns:
      the localized short label
    • getLocalizedCollectionLabel

      public String getLocalizedCollectionLabel(Locale locale)
      Specified by:
      getLocalizedCollectionLabel in interface Artifact
      Overrides:
      getLocalizedCollectionLabel in class AbstractArtifact
      Parameters:
      locale - the locale for the collection label
      Returns:
      the localized collection label
    • getLocalizedCollectionShortLabel

      public String getLocalizedCollectionShortLabel(Locale locale)
      Specified by:
      getLocalizedCollectionShortLabel in interface Artifact
      Overrides:
      getLocalizedCollectionShortLabel in class AbstractArtifact
      Parameters:
      locale - the locale for the collection short label
      Returns:
      the localized collection short label
    • getLocalizedDescription

      public String getLocalizedDescription(Locale locale)
      Specified by:
      getLocalizedDescription in interface Artifact
      Overrides:
      getLocalizedDescription in class AbstractArtifact
      Parameters:
      locale - the locale for the description
      Returns:
      the localized description
    • getLocalizedShortDescription

      public String getLocalizedShortDescription(Locale locale)
      Specified by:
      getLocalizedShortDescription in interface Artifact
      Overrides:
      getLocalizedShortDescription in class AbstractArtifact
      Parameters:
      locale - the locale for the short description
      Returns:
      the localized short description
    • getExpressionString

      public String getExpressionString()
      Specified by:
      getExpressionString in interface Expression
      Returns:
      the pseudo-expression
    • fieldsToString

      protected String fieldsToString(int n, String key, boolean verbose, boolean fields, boolean maps)
      Overrides:
      fieldsToString in class AbstractArtifact