org.eclipse.hyades.models.hierarchy.util.internal
Class SimpleSearchQueryEngine
java.lang.Object
org.eclipse.hyades.models.hierarchy.util.internal.SimpleSearchQueryEngine
- Direct Known Subclasses:
- ImportFilterEngine
- public class SimpleSearchQueryEngine
- extends java.lang.Object
- Since:
- 3.3
|
Constructor Summary |
SimpleSearchQueryEngine(org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery query,
org.eclipse.emf.ecore.resource.ResourceSet targetResourceSet)
|
|
Method Summary |
protected void |
addResultValue(org.eclipse.emf.ecore.EObject element)
|
protected boolean |
addResultValueIfRequired(org.eclipse.emf.ecore.EObject eObject,
int pos)
|
protected void |
buildRequiredTraversalPaths()
|
SimpleSearchQueryEngine.EvalResult |
createEvalResult(org.eclipse.hyades.models.hierarchy.extensions.Operand operand)
|
protected SimpleSearchQueryEngine.EvalResult |
createEvalResult(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression expression)
|
protected void |
evalSelfAndParents(org.eclipse.emf.ecore.EObject element)
|
org.eclipse.hyades.models.hierarchy.extensions.QueryResult |
execute()
|
protected org.eclipse.emf.ecore.EObject |
findOutputElementInParents(org.eclipse.emf.ecore.EObject element)
Searches for a parent of element which is outputElement, up to a root
node |
protected java.lang.Object |
getNonModeledElementValue(SimpleSearchQueryEngine.EvalResult evalResult,
org.eclipse.hyades.models.hierarchy.extensions.SimpleOperand simpleOperand)
|
java.util.Set |
getRequiredPaths()
|
protected void |
indexWhereExpression()
|
protected boolean |
isOutputElement(org.eclipse.emf.ecore.EClass eClass)
|
protected boolean |
isOutputElement(org.eclipse.emf.ecore.EObject element)
|
protected void |
limitResult()
|
protected void |
populateResult()
|
protected void |
populateRootNodesAndClasses()
|
protected void |
prepareResult()
|
protected boolean |
processContainmentPath(org.eclipse.emf.ecore.EClass element)
|
protected boolean |
processEObject(java.util.List resetList,
org.eclipse.emf.ecore.EObject eObject,
int pos)
|
protected void |
processResetList(java.util.List list,
int startPosition)
|
protected boolean |
processResetListIsRequired(org.eclipse.emf.ecore.EObject eObject)
|
protected void |
resetSelfAndParents(org.eclipse.emf.ecore.EObject element,
SimpleSearchQueryEngine.EvalResult result)
|
protected boolean |
shouldPrune(org.eclipse.emf.ecore.EObject element,
int depth,
boolean children)
|
protected void |
sortResult()
|
protected boolean |
traverseFeatures(org.eclipse.emf.ecore.EObject element,
java.util.List resetList)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLCALENDAR
public static final java.lang.String XMLCALENDAR
- See Also:
- Constant Field Values
alreadyProcessed
protected java.util.Set alreadyProcessed
classPredicatesIndex
protected java.util.Map classPredicatesIndex
featurePredicatesIndex
protected java.util.Map featurePredicatesIndex
namesIndex
protected java.util.Map namesIndex
outputClasses
protected java.util.Set outputClasses
outputClassesSuperTypes
protected java.util.Set outputClassesSuperTypes
outputClassesSubTypes
protected java.util.Set outputClassesSubTypes
query
protected org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery query
queryResult
protected org.eclipse.hyades.models.hierarchy.extensions.QueryResult queryResult
requiredPaths
protected java.util.Set requiredPaths
rootClasses
protected java.util.Collection rootClasses
rootNodes
protected java.util.Collection rootNodes
targetResourceSet
protected org.eclipse.emf.ecore.resource.ResourceSet targetResourceSet
whereExpressionValuesIndex
protected java.util.Map whereExpressionValuesIndex
queryEvaluator
protected SimpleSearchQueryEngine.SimpleSearchQueryEvaluator queryEvaluator
result
protected SimpleSearchQueryEngine.EvalResult result
resetStack
protected java.util.List resetStack
resetParentsStack
protected java.util.List resetParentsStack
p
protected org.eclipse.hyades.models.hierarchy.util.PerfUtil p
firstResList
protected java.util.ArrayList firstResList
IS_COMPLETE
public static final int IS_COMPLETE
- See Also:
- Constant Field Values
IS_NOT_COMPLETE
public static final int IS_NOT_COMPLETE
- See Also:
- Constant Field Values
IS_TRUE
public static final int IS_TRUE
- See Also:
- Constant Field Values
IS_FALSE
public static final int IS_FALSE
- See Also:
- Constant Field Values
IS_APPLICABLE
public static final int IS_APPLICABLE
- See Also:
- Constant Field Values
SimpleSearchQueryEngine
public SimpleSearchQueryEngine(org.eclipse.hyades.models.hierarchy.extensions.SimpleSearchQuery query,
org.eclipse.emf.ecore.resource.ResourceSet targetResourceSet)
createEvalResult
public SimpleSearchQueryEngine.EvalResult createEvalResult(org.eclipse.hyades.models.hierarchy.extensions.Operand operand)
createEvalResult
protected SimpleSearchQueryEngine.EvalResult createEvalResult(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression expression)
addResultValue
protected void addResultValue(org.eclipse.emf.ecore.EObject element)
buildRequiredTraversalPaths
protected void buildRequiredTraversalPaths()
evalSelfAndParents
protected void evalSelfAndParents(org.eclipse.emf.ecore.EObject element)
resetSelfAndParents
protected void resetSelfAndParents(org.eclipse.emf.ecore.EObject element,
SimpleSearchQueryEngine.EvalResult result)
execute
public org.eclipse.hyades.models.hierarchy.extensions.QueryResult execute()
indexWhereExpression
protected void indexWhereExpression()
isOutputElement
protected boolean isOutputElement(org.eclipse.emf.ecore.EObject element)
isOutputElement
protected boolean isOutputElement(org.eclipse.emf.ecore.EClass eClass)
limitResult
protected void limitResult()
populateResult
protected void populateResult()
shouldPrune
protected boolean shouldPrune(org.eclipse.emf.ecore.EObject element,
int depth,
boolean children)
- Parameters:
element - depth - children - true when the the request is for element's children , false
for the remaining element's siblings
- Returns:
findOutputElementInParents
protected org.eclipse.emf.ecore.EObject findOutputElementInParents(org.eclipse.emf.ecore.EObject element)
- Searches for a parent of element which is outputElement, up to a root
node
- Parameters:
element -
- Returns:
traverseFeatures
protected boolean traverseFeatures(org.eclipse.emf.ecore.EObject element,
java.util.List resetList)
processResetListIsRequired
protected boolean processResetListIsRequired(org.eclipse.emf.ecore.EObject eObject)
processEObject
protected boolean processEObject(java.util.List resetList,
org.eclipse.emf.ecore.EObject eObject,
int pos)
addResultValueIfRequired
protected boolean addResultValueIfRequired(org.eclipse.emf.ecore.EObject eObject,
int pos)
populateRootNodesAndClasses
protected void populateRootNodesAndClasses()
prepareResult
protected void prepareResult()
processContainmentPath
protected boolean processContainmentPath(org.eclipse.emf.ecore.EClass element)
sortResult
protected void sortResult()
processResetList
protected void processResetList(java.util.List list,
int startPosition)
getRequiredPaths
public java.util.Set getRequiredPaths()
- Returns:
- the required paths Set, can be used to add required paths, the
paths that needs to be followed
getNonModeledElementValue
protected java.lang.Object getNonModeledElementValue(SimpleSearchQueryEngine.EvalResult evalResult,
org.eclipse.hyades.models.hierarchy.extensions.SimpleOperand simpleOperand)