All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.oodt.cas.filemgr.structs.Query Maven / Gradle / Ivy

Go to download

The file management component of a Catalog and Archive Service. This component purposefully separates data stores and metadata stores as standard interfaces, and provides some out of the box backend implementations of them (including one based on the javax.sql.DataSource interface). This component provides everything that you need to catalog, archive and manage files, and directories, and their associated metadata.

There is a newer version: 1.9.1
Show newest version
/*
 * 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
 *
 *     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.
 */

package org.apache.oodt.cas.filemgr.structs;

//JDK imports
import java.util.List;
import java.util.Vector;

/**
 * @author mattmann
 * @author bfoster
 * @version $Revision$
 * 
 * 

* A Query is a {@link List} of {@link QueryCriteria}. *

* */ public class Query { /* the set of {@link QueryCriteria} for this Query */ private List criteria = null; /** *

* Default Constructor *

. */ public Query() { criteria = new Vector(); } /** * @param criteria */ public Query(List criteria) { if (criteria == null) this.criteria = new Vector(); else this.criteria = criteria; } /** * @return Returns the criteria. */ public List getCriteria() { return criteria; } /** * @param criteria * The criteria to set. */ public void setCriteria(List criteria) { if (criteria != null) this.criteria = criteria; } public void addCriterion(QueryCriteria qc) { criteria.add(qc); } /** * @return A String representation of this Query. */ public String toString() { StringBuffer rStr = new StringBuffer(); rStr.append("q="); int numCriteria = criteria.size(); for (int i = 0; i < numCriteria; i++) { QueryCriteria c = (QueryCriteria) criteria.get(i); rStr.append(c.toString()); if (i != numCriteria - 1) rStr.append(" AND "); } return rStr.toString(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy