Examples of ILogEntryFieldVisitor


Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    if (renderer != null) {
      renderer.dispose();
      renderer = null;
    }
   
    ILogEntryFieldVisitor visitor = new ILogEntryFieldVisitor() {

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.DateLogEntryField)
       */
      @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    ALogEntryField<?, ?> fld = (ALogEntryField<?, ?>) sel.getFirstElement();
    sel = (IStructuredSelection) operatorComboViewer.getSelection();
    final Operator op = (Operator) sel.getFirstElement();
    final ARestriction<?>[] ret = new ARestriction<?>[1];
    // Use visitor pattern to call restriction factory
    fld.visit(new ILogEntryFieldVisitor() {

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
       */
      @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

        for (final IMemento clauseElem : clauses) {
          ALogEntryField<?, ?> fld = log.getDialect().getFieldProvider().findField(
              clauseElem.getString(ATTRIB_FIELD));
          final Operator op = Operators.getOperator(clauseElem.getInteger(ATTRIB_OPERATOR));
          final IRestrictionFactory rf = CorePlugin.getDefault().getRestrictionFactory();
          fld.visit(new ILogEntryFieldVisitor() {
            /* (non-Javadoc)
             * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
             */
            @Override
            public void visit(StringLogEntryField fld) {
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

                return false;
              }
            }
           
            // Setup visitor
            ILogEntryFieldVisitor visitor = new ILogEntryFieldVisitor() {

              /* (non-Javadoc)
               * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
               */
              @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.query.IRestrictionVisitor#visit(net.sf.logsaw.core.query.DateRestriction)
       */
      @Override
      public void visit(final DateRestriction restriction) {
        ILogEntryFieldVisitor visitor = new LogEntryFieldVisitorAdapter() {
          /* (non-Javadoc)
           * @see net.sf.logsaw.core.model.LogEntryFieldVisitorAdapter#visit(net.sf.logsaw.core.model.DateLogEntryField)
           */
          @Override
          public void visit(DateLogEntryField fld) {
            if (restriction.getOperator().equals(Operators.OPERATOR_BEFORE)) {
              query.add(NumericRangeQuery.newLongRange(
                  fld.getKey(), null,
                  fld.toIndexedValue(restriction.getValue()),
                  false, false), Occur.MUST);
            } else if (restriction.getOperator().equals(Operators.OPERATOR_AFTER)) {
              query.add(NumericRangeQuery.newLongRange(
                  fld.getKey(),
                  fld.toIndexedValue(restriction.getValue()), null,
                  false, false), Occur.MUST);
            }
          }
        };
        restriction.getField().visit(visitor);
      }

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.query.IRestrictionVisitor#visit(net.sf.logsaw.core.query.LevelRestriction)
       */
      @Override
      public void visit(final LevelRestriction restriction) {
        ILogEntryFieldVisitor visitor = new LogEntryFieldVisitorAdapter() {
          /* (non-Javadoc)
           * @see net.sf.logsaw.core.model.LogEntryFieldVisitorAdapter#visit(net.sf.logsaw.core.model.LevelLogEntryField)
           */
          @Override
          public void visit(LevelLogEntryField fld) {
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    for (int i = 0; i < hits.scoreDocs.length; i++) {
      final Document doc = searcher.doc(hits.scoreDocs[i].doc);
      final LogEntry entry = new LogEntry();
     
      // Setup visitor
      ILogEntryFieldVisitor visitor = new ILogEntryFieldVisitor() {

        /* (non-Javadoc)
         * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
         */
        @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

   */
  @Override
  public Set<Operator> getOperators(ALogEntryField<?, ?> fld) {
    Assert.isNotNull(fld, "fld"); //$NON-NLS-1$
    final Set<Operator> ret = new HashSet<Operator>();
    fld.visit(new ILogEntryFieldVisitor() {

      /* (non-Javadoc)
       * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
       */
      @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    Assert.isNotNull(strVal, "strVal"); //$NON-NLS-1$
    ALogEntryField<?, ?> fld = log.getDialect().getFieldProvider().findField(fldKey);
    final Operator op = Operators.getOperator(opId);
    final IRestrictionFactory rf = CorePlugin.getDefault().getRestrictionFactory();
    final ARestriction<?>[] ret = new ARestriction<?>[1];
    fld.visit(new ILogEntryFieldVisitor() {
      /* (non-Javadoc)
       * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
       */
      @Override
      public void visit(StringLogEntryField fld) {
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    }
    final LogEntry entry = (LogEntry) element;
    if ((columnIndex - 1) < fields.length) {
      final String[] ret = new String[1];
      // Setup visitor
      ILogEntryFieldVisitor visitor = new ILogEntryFieldVisitor() {
       
        /* (non-Javadoc)
         * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
         */
        @Override
 
View Full Code Here

Examples of net.sf.logsaw.core.field.ILogEntryFieldVisitor

    if ((fld == null) || (entry == null)) {
      return ""; //$NON-NLS-1$
    }
    final String[] ret = new String[1];
    // Setup visitor
    ILogEntryFieldVisitor visitor = new ILogEntryFieldVisitor() {
     
      /* (non-Javadoc)
       * @see net.sf.logsaw.core.model.ILogEntryFieldVisitor#visit(net.sf.logsaw.core.model.StringLogEntryField)
       */
      @Override
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.