|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ocltf.parser.analysis.AnalysisAdapter org.ocltf.parser.analysis.DepthFirstAdapter org.ocltf.translation.BaseTranslator org.ocltf.translation.query.QueryTranslator
Performs translation to the following:
Field Summary |
Fields inherited from class org.ocltf.translation.BaseTranslator |
logger |
Fields inherited from interface org.ocltf.translation.Translator |
CONTEXT_ELEMENT |
Constructor Summary | |
QueryTranslator()
|
Method Summary | |
void |
handleExists(java.lang.String translation,
java.lang.Object node)
|
void |
handleIsEmpty(java.lang.String translation,
java.lang.Object node)
|
void |
handleIsLike(java.lang.String translation,
java.lang.Object node)
|
void |
handleLogicalExpression(java.lang.String translation,
java.lang.Object node)
|
void |
handleRelationalExpression(java.lang.String translation,
java.lang.Object node)
|
void |
handleSelect(java.lang.String translation,
java.lang.Object node)
|
void |
handleSubSelect(java.lang.String translation,
java.lang.Object node)
|
void |
inALogicalExpressionTail(org.ocltf.parser.node.ALogicalExpressionTail logicalExpressionTail)
Override to deal with logical 'and, 'or', 'xor, ... |
void |
inAOperationContextDeclaration(org.ocltf.parser.node.AOperationContextDeclaration declaration)
Gets the information about the operation which is the context of this expression. |
void |
inAPropertyCallExpression(org.ocltf.parser.node.APropertyCallExpression expression)
Override to handle any propertyCall expressions ( i.e. |
void |
inARelationalExpressionTail(org.ocltf.parser.node.ARelationalExpressionTail relationalExpressionTail)
Override to deal with relational '<, '>', '=', ... |
void |
inAStandardDeclarator(org.ocltf.parser.node.AStandardDeclarator declarator)
Helps out with 'includesAll', replaces the {1} in the expression fragment when a declarator is encountered (i.e. |
protected boolean |
isArgument(java.lang.String name)
Returns true if the name is one of the arguments. |
protected boolean |
isInitialDeclarator()
True/false whether or not its the initial declarator. |
protected void |
postProcess()
Handles any final processing. |
protected void |
preProcess()
Called by super class to reset any objects. |
protected java.lang.String |
replaceFragment(java.lang.String fragment,
java.lang.String replacement,
int index)
Checks to see if the replacement is an argument and if so replaces the {index} in the fragment with the 'argument' fragment from the template. |
Methods inherited from class org.ocltf.translation.BaseTranslator |
getContextElement, getExpression, getTranslationFragment, handleException, handleTranslationFragment, inAClassifierContextDeclaration, inADefClassifierExpressionBody, inAInvClassifierExpressionBody, inAOperationExpressionBody, process, translate |
Methods inherited from class org.ocltf.parser.analysis.DepthFirstAdapter |
caseAActualParameterList, caseAAdditiveExpression, caseAAdditiveExpressionTail, caseAAndLogicalOperator, caseAArrowPropertyCallExpressionTail, caseAAttributeOrAssociationContextDeclaration, caseAAttributeOrAssociationExpressionBody, caseABagCollectionKind, caseABagCollectionType, caseABarFeatureCallParameterOption, caseABodyOperationStereotype, caseABooleanPrimitiveLit, caseAClassifierContextDeclaration, caseACollectionCollectionKind, caseACollectionCollectionType, caseACollectionLit, caseACollectionLiteral, caseACollectionType, caseAColonFeatureCallParameterOption, caseACommaExpression, caseACommaFeatureCallParameterOption, caseAConcreteFeatureCallParameters, caseAContextDeclaration, caseADeclaratorTail, caseADefClassifierExpressionBody, caseADeriveInitialOrDerivedValue, caseADivMultiplyOperator, caseADotPropertyCallExpressionTail, caseAEqualExpression, caseAEqualRelationalOperator, caseAExpMessageArgument, caseAExpressionListOrRange, caseAFeatureCall, caseAFeatureCallParameters, caseAFeaturePrimaryExpression, caseAGteqRelationalOperator, caseAGtRelationalOperator, caseAIfExpression, caseAIfPrimaryExpression, caseAImpliesLogicalOperator, caseAInitInitialOrDerivedValue, caseAInLetExpSub, caseAIntegerPrimitiveLit, caseAInvClassifierExpressionBody, caseAIsMarkedPre, caseAIsSentMessageExp, caseAIterateDeclarator, caseAIterateFeatureCallParameterOption, caseALetExp, caseALetExpression, caseALetVariableDelaration, caseAListExpressionListOrRangeTail, caseALiteralPrimaryExpression, caseALogicalExp, caseALogicalExpression, caseALogicalExpressionTail, caseALteqRelationalOperator, caseALtRelationalOperator, caseAMessageArguments, caseAMessageArgumentsTail, caseAMessageExpression, caseAMessageMessageExp, caseAMinusAddOperator, caseAMinusUnaryOperator, caseAMultiplicativeExpression, caseAMultiplicativeExpressionTail, caseAMultMultiplyOperator, caseANotEqualRelationalOperator, caseANotUnaryOperator, caseAOperation, caseAOperationContextDeclaration, caseAOperationDefinitionExpression, caseAOperationExpressionBody, caseAOrderedsetCollectionType, caseAOrLogicalOperator, caseAPackageDeclaration, caseAParenthesesPrimaryExpression, caseAPathName, caseAPathNameTail, caseAPlusAddOperator, caseAPostOperationStereotype, caseAPreOperationStereotype, caseAPrimitiveLiteral, caseAPropertyCallExpression, caseAQualifiers, caseARangeExpressionListOrRangeTail, caseARealPrimitiveLit, caseARelationalExpression, caseARelationalExpressionTail, caseAScopeOperatorName, caseASequenceCollectionKind, caseASequenceCollectionType, caseASetCollectionKind, caseASetCollectionType, caseASimpleType, caseAStandardDeclarator, caseAStringPrimitiveLit, caseATupleLit, caseATupleLiteral, caseATupleType, caseATupletypeType, caseATypeDeclaration, caseATypeMessageArgument, caseAUnaryExpression, caseAVariableDeclaration, caseAVariableDeclarationLetExpSub, caseAVariableDeclarationList, caseAVariableDeclarationListTail, caseAVariableDefinitionExpression, caseAXorLogicalOperator, caseStart, defaultIn, defaultOut, inAActualParameterList, inAAdditiveExpression, inAAdditiveExpressionTail, inAAndLogicalOperator, inAArrowPropertyCallExpressionTail, inAAttributeOrAssociationContextDeclaration, inAAttributeOrAssociationExpressionBody, inABagCollectionKind, inABagCollectionType, inABarFeatureCallParameterOption, inABodyOperationStereotype, inABooleanPrimitiveLit, inACollectionCollectionKind, inACollectionCollectionType, inACollectionLit, inACollectionLiteral, inACollectionType, inAColonFeatureCallParameterOption, inACommaExpression, inACommaFeatureCallParameterOption, inAConcreteFeatureCallParameters, inAContextDeclaration, inADeclaratorTail, inADeriveInitialOrDerivedValue, inADivMultiplyOperator, inADotPropertyCallExpressionTail, inAEqualExpression, inAEqualRelationalOperator, inAExpMessageArgument, inAExpressionListOrRange, inAFeatureCall, inAFeatureCallParameters, inAFeaturePrimaryExpression, inAGteqRelationalOperator, inAGtRelationalOperator, inAIfExpression, inAIfPrimaryExpression, inAImpliesLogicalOperator, inAInitInitialOrDerivedValue, inAInLetExpSub, inAIntegerPrimitiveLit, inAIsMarkedPre, inAIsSentMessageExp, inAIterateDeclarator, inAIterateFeatureCallParameterOption, inALetExp, inALetExpression, inALetVariableDelaration, inAListExpressionListOrRangeTail, inALiteralPrimaryExpression, inALogicalExp, inALogicalExpression, inALteqRelationalOperator, inALtRelationalOperator, inAMessageArguments, inAMessageArgumentsTail, inAMessageExpression, inAMessageMessageExp, inAMinusAddOperator, inAMinusUnaryOperator, inAMultiplicativeExpression, inAMultiplicativeExpressionTail, inAMultMultiplyOperator, inANotEqualRelationalOperator, inANotUnaryOperator, inAOperation, inAOperationDefinitionExpression, inAOrderedsetCollectionType, inAOrLogicalOperator, inAPackageDeclaration, inAParenthesesPrimaryExpression, inAPathName, inAPathNameTail, inAPlusAddOperator, inAPostOperationStereotype, inAPreOperationStereotype, inAPrimitiveLiteral, inAQualifiers, inARangeExpressionListOrRangeTail, inARealPrimitiveLit, inARelationalExpression, inAScopeOperatorName, inASequenceCollectionKind, inASequenceCollectionType, inASetCollectionKind, inASetCollectionType, inASimpleType, inAStringPrimitiveLit, inATupleLit, inATupleLiteral, inATupleType, inATupletypeType, inATypeDeclaration, inATypeMessageArgument, inAUnaryExpression, inAVariableDeclaration, inAVariableDeclarationLetExpSub, inAVariableDeclarationList, inAVariableDeclarationListTail, inAVariableDefinitionExpression, inAXorLogicalOperator, inStart, outAActualParameterList, outAAdditiveExpression, outAAdditiveExpressionTail, outAAndLogicalOperator, outAArrowPropertyCallExpressionTail, outAAttributeOrAssociationContextDeclaration, outAAttributeOrAssociationExpressionBody, outABagCollectionKind, outABagCollectionType, outABarFeatureCallParameterOption, outABodyOperationStereotype, outABooleanPrimitiveLit, outAClassifierContextDeclaration, outACollectionCollectionKind, outACollectionCollectionType, outACollectionLit, outACollectionLiteral, outACollectionType, outAColonFeatureCallParameterOption, outACommaExpression, outACommaFeatureCallParameterOption, outAConcreteFeatureCallParameters, outAContextDeclaration, outADeclaratorTail, outADefClassifierExpressionBody, outADeriveInitialOrDerivedValue, outADivMultiplyOperator, outADotPropertyCallExpressionTail, outAEqualExpression, outAEqualRelationalOperator, outAExpMessageArgument, outAExpressionListOrRange, outAFeatureCall, outAFeatureCallParameters, outAFeaturePrimaryExpression, outAGteqRelationalOperator, outAGtRelationalOperator, outAIfExpression, outAIfPrimaryExpression, outAImpliesLogicalOperator, outAInitInitialOrDerivedValue, outAInLetExpSub, outAIntegerPrimitiveLit, outAInvClassifierExpressionBody, outAIsMarkedPre, outAIsSentMessageExp, outAIterateDeclarator, outAIterateFeatureCallParameterOption, outALetExp, outALetExpression, outALetVariableDelaration, outAListExpressionListOrRangeTail, outALiteralPrimaryExpression, outALogicalExp, outALogicalExpression, outALogicalExpressionTail, outALteqRelationalOperator, outALtRelationalOperator, outAMessageArguments, outAMessageArgumentsTail, outAMessageExpression, outAMessageMessageExp, outAMinusAddOperator, outAMinusUnaryOperator, outAMultiplicativeExpression, outAMultiplicativeExpressionTail, outAMultMultiplyOperator, outANotEqualRelationalOperator, outANotUnaryOperator, outAOperation, outAOperationContextDeclaration, outAOperationDefinitionExpression, outAOperationExpressionBody, outAOrderedsetCollectionType, outAOrLogicalOperator, outAPackageDeclaration, outAParenthesesPrimaryExpression, outAPathName, outAPathNameTail, outAPlusAddOperator, outAPostOperationStereotype, outAPreOperationStereotype, outAPrimitiveLiteral, outAPropertyCallExpression, outAQualifiers, outARangeExpressionListOrRangeTail, outARealPrimitiveLit, outARelationalExpression, outARelationalExpressionTail, outAScopeOperatorName, outASequenceCollectionKind, outASequenceCollectionType, outASetCollectionKind, outASetCollectionType, outASimpleType, outAStandardDeclarator, outAStringPrimitiveLit, outATupleLit, outATupleLiteral, outATupleType, outATupletypeType, outATypeDeclaration, outATypeMessageArgument, outAUnaryExpression, outAVariableDeclaration, outAVariableDeclarationLetExpSub, outAVariableDeclarationList, outAVariableDeclarationListTail, outAVariableDefinitionExpression, outAXorLogicalOperator, outStart |
Methods inherited from class org.ocltf.parser.analysis.AnalysisAdapter |
caseEOF, caseTAnd, caseTApostrophe, caseTArrow, caseTAt, caseTAttr, caseTBag, caseTBar, caseTBlank, caseTBody, caseTBoolean, caseTCollection, caseTColon, caseTComma, caseTComment, caseTContext, caseTDef, caseTDerive, caseTDiv, caseTDot, caseTElse, caseTEndif, caseTEndpackage, caseTEnum, caseTEqual, caseTGt, caseTGteq, caseTIf, caseTImplies, caseTIn, caseTInit, caseTInt, caseTInv, caseTIsSentOperator, caseTLBrace, caseTLBracket, caseTLet, caseTLParen, caseTLt, caseTLteq, caseTMessageOperator, caseTMinus, caseTMult, caseTName, caseTNewLine, caseTNot, caseTNotEqual, caseTOper, caseTOr, caseTOrderedset, caseTPackage, caseTPlus, caseTPost, caseTPre, caseTRange, caseTRBrace, caseTRBracket, caseTReal, caseTRParen, caseTScopeOperator, caseTSemicolon, caseTSequence, caseTSet, caseTStringLit, caseTTab, caseTThen, caseTTuple, caseTTupletype, caseTUnknown, caseTXor, defaultCase, getIn, getOut, setIn, setOut |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QueryTranslator()
Method Detail |
protected void preProcess()
protected boolean isInitialDeclarator()
protected boolean isArgument(java.lang.String name)
public void inAOperationContextDeclaration(org.ocltf.parser.node.AOperationContextDeclaration declaration)
public void inAStandardDeclarator(org.ocltf.parser.node.AStandardDeclarator declarator)
public void inAPropertyCallExpression(org.ocltf.parser.node.APropertyCallExpression expression)
public void inALogicalExpressionTail(org.ocltf.parser.node.ALogicalExpressionTail logicalExpressionTail)
public void inARelationalExpressionTail(org.ocltf.parser.node.ARelationalExpressionTail relationalExpressionTail)
protected java.lang.String replaceFragment(java.lang.String fragment, java.lang.String replacement, int index)
fragment
- the fragment to perform replacement.replacement
- the replacement stringindex
- the index in the string to replace.
protected void postProcess()
public void handleSubSelect(java.lang.String translation, java.lang.Object node)
public void handleIsLike(java.lang.String translation, java.lang.Object node)
public void handleSelect(java.lang.String translation, java.lang.Object node)
public void handleExists(java.lang.String translation, java.lang.Object node)
public void handleIsEmpty(java.lang.String translation, java.lang.Object node)
public void handleLogicalExpression(java.lang.String translation, java.lang.Object node)
public void handleRelationalExpression(java.lang.String translation, java.lang.Object node)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |