Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.amentra.metamatrix.solr.visitor
Class SolrHierarchyVisitor

    java.lang.Object
      com.metamatrix.data.visitor.framework.AbstractLanguageVisitor
          com.metamatrix.data.visitor.framework.HierarchyVisitor
              com.amentra.metamatrix.solr.visitor.SolrHierarchyVisitor

All Implemented Interfaces:
  com.metamatrix.data.visitor.framework.LanguageObjectVisitor

    public class SolrHierarchyVisitor

extends com.metamatrix.data.visitor.framework.HierarchyVisitor

Translates MetaMatrix queries into Solr search strings, using the Hierarchy Visitor design pattern.

Author:
  Michael Walker

Constructor Summary
`SolrHierarchyVisitor(com.metamatrix.data.metadata.runtime.RuntimeMetadata md, com.metamatrix.data.api.ConnectorLogger logger, boolean useLowerCase)`

Method Summary
`java.lang.String` | `getExpressionString(com.metamatrix.data.language.IExpression e)`
`java.util.ArrayList<java.lang.String>` | `getFieldList()`
`java.util.HashMap<java.lang.String,java.lang.Class>` | `getFieldMap()`
`java.lang.Integer` | `getLimit()`
`java.lang.Integer` | `getOffset()`
`java.lang.String` | `getQueryString()` Search everything if the query was not defined by any where clause.
`void` | `processCompareCriteria(com.metamatrix.data.language.IExpression lhs, com.metamatrix.data.language.IExpression rhs, int op)`
`void` | `visit(com.metamatrix.data.language.ICompareCriteria criteria)`
`void` | `visit(com.metamatrix.data.language.ICompoundCriteria compoundCriteria)` Add parentheses, process each criterion, and add the appropriate operator to the search string.
`void` | `visit(com.metamatrix.data.language.IInCriteria criteria)`
`void` | `visit(com.metamatrix.data.language.ILikeCriteria criteria)`
`void` | `visit(com.metamatrix.data.language.ILimit limit)`
`void` | `visit(com.metamatrix.data.language.INotCriteria criteria)`
`void` | `visit(com.metamatrix.data.language.ISelectSymbol symbol)` Extract the select symbols (columns) from the query.

Methods inherited from class com.metamatrix.data.visitor.framework.HierarchyVisitor
`reset, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit`

Methods inherited from class com.metamatrix.data.visitor.framework.AbstractLanguageVisitor
`visit, visit, visitNode, visitNodes, visitNodes`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SolrHierarchyVisitor

    public SolrHierarchyVisitor(com.metamatrix.data.metadata.runtime.RuntimeMetadata md,
                                com.metamatrix.data.api.ConnectorLogger logger,
                                boolean useLowerCase)

Method Detail

### visit

    public void visit(com.metamatrix.data.language.ISelectSymbol symbol)

  Extract the select symbols (columns) from the query.

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### visit

    public void visit(com.metamatrix.data.language.ILimit limit)

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.AbstractLanguageVisitor`

### visit

    public void visit(com.metamatrix.data.language.INotCriteria criteria)

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### visit

    public void visit(com.metamatrix.data.language.ILikeCriteria criteria)

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### visit

    public void visit(com.metamatrix.data.language.ICompareCriteria criteria)

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### visit

    public void visit(com.metamatrix.data.language.IInCriteria criteria)

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### getExpressionString

    public java.lang.String getExpressionString(com.metamatrix.data.language.IExpression e)
                                         throws com.metamatrix.data.exception.ConnectorException

  Throws:
    `com.metamatrix.data.exception.ConnectorException`

### processCompareCriteria

    public void processCompareCriteria(com.metamatrix.data.language.IExpression lhs,
                                       com.metamatrix.data.language.IExpression rhs,
                                       int op)
                                throws com.metamatrix.data.exception.ConnectorException

  Throws:
    `com.metamatrix.data.exception.ConnectorException`

### visit

    public void visit(com.metamatrix.data.language.ICompoundCriteria compoundCriteria)

  Add parentheses, process each criterion, and add the appropriate operator to the search string. If we instead chose to build a Solr Query object, we'd create a boolean query here, processing each criterion and adding it to the boolean query.

  Specified by:
    `visit` in interface `com.metamatrix.data.visitor.framework.LanguageObjectVisitor`
  Overrides:
    `visit` in class `com.metamatrix.data.visitor.framework.HierarchyVisitor`

### getFieldList

    public java.util.ArrayList<java.lang.String> getFieldList()

### getFieldMap

    public java.util.HashMap<java.lang.String,java.lang.Class> getFieldMap()

### getLimit

    public java.lang.Integer getLimit()

### getOffset

    public java.lang.Integer getOffset()

### getQueryString

    public java.lang.String getQueryString()

  Search everything if the query was not defined by any where clause.

  Returns:
    String Solr queryString

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD