incubator-oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r963445 - in /incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query: ./ filter/ filter/time/ filter/time/conv/ parser/
Date Mon, 12 Jul 2010 19:33:36 GMT
Author: mattmann
Date: Mon Jul 12 19:33:35 2010
New Revision: 963445

URL: http://svn.apache.org/viewvc?rev=963445&view=rev
Log:
- progress towards OODT-15 One trunk for all OODT components with top level build

Removed:
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/JJTQueryParserState.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/Node.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/ParseException.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jj
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParserConstants.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParserTokenManager.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParserTreeConstants.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleCharStream.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/SimpleNode.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/Token.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/TokenMgrError.java
Modified:
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/ComparisonQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomWrapperQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/FreeTextQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/NotQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryLogicalGroup.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/StdQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/TermQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/WrapperQueryExpression.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/FilterAlgorithm.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/QueryFilter.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEvent.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventFilterAlgorithm.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventQueryFilter.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/AsciiSortableVersionConverter.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/VersionConverter.java
    incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jjt

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/ComparisonQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/ComparisonQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/ComparisonQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/ComparisonQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -18,67 +18,69 @@
 package org.apache.oodt.cas.catalog.query;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
- * A TermQueryExpression which allows Term comparison
- * <p>
+ * 
+ * A TermQueryExpression which allows Term comparison.
+ * 
  */
 public class ComparisonQueryExpression extends TermQueryExpression {
 
-	public static enum Operator { EQUAL_TO("=="), LESS_THAN_EQUAL_TO("<="), GREATER_THAN_EQUAL_TO(">="), LESS_THAN("<"), GREATER_THAN(">"), LIKE("LIKE"); 
-	
-		private String value;
-		
-		Operator(String value) {
-			this.value = value;
-		}
-		
-		public static Operator getOperatorBySign(String sign) {
-			if (EQUAL_TO.value.equals(sign))
-				return EQUAL_TO;
-			else if (LESS_THAN_EQUAL_TO.value.equals(sign))
-				return LESS_THAN_EQUAL_TO;
-			else if (GREATER_THAN_EQUAL_TO.value.equals(sign))
-				return GREATER_THAN_EQUAL_TO;
-			else if (LESS_THAN.value.equals(sign))
-				return LESS_THAN;
-			else if (GREATER_THAN.value.equals(sign))
-				return GREATER_THAN;
-			else if (LIKE.value.equals(sign))
-				return LIKE;
-			else
-				throw new IllegalArgumentException("Not matching operator for '" + sign + "'");
-		}
-		
-		public String toString() {
-			return this.value;
-		}
-	
-	}
-	protected Operator operator;
-	
-	public void setOperator(Operator operator) {
-		this.operator = operator;
-	}
-	
-	public Operator getOperator() {
-		return this.operator;
-	}
-
-	@Override
-	public String toString() {
-		return "({" + this.bucketNames + "} " + this.getTerm().getName() + " " + this.operator + " " + this.getTerm().getValues() + ")";
-	}
-
-	@Override
-	public ComparisonQueryExpression clone() {
-		ComparisonQueryExpression newQE = new ComparisonQueryExpression();
-		newQE.operator = this.operator;
-		newQE.setTerm(this.term.clone());
-		newQE.setBucketNames(this.getBucketNames());
-		return newQE;
-	}
+  public static enum Operator {
+    EQUAL_TO("=="), LESS_THAN_EQUAL_TO("<="), GREATER_THAN_EQUAL_TO(">="), LESS_THAN(
+        "<"), GREATER_THAN(">"), LIKE("LIKE");
+
+    private String value;
+
+    Operator(String value) {
+      this.value = value;
+    }
+
+    public static Operator getOperatorBySign(String sign) {
+      if (EQUAL_TO.value.equals(sign))
+        return EQUAL_TO;
+      else if (LESS_THAN_EQUAL_TO.value.equals(sign))
+        return LESS_THAN_EQUAL_TO;
+      else if (GREATER_THAN_EQUAL_TO.value.equals(sign))
+        return GREATER_THAN_EQUAL_TO;
+      else if (LESS_THAN.value.equals(sign))
+        return LESS_THAN;
+      else if (GREATER_THAN.value.equals(sign))
+        return GREATER_THAN;
+      else if (LIKE.value.equals(sign))
+        return LIKE;
+      else
+        throw new IllegalArgumentException("Not matching operator for '" + sign
+            + "'");
+    }
+
+    public String toString() {
+      return this.value;
+    }
+
+  }
+
+  protected Operator operator;
+
+  public void setOperator(Operator operator) {
+    this.operator = operator;
+  }
+
+  public Operator getOperator() {
+    return this.operator;
+  }
+
+  @Override
+  public String toString() {
+    return "({" + this.bucketNames + "} " + this.getTerm().getName() + " "
+        + this.operator + " " + this.getTerm().getValues() + ")";
+  }
+
+  @Override
+  public ComparisonQueryExpression clone() {
+    ComparisonQueryExpression newQE = new ComparisonQueryExpression();
+    newQE.operator = this.operator;
+    newQE.setTerm(this.term.clone());
+    newQE.setBucketNames(this.getBucketNames());
+    return newQE;
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -21,53 +21,52 @@ package org.apache.oodt.cas.catalog.quer
 import java.util.Properties;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A Configurable QueryExpression
- * <p>
+ * 
  */
 public class CustomQueryExpression extends QueryExpression {
 
-	protected Properties properties;
-	protected String name;
-	
-	public CustomQueryExpression(String name) {
-		this(name, new Properties());
-	}
-	
-	public CustomQueryExpression(String name, Properties properties) {
-		super();
-		this.name = name;
-		if (properties != null)
-			this.properties = properties;
-		else 
-			this.properties = new Properties();
-	}
-	
-	public String getName() {
-		return this.name;
-	}
-	
-	public void setProperty(String key, String value) {
-		this.properties.put(key, value);
-	}
-	
-	public String getProperty(String key) {
-		return this.properties.getProperty(key);
-	}
-	
-	@Override
-	public CustomQueryExpression clone() {
-		CustomQueryExpression cqe = new CustomQueryExpression(this.name, (Properties) this.properties.clone());
-		cqe.setBucketNames(this.getBucketNames());
-		return cqe;
-	}
-
-	@Override
-	public String toString() {
-		return "({" + this.bucketNames + "} " + this.name + " : " + this.properties.toString() + ")";
-	}
-	
+  protected Properties properties;
+  protected String name;
+
+  public CustomQueryExpression(String name) {
+    this(name, new Properties());
+  }
+
+  public CustomQueryExpression(String name, Properties properties) {
+    super();
+    this.name = name;
+    if (properties != null)
+      this.properties = properties;
+    else
+      this.properties = new Properties();
+  }
+
+  public String getName() {
+    return this.name;
+  }
+
+  public void setProperty(String key, String value) {
+    this.properties.put(key, value);
+  }
+
+  public String getProperty(String key) {
+    return this.properties.getProperty(key);
+  }
+
+  @Override
+  public CustomQueryExpression clone() {
+    CustomQueryExpression cqe = new CustomQueryExpression(this.name,
+        (Properties) this.properties.clone());
+    cqe.setBucketNames(this.getBucketNames());
+    return cqe;
+  }
+
+  @Override
+  public String toString() {
+    return "({" + this.bucketNames + "} " + this.name + " : "
+        + this.properties.toString() + ")";
+  }
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomWrapperQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomWrapperQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomWrapperQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/CustomWrapperQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -17,38 +17,46 @@
 
 package org.apache.oodt.cas.catalog.query;
 
+/**
+ * 
+ * Describe your class here.
+ * 
+ */
 public class CustomWrapperQueryExpression extends WrapperQueryExpression {
 
-	protected String meaning;
-	
-	public CustomWrapperQueryExpression(String meaning) {
-		this.meaning = meaning;
-	}
-	
-	public CustomWrapperQueryExpression(String meaning, QueryExpression queryExpression) {
-		super(queryExpression);
-		this.meaning = meaning;
-	}
-	
-	public String getMeaning() {
-		return this.meaning;
-	}
-	
-	@Override
-	public CustomWrapperQueryExpression clone() {
-		CustomWrapperQueryExpression cwqe = new CustomWrapperQueryExpression(this.meaning, this.queryExpression.clone());
-		cwqe.setBucketNames(this.bucketNames);
-		return cwqe;
-	}
-
-	@Override
-	public String toString() {
-		return "({" + this.bucketNames + "} " + this.meaning + "(" + this.queryExpression + "))";
-	}
-
-	@Override
-	public boolean isValidWithNoSubExpression() {
-		return false;
-	}
+  protected String meaning;
+
+  public CustomWrapperQueryExpression(String meaning) {
+    this.meaning = meaning;
+  }
+
+  public CustomWrapperQueryExpression(String meaning,
+      QueryExpression queryExpression) {
+    super(queryExpression);
+    this.meaning = meaning;
+  }
+
+  public String getMeaning() {
+    return this.meaning;
+  }
+
+  @Override
+  public CustomWrapperQueryExpression clone() {
+    CustomWrapperQueryExpression cwqe = new CustomWrapperQueryExpression(
+        this.meaning, this.queryExpression.clone());
+    cwqe.setBucketNames(this.bucketNames);
+    return cwqe;
+  }
+
+  @Override
+  public String toString() {
+    return "({" + this.bucketNames + "} " + this.meaning + "("
+        + this.queryExpression + "))";
+  }
+
+  @Override
+  public boolean isValidWithNoSubExpression() {
+    return false;
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/FreeTextQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/FreeTextQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/FreeTextQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/FreeTextQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -25,77 +25,73 @@ import java.util.StringTokenizer;
 import java.util.Vector;
 
 /**
- * @author woollard
- * @author bfoster
- * @version $Revision$
  * 
- * <p>
  * A Free Text TermQueryExpression
- * </p>
  * 
  */
 public class FreeTextQueryExpression extends TermQueryExpression {
-	
-	private HashSet<String> noiseWordHash = new HashSet<String>(
-		Arrays.asList(new String[] { "a", "all", "am", "an", "and",
-        "any", "are", "as", "at", "be", "but", "can", "did", "do", "does",
-        "for", "from", "had", "has", "have", "here", "how", "i", "if",
-        "in", "is", "it", "no", "not", "of", "on", "or", "so", "that",
-        "the", "then", "there", "this", "to", "too", "up", "use", "what",
-        "when", "where", "who", "why", "you" }));
-
-    /**
-     * A method for adding unparsed free text to the FreeTextCriteria. Free text
-     * entered as a string is tokenized and punctuation and common words are
-     * dropped before the values are added to the query. In order to query for
-     * pre-parsed keywords, see the setValues method of this class.
-     * 
-     * @param text
-     *            The free text to be parsed and searched on.
-     */
-    public void addFreeText(String text) {
-        // remove punctuation from the text
-        text = text.replaceAll("\\p{Punct}+", "");
-
-        // tokenize string using default delimiters
-        StringTokenizer tok = new StringTokenizer(text);
-        String token = null;
-
-        // filter noise words and add to values vector
-        List<String> values = new Vector<String>();
-        while (tok.hasMoreElements()) {
-            token = tok.nextToken();
-            if (!noiseWordHash.contains(token))
-                values.add(token);
-        }
-        if (values.size() > 0) {
-        	values.addAll(this.term.getValues());
-        	this.term.setValues(values);
-        }
-    }
 
-    /**
-     * Implementation of the abstract method inherited from QueryCriteria for
-     * generating a human-parsable string version of the query criteria. Note
-     * that the returned String follows the Lucene query language.
-     * 
-     * @return The query as a String.
-     */
-    public String toString() {
-        String serial = "({" + this.bucketNames + "} " + this.term.getName() + " :|";
-        for (String value : this.term.getValues())
-            serial += "+" + value;
-        serial += "|: )";
-        return serial;
+  private HashSet<String> noiseWordHash = new HashSet<String>(Arrays
+      .asList(new String[] { "a", "all", "am", "an", "and", "any", "are", "as",
+          "at", "be", "but", "can", "did", "do", "does", "for", "from", "had",
+          "has", "have", "here", "how", "i", "if", "in", "is", "it", "no",
+          "not", "of", "on", "or", "so", "that", "the", "then", "there",
+          "this", "to", "too", "up", "use", "what", "when", "where", "who",
+          "why", "you" }));
+
+  /**
+   * A method for adding unparsed free text to the FreeTextCriteria. Free text
+   * entered as a string is tokenized and punctuation and common words are
+   * dropped before the values are added to the query. In order to query for
+   * pre-parsed keywords, see the setValues method of this class.
+   * 
+   * @param text
+   *          The free text to be parsed and searched on.
+   */
+  public void addFreeText(String text) {
+    // remove punctuation from the text
+    text = text.replaceAll("\\p{Punct}+", "");
+
+    // tokenize string using default delimiters
+    StringTokenizer tok = new StringTokenizer(text);
+    String token = null;
+
+    // filter noise words and add to values vector
+    List<String> values = new Vector<String>();
+    while (tok.hasMoreElements()) {
+      token = tok.nextToken();
+      if (!noiseWordHash.contains(token))
+        values.add(token);
     }
-    
-	@Override
-	public FreeTextQueryExpression clone() {
-		FreeTextQueryExpression ftQE = new FreeTextQueryExpression();
-		ftQE.noiseWordHash = new HashSet<String>(this.noiseWordHash);
-		ftQE.setTerm(this.term.clone());
-		ftQE.setBucketNames(this.bucketNames);
-		return ftQE;
-	}
+    if (values.size() > 0) {
+      values.addAll(this.term.getValues());
+      this.term.setValues(values);
+    }
+  }
+
+  /**
+   * Implementation of the abstract method inherited from QueryCriteria for
+   * generating a human-parsable string version of the query criteria. Note that
+   * the returned String follows the Lucene query language.
+   * 
+   * @return The query as a String.
+   */
+  public String toString() {
+    String serial = "({" + this.bucketNames + "} " + this.term.getName()
+        + " :|";
+    for (String value : this.term.getValues())
+      serial += "+" + value;
+    serial += "|: )";
+    return serial;
+  }
+
+  @Override
+  public FreeTextQueryExpression clone() {
+    FreeTextQueryExpression ftQE = new FreeTextQueryExpression();
+    ftQE.noiseWordHash = new HashSet<String>(this.noiseWordHash);
+    ftQE.setTerm(this.term.clone());
+    ftQE.setBucketNames(this.bucketNames);
+    return ftQE;
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/NotQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/NotQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/NotQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/NotQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -18,38 +18,36 @@
 package org.apache.oodt.cas.catalog.query;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A WrapperQueryExpression which signifies negation of wrapped QueryExpression
- * <p>
+ * 
  */
 public class NotQueryExpression extends WrapperQueryExpression {
-	
-	public NotQueryExpression() {
-		super();
-	}
-	
-	public NotQueryExpression(QueryExpression queryExpression) {
-		super(queryExpression);
-	}
-
-	@Override
-	public NotQueryExpression clone() {
-		NotQueryExpression nqe = new NotQueryExpression(this.queryExpression.clone());
-		nqe.setBucketNames(this.getBucketNames());
-		return nqe;
-	}
-	
-	@Override
-	public String toString() {
-		return "(NOT (" + this.queryExpression + "))";
-	}
-
-	@Override
-	public boolean isValidWithNoSubExpression() {
-		return false;
-	}
+
+  public NotQueryExpression() {
+    super();
+  }
+
+  public NotQueryExpression(QueryExpression queryExpression) {
+    super(queryExpression);
+  }
+
+  @Override
+  public NotQueryExpression clone() {
+    NotQueryExpression nqe = new NotQueryExpression(this.queryExpression
+        .clone());
+    nqe.setBucketNames(this.getBucketNames());
+    return nqe;
+  }
+
+  @Override
+  public String toString() {
+    return "(NOT (" + this.queryExpression + "))";
+  }
+
+  @Override
+  public boolean isValidWithNoSubExpression() {
+    return false;
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -17,37 +17,37 @@
 
 package org.apache.oodt.cas.catalog.query;
 
+//JDK imports
 import java.util.HashSet;
 import java.util.Set;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A Expression for querying against a CatalogServices Metadata
- * <p>
+ * 
  */
 public abstract class QueryExpression implements Cloneable {
-    
-    protected Set<String> bucketNames;
-    
-    public QueryExpression() {}
-    
-    public QueryExpression(Set<String> bucketNames) { 
-    	this.bucketNames = new HashSet<String>(bucketNames);
-    }
-    
-	public Set<String> getBucketNames() {
-		return (this.bucketNames != null) ? new HashSet<String>(this.bucketNames) : null;
-	}
-
-	public void setBucketNames(Set<String> bucketNames) {
-		this.bucketNames = bucketNames;
-	}
 
-	public abstract String toString();
+  protected Set<String> bucketNames;
+
+  public QueryExpression() {
+  }
+
+  public QueryExpression(Set<String> bucketNames) {
+    this.bucketNames = new HashSet<String>(bucketNames);
+  }
+
+  public Set<String> getBucketNames() {
+    return (this.bucketNames != null) ? new HashSet<String>(this.bucketNames)
+        : null;
+  }
+
+  public void setBucketNames(Set<String> bucketNames) {
+    this.bucketNames = bucketNames;
+  }
+
+  public abstract String toString();
+
+  public abstract QueryExpression clone();
 
-    public abstract QueryExpression clone();
-    
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryLogicalGroup.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryLogicalGroup.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryLogicalGroup.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/QueryLogicalGroup.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -23,93 +23,93 @@ import java.util.List;
 import java.util.Vector;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A QueryExpression which groups other QueryExpressions
- * <p>
+ * 
  */
 public class QueryLogicalGroup extends QueryExpression {
 
-	public enum Operator { AND, OR }
-	
-    protected Operator operator;
-
-    protected List<QueryExpression> queryExpressions;
-
-    public QueryLogicalGroup() {
-    	this(new Vector<QueryExpression>(), Operator.AND);
-    }
-    
-    public QueryLogicalGroup(List<QueryExpression> queryExpressions) {
-    	this(queryExpressions, Operator.AND);
-    }
-
-    public QueryLogicalGroup(List<QueryExpression> queryExpressions, Operator operator) {
-    	this.setExpressions(queryExpressions);
-    	this.setOperator(operator);
-    }
-    
-    public void setExpressions(List<QueryExpression> queryExpressions) {
-        this.queryExpressions = new Vector<QueryExpression>(queryExpressions);
-    }
-
-    /**
-     * 
-     * @param queryCriteria
-     */
-    public void addExpression(QueryExpression queryExpression) {
-    	this.queryExpressions.add(queryExpression);
-    }
-    
-    /**
-     * 
-     * @param queryCriterias
-     */
-    public void addExpressions(List<QueryExpression> queryExpressions) {
-    	this.queryExpressions.addAll(queryExpressions);
-    }
-
-    /**
-     * 
-     * @return
-     */
-    public List<QueryExpression> getExpressions() {
-        return Collections.unmodifiableList(this.queryExpressions);
-    }
-
-    /**
-     * 
-     * @param operator
-     */
-    public void setOperator(Operator operator) {
-        this.operator = operator;
-    }
-
-    /**
-     * 
-     * @return
-     */
-    public Operator getOperator() {
-        return this.operator;
-    }
-
-    @Override
-    public String toString() {
-        String query = "({" + this.bucketNames + "} " + this.operator + " : ";
-        for (QueryExpression queryExpression : this.queryExpressions)
-            query += queryExpression.toString() + ",";
-        return query.substring(0, query.length() - 1) + ")";
-    }
-    
-    public QueryLogicalGroup clone() {
-    	QueryLogicalGroup qlGroup = new QueryLogicalGroup();
-    	qlGroup.setBucketNames(this.getBucketNames());
-    	qlGroup.setOperator(this.operator);
-    	for (QueryExpression qe : this.queryExpressions)
-    		qlGroup.addExpression(qe.clone());
-    	return qlGroup;
-    }
-    
+  public enum Operator {
+    AND, OR
+  }
+
+  protected Operator operator;
+
+  protected List<QueryExpression> queryExpressions;
+
+  public QueryLogicalGroup() {
+    this(new Vector<QueryExpression>(), Operator.AND);
+  }
+
+  public QueryLogicalGroup(List<QueryExpression> queryExpressions) {
+    this(queryExpressions, Operator.AND);
+  }
+
+  public QueryLogicalGroup(List<QueryExpression> queryExpressions,
+      Operator operator) {
+    this.setExpressions(queryExpressions);
+    this.setOperator(operator);
+  }
+
+  public void setExpressions(List<QueryExpression> queryExpressions) {
+    this.queryExpressions = new Vector<QueryExpression>(queryExpressions);
+  }
+
+  /**
+   * 
+   * @param queryCriteria
+   */
+  public void addExpression(QueryExpression queryExpression) {
+    this.queryExpressions.add(queryExpression);
+  }
+
+  /**
+   * 
+   * @param queryCriterias
+   */
+  public void addExpressions(List<QueryExpression> queryExpressions) {
+    this.queryExpressions.addAll(queryExpressions);
+  }
+
+  /**
+   * 
+   * @return
+   */
+  public List<QueryExpression> getExpressions() {
+    return Collections.unmodifiableList(this.queryExpressions);
+  }
+
+  /**
+   * 
+   * @param operator
+   */
+  public void setOperator(Operator operator) {
+    this.operator = operator;
+  }
+
+  /**
+   * 
+   * @return
+   */
+  public Operator getOperator() {
+    return this.operator;
+  }
+
+  @Override
+  public String toString() {
+    String query = "({" + this.bucketNames + "} " + this.operator + " : ";
+    for (QueryExpression queryExpression : this.queryExpressions)
+      query += queryExpression.toString() + ",";
+    return query.substring(0, query.length() - 1) + ")";
+  }
+
+  public QueryLogicalGroup clone() {
+    QueryLogicalGroup qlGroup = new QueryLogicalGroup();
+    qlGroup.setBucketNames(this.getBucketNames());
+    qlGroup.setOperator(this.operator);
+    for (QueryExpression qe : this.queryExpressions)
+      qlGroup.addExpression(qe.clone());
+    return qlGroup;
+  }
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/StdQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/StdQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/StdQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/StdQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -21,31 +21,28 @@ package org.apache.oodt.cas.catalog.quer
 import java.util.Set;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A Standard QueryExpression
- * <p>
+ * 
  */
 public class StdQueryExpression extends QueryExpression {
 
-	public StdQueryExpression() {
-		super();
-	}
-	
-	public StdQueryExpression(Set<String> bucketNames) {
-		super(bucketNames);
-	}
-	
-	@Override
-	public StdQueryExpression clone() {
-		return new StdQueryExpression(this.getBucketNames());
-	}
-
-	@Override
-	public String toString() {
-		return "({" + this.bucketNames + "})";
-	}
+  public StdQueryExpression() {
+    super();
+  }
+
+  public StdQueryExpression(Set<String> bucketNames) {
+    super(bucketNames);
+  }
+
+  @Override
+  public StdQueryExpression clone() {
+    return new StdQueryExpression(this.getBucketNames());
+  }
+
+  @Override
+  public String toString() {
+    return "({" + this.bucketNames + "})";
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/TermQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/TermQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/TermQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/TermQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -21,25 +21,23 @@ package org.apache.oodt.cas.catalog.quer
 import org.apache.oodt.cas.catalog.term.Term;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A QueryExpression which wrappers a Term
- * <p>
+ * 
  */
-public abstract class TermQueryExpression extends QueryExpression implements Cloneable {
+public abstract class TermQueryExpression extends QueryExpression implements
+    Cloneable {
+
+  protected Term term;
+
+  public Term getTerm() {
+    return this.term;
+  }
+
+  public void setTerm(Term term) {
+    this.term = term;
+  }
 
-	protected Term term;
+  public abstract TermQueryExpression clone();
 
-    public Term getTerm() {
-		return this.term;
-	}
-
-    public void setTerm(Term term) {
-    	this.term = term;
-    }
-    	
-    public abstract TermQueryExpression clone();
-    
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/WrapperQueryExpression.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/WrapperQueryExpression.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/WrapperQueryExpression.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/WrapperQueryExpression.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -18,41 +18,38 @@
 package org.apache.oodt.cas.catalog.query;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A QueryExpression which wrappers another QueryExpression
- * <p>
+ * 
  */
 public abstract class WrapperQueryExpression extends QueryExpression {
 
-	protected QueryExpression queryExpression;
+  protected QueryExpression queryExpression;
+
+  public WrapperQueryExpression() {
+    super();
+  }
+
+  public WrapperQueryExpression(QueryExpression queryExpression) {
+    this();
+    this.queryExpression = queryExpression;
+  }
+
+  public QueryExpression getQueryExpression() {
+    return queryExpression;
+  }
+
+  public void setQueryExpression(QueryExpression queryExpression) {
+    this.queryExpression = queryExpression;
+  }
+
+  @Override
+  public String toString() {
+    return "(" + this.queryExpression + ")";
+  }
+
+  public abstract boolean isValidWithNoSubExpression();
 
-	public WrapperQueryExpression() {
-		super();
-	}
-	
-	public WrapperQueryExpression(QueryExpression queryExpression) {
-		this();
-		this.queryExpression = queryExpression;
-	}
-	
-	public QueryExpression getQueryExpression() {
-		return queryExpression;
-	}
-
-	public void setQueryExpression(QueryExpression queryExpression) {
-		this.queryExpression = queryExpression;
-	}
-
-	@Override
-	public String toString() {
-		return "(" + this.queryExpression + ")";
-	}
-	
-	public abstract boolean isValidWithNoSubExpression();
+  public abstract WrapperQueryExpression clone();
 
-	public abstract WrapperQueryExpression clone();
-	
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/FilterAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/FilterAlgorithm.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/FilterAlgorithm.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/FilterAlgorithm.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -22,15 +22,11 @@ import java.util.List;
 
 /**
  * 
- * @author bfoster
- * @version $Revision$
- *
- * <p>
  * An algorithm interface for defining how QueryFilter filters query results
- * <p>
+ * 
  */
 public abstract class FilterAlgorithm<FilterType> {
-    
-    public abstract List<FilterType> filter(List<FilterType> events); 
-    
+
+  public abstract List<FilterType> filter(List<FilterType> events);
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/QueryFilter.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/QueryFilter.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/QueryFilter.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/QueryFilter.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -24,38 +24,40 @@ import org.apache.oodt.cas.catalog.metad
 import java.util.List;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
- * A Filter interface for filtering queries
- * <p>
+ * 
+ * A Filter interface for filtering queries.
+ * 
  */
 public abstract class QueryFilter<FilterType> {
 
-	protected FilterAlgorithm<FilterType> filterAlgorithm;
-	
-	public QueryFilter() {}
-	
-	public QueryFilter(FilterAlgorithm<FilterType> filterAlgorithm) {
-		super();
-		this.filterAlgorithm = filterAlgorithm;
-	}
-	
-	public void setFilterAlgorithm(FilterAlgorithm<FilterType> filterAlgorithm) {
-		this.filterAlgorithm = filterAlgorithm;
-	}
-	
-	public FilterAlgorithm<FilterType> getFilterAlgorithm() {
-		return this.filterAlgorithm;
-	}
-	
-	public List<TransactionalMetadata> filterMetadataList(List<TransactionalMetadata> metadataToFilter) {
-		return this.filterTypeToMetadata(this.filterAlgorithm.filter(this.metadataToFilterType(metadataToFilter)));
-	}
-	
-	protected abstract List<FilterType> metadataToFilterType(List<TransactionalMetadata> metadataList);
-	
-	protected abstract List<TransactionalMetadata> filterTypeToMetadata(List<FilterType> filterObjects);
-	
+  protected FilterAlgorithm<FilterType> filterAlgorithm;
+
+  public QueryFilter() {
+  }
+
+  public QueryFilter(FilterAlgorithm<FilterType> filterAlgorithm) {
+    super();
+    this.filterAlgorithm = filterAlgorithm;
+  }
+
+  public void setFilterAlgorithm(FilterAlgorithm<FilterType> filterAlgorithm) {
+    this.filterAlgorithm = filterAlgorithm;
+  }
+
+  public FilterAlgorithm<FilterType> getFilterAlgorithm() {
+    return this.filterAlgorithm;
+  }
+
+  public List<TransactionalMetadata> filterMetadataList(
+      List<TransactionalMetadata> metadataToFilter) {
+    return this.filterTypeToMetadata(this.filterAlgorithm.filter(this
+        .metadataToFilterType(metadataToFilter)));
+  }
+
+  protected abstract List<FilterType> metadataToFilterType(
+      List<TransactionalMetadata> metadataList);
+
+  protected abstract List<TransactionalMetadata> filterTypeToMetadata(
+      List<FilterType> filterObjects);
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEvent.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEvent.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEvent.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEvent.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -22,21 +22,20 @@ import org.apache.oodt.cas.catalog.metad
 import org.apache.oodt.cas.commons.filter.ObjectTimeEvent;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
+ * 
  * A ObjectTimeEvent that holds TermBuckets
- * <p>
+ * 
  */
 public class MetadataTimeEvent extends ObjectTimeEvent<TransactionalMetadata> {
 
-    public MetadataTimeEvent(long startTime, long endTime, TransactionalMetadata timeObj) {
-		super(startTime, endTime, timeObj);
-    }
-	
-	public MetadataTimeEvent(long startTime, long endTime, double priority, TransactionalMetadata timeObj) {
-		super(startTime, endTime, priority, timeObj);
-	}
+  public MetadataTimeEvent(long startTime, long endTime,
+      TransactionalMetadata timeObj) {
+    super(startTime, endTime, timeObj);
+  }
+
+  public MetadataTimeEvent(long startTime, long endTime, double priority,
+      TransactionalMetadata timeObj) {
+    super(startTime, endTime, priority, timeObj);
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventFilterAlgorithm.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventFilterAlgorithm.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventFilterAlgorithm.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventFilterAlgorithm.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -26,33 +26,37 @@ import org.apache.oodt.cas.catalog.query
 import org.apache.oodt.cas.commons.filter.TimeEventWeightedHash;
 
 /**
- * @author bfoster
- * @version $Revision$
+ * 
+ * Describe your class here.
+ * 
  */
-public class MetadataTimeEventFilterAlgorithm extends FilterAlgorithm<MetadataTimeEvent> {
-	
-    protected long epsilon;
-    
-    public MetadataTimeEventFilterAlgorithm() {
-        this.epsilon = 0;
-    }
-    
-    public MetadataTimeEventFilterAlgorithm(long epsilon) {
-        this.epsilon = epsilon;
-    }
-    
-    public void setEpsilon(long epsilon) {
-        this.epsilon = epsilon;
-    }
-    
-    public long getEpsilon() {
-        return this.epsilon;
-    }
-
-	@Override
-	public List<MetadataTimeEvent> filter(List<MetadataTimeEvent> events) {
-		TimeEventWeightedHash timeEventHash = TimeEventWeightedHash.buildHash(events, this.epsilon);
-		return Collections.unmodifiableList((List<MetadataTimeEvent>) timeEventHash.getGreatestWeightedPathAsOrderedList());
-	}
-    
+public class MetadataTimeEventFilterAlgorithm extends
+    FilterAlgorithm<MetadataTimeEvent> {
+
+  protected long epsilon;
+
+  public MetadataTimeEventFilterAlgorithm() {
+    this.epsilon = 0;
+  }
+
+  public MetadataTimeEventFilterAlgorithm(long epsilon) {
+    this.epsilon = epsilon;
+  }
+
+  public void setEpsilon(long epsilon) {
+    this.epsilon = epsilon;
+  }
+
+  public long getEpsilon() {
+    return this.epsilon;
+  }
+
+  @Override
+  public List<MetadataTimeEvent> filter(List<MetadataTimeEvent> events) {
+    TimeEventWeightedHash timeEventHash = TimeEventWeightedHash.buildHash(
+        events, this.epsilon);
+    return Collections.unmodifiableList((List<MetadataTimeEvent>) timeEventHash
+        .getGreatestWeightedPathAsOrderedList());
+  }
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventQueryFilter.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventQueryFilter.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventQueryFilter.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/MetadataTimeEventQueryFilter.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -29,79 +29,83 @@ import org.apache.oodt.cas.catalog.query
 import org.apache.oodt.cas.catalog.query.filter.time.conv.VersionConverter;
 
 /**
- * @author bfoster
- * @version $Revision$
- *
- * <p>
- * A query filter that allows user to filter results in a complex query
- * <p>
+ * 
+ * A query filter that allows user to filter results in a complex query.
+ * 
  */
-public class MetadataTimeEventQueryFilter extends QueryFilter<MetadataTimeEvent> {
-
-    private String startDateTimeMetKey, endDateTimeMetKey, priorityMetKey;
-    private VersionConverter converter;
-
-    public MetadataTimeEventQueryFilter() {
-    	super();
-        this.converter = new AsciiSortableVersionConverter();
-    }
-
-    public String getStartDateTimeMetKey() {
-        return startDateTimeMetKey;
-    }
-
-    public void setStartDateTimeMetKey(String startDateTimeMetKey) {
-        this.startDateTimeMetKey = startDateTimeMetKey;
-    }
-
-    public String getEndDateTimeMetKey() {
-        return endDateTimeMetKey;
-    }
-
-    public void setEndDateTimeMetKey(String endDateTimeMetKey) {
-        this.endDateTimeMetKey = endDateTimeMetKey;
-    }
-
-    public String getPriorityMetKey() {
-        return priorityMetKey;
-    }
+public class MetadataTimeEventQueryFilter extends
+    QueryFilter<MetadataTimeEvent> {
 
-    public void setPriorityMetKey(String priorityMetKey) {
-        this.priorityMetKey = priorityMetKey;
-    }
-
-    public VersionConverter getConverter() {
-        return converter;
-    }
-
-    public void setConverter(VersionConverter converter) {
-        if (converter != null)
-            this.converter = converter;
-    }
+  private String startDateTimeMetKey, endDateTimeMetKey, priorityMetKey;
+  private VersionConverter converter;
 
-	@Override
-	protected List<MetadataTimeEvent> metadataToFilterType(List<TransactionalMetadata> metadataList) {
-		List<MetadataTimeEvent> timeEvents = new Vector<MetadataTimeEvent>();
-		for (TransactionalMetadata transactionalMetadata : metadataList) {
-			double priority = 0;
-			if (this.getPriorityMetKey() != null)
-				priority = Double.parseDouble(transactionalMetadata.getMetadata().getMetadata(this.priorityMetKey));
-			long startTime = Long.parseLong(transactionalMetadata.getMetadata().getMetadata(this.startDateTimeMetKey));
-			String endTimeString = transactionalMetadata.getMetadata().getMetadata(this.endDateTimeMetKey);
-			long endTime = startTime;
-			if (endTimeString != null)
-				endTime = Long.parseLong(endTimeString);
-			timeEvents.add(new MetadataTimeEvent(startTime, endTime, priority, transactionalMetadata));
-		}
-		return Collections.unmodifiableList(timeEvents);
-	}
-
-	@Override
-	protected List<TransactionalMetadata> filterTypeToMetadata(List<MetadataTimeEvent> filterObjects) {
-		List<TransactionalMetadata> metadataList = new Vector<TransactionalMetadata>();
-		for (MetadataTimeEvent timeEvent : filterObjects)
-			metadataList.add(timeEvent.getTimeObject());
-		return Collections.unmodifiableList(metadataList);
-	}
+  public MetadataTimeEventQueryFilter() {
+    super();
+    this.converter = new AsciiSortableVersionConverter();
+  }
+
+  public String getStartDateTimeMetKey() {
+    return startDateTimeMetKey;
+  }
+
+  public void setStartDateTimeMetKey(String startDateTimeMetKey) {
+    this.startDateTimeMetKey = startDateTimeMetKey;
+  }
+
+  public String getEndDateTimeMetKey() {
+    return endDateTimeMetKey;
+  }
+
+  public void setEndDateTimeMetKey(String endDateTimeMetKey) {
+    this.endDateTimeMetKey = endDateTimeMetKey;
+  }
+
+  public String getPriorityMetKey() {
+    return priorityMetKey;
+  }
+
+  public void setPriorityMetKey(String priorityMetKey) {
+    this.priorityMetKey = priorityMetKey;
+  }
+
+  public VersionConverter getConverter() {
+    return converter;
+  }
+
+  public void setConverter(VersionConverter converter) {
+    if (converter != null)
+      this.converter = converter;
+  }
+
+  @Override
+  protected List<MetadataTimeEvent> metadataToFilterType(
+      List<TransactionalMetadata> metadataList) {
+    List<MetadataTimeEvent> timeEvents = new Vector<MetadataTimeEvent>();
+    for (TransactionalMetadata transactionalMetadata : metadataList) {
+      double priority = 0;
+      if (this.getPriorityMetKey() != null)
+        priority = Double.parseDouble(transactionalMetadata.getMetadata()
+            .getMetadata(this.priorityMetKey));
+      long startTime = Long.parseLong(transactionalMetadata.getMetadata()
+          .getMetadata(this.startDateTimeMetKey));
+      String endTimeString = transactionalMetadata.getMetadata().getMetadata(
+          this.endDateTimeMetKey);
+      long endTime = startTime;
+      if (endTimeString != null)
+        endTime = Long.parseLong(endTimeString);
+      timeEvents.add(new MetadataTimeEvent(startTime, endTime, priority,
+          transactionalMetadata));
+    }
+    return Collections.unmodifiableList(timeEvents);
+  }
+
+  @Override
+  protected List<TransactionalMetadata> filterTypeToMetadata(
+      List<MetadataTimeEvent> filterObjects) {
+    List<TransactionalMetadata> metadataList = new Vector<TransactionalMetadata>();
+    for (MetadataTimeEvent timeEvent : filterObjects)
+      metadataList.add(timeEvent.getTimeObject());
+    return Collections.unmodifiableList(metadataList);
+  }
 
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/AsciiSortableVersionConverter.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/AsciiSortableVersionConverter.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/AsciiSortableVersionConverter.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/AsciiSortableVersionConverter.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -19,12 +19,8 @@ package org.apache.oodt.cas.catalog.quer
 
 /**
  * 
- * @author bfoster
- * @version $Revision$
- *
- * <p>
  * Converts a ascii sortable String version into a priority number
- * <p>
+ * 
  */
 public class AsciiSortableVersionConverter implements VersionConverter {
 

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/VersionConverter.java
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/VersionConverter.java?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/VersionConverter.java (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/filter/time/conv/VersionConverter.java Mon Jul 12 19:33:35 2010
@@ -1,4 +1,4 @@
-/*
+/**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
  * this work for additional information regarding copyright ownership.
@@ -19,15 +19,11 @@ package org.apache.oodt.cas.catalog.quer
 
 /**
  * 
- * @author bfoster
- * @version $Revision$
- *
- * <p>
  * An interface for converting a String version into a priority number
- * <p>
+ * 
  */
 public interface VersionConverter {
 
-    public double convertToPriority(String version) throws Exception;
-    
+  public double convertToPriority(String version) throws Exception;
+
 }

Modified: incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jjt
URL: http://svn.apache.org/viewvc/incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jjt?rev=963445&r1=963444&r2=963445&view=diff
==============================================================================
--- incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jjt (original)
+++ incubator/oodt/trunk/catalog/src/main/java/org/apache/oodt/cas/catalog/query/parser/QueryParser.jjt Mon Jul 12 19:33:35 2010
@@ -1,10 +1,19 @@
-//Copyright (c) 2009, California Institute of Technology.
-//ALL RIGHTS RESERVED. U.S. Government sponsorship acknowledged.
 //
-//$Id$
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements.  See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to You under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License.  You may obtain a copy of the License at
 //
-// @author bfoster
+//     http://www.apache.org/licenses/LICENSE-2.0
 //
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
 
 options {
   JDK_VERSION = "1.5";
@@ -12,19 +21,19 @@ options {
 }
 
 PARSER_BEGIN(QueryParser)
-	package gov.nasa.jpl.oodt.cas.catalog.query.parser;
+	package org.apache.oodt.cas.catalog.query.parser;
 
 	import java.io.ByteArrayInputStream;
 	import java.util.Arrays;
 	import java.util.HashSet;
 	import java.util.Vector;
 	import java.util.Properties;
-	import gov.nasa.jpl.oodt.cas.catalog.query.QueryExpression;
-	import gov.nasa.jpl.oodt.cas.catalog.query.QueryLogicalGroup;
-	import gov.nasa.jpl.oodt.cas.catalog.query.StdQueryExpression;
-	import gov.nasa.jpl.oodt.cas.catalog.query.ComparisonQueryExpression;
-	import gov.nasa.jpl.oodt.cas.catalog.query.CustomQueryExpression;
-	import gov.nasa.jpl.oodt.cas.catalog.term.Term;
+	import org.apache.oodt.cas.catalog.query.QueryExpression;
+	import org.apache.oodt.cas.catalog.query.QueryLogicalGroup;
+	import org.apache.oodt.cas.catalog.query.StdQueryExpression;
+	import org.apache.oodt.cas.catalog.query.ComparisonQueryExpression;
+	import org.apache.oodt.cas.catalog.query.CustomQueryExpression;
+	import org.apache.oodt.cas.catalog.term.Term;
 	
     public class QueryParser {
     	



Mime
View raw message