Java Code Examples for com.thinkaurelius.titan.graphdb.query.condition.Condition

The following are top voted examples for showing how to use com.thinkaurelius.titan.graphdb.query.condition.Condition. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: titan1withtp3.1   File: IndexQuery.java   View source code 5 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders, int limit) {
    super(limit);
    Preconditions.checkNotNull(store);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    this.condition = condition;
    this.orders = orders;
    this.store = store;

    this.hashcode = new HashCodeBuilder().append(condition).append(store).append(orders).append(limit).toHashCode();
}
 
Example 2
Project: titan1withtp3.1   File: BaseVertexCentricQuery.java   View source code 5 votes vote down vote up
public BaseVertexCentricQuery(Condition<TitanRelation> condition, Direction direction,
                              List<BackendQueryHolder<SliceQuery>> queries, OrderList orders,
                              int limit) {
    super(limit);
    Preconditions.checkArgument(condition != null && queries != null && direction != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition) && limit>=0);
    this.condition = condition;
    this.queries = queries;
    this.orders = orders;
    this.direction=direction;
}
 
Example 3
Project: titan1withtp3.1   File: VertexCentricQuery.java   View source code 5 votes vote down vote up
public VertexCentricQuery(InternalVertex vertex, Condition<TitanRelation> condition,
                          Direction direction,
                          List<BackendQueryHolder<SliceQuery>> queries,
                          OrderList orders,
                          int limit) {
    super(condition, direction, queries, orders, limit);
    Preconditions.checkNotNull(vertex);
    this.vertex = vertex;
}
 
Example 4
Project: titan1withtp3.1   File: GraphCentricQuery.java   View source code 5 votes vote down vote up
public GraphCentricQuery(ElementCategory resultType, Condition<TitanElement> condition, OrderList orders,
                         BackendQueryHolder<JointIndexQuery> indexQuery, int limit) {
    super(limit);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null && orders.isImmutable());
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    Preconditions.checkNotNull(resultType);
    Preconditions.checkNotNull(indexQuery);
    this.condition = condition;
    this.orders = orders;
    this.resultType = resultType;
    this.indexQuery = indexQuery;
}
 
Example 5
Project: titan1.0.1.kafka   File: IndexQuery.java   View source code 5 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders, int limit) {
    super(limit);
    Preconditions.checkNotNull(store);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    this.condition = condition;
    this.orders = orders;
    this.store = store;

    this.hashcode = new HashCodeBuilder().append(condition).append(store).append(orders).append(limit).toHashCode();
}
 
Example 6
Project: titan1.0.1.kafka   File: BaseVertexCentricQuery.java   View source code 5 votes vote down vote up
public BaseVertexCentricQuery(Condition<TitanRelation> condition, Direction direction,
                              List<BackendQueryHolder<SliceQuery>> queries, OrderList orders,
                              int limit) {
    super(limit);
    Preconditions.checkArgument(condition != null && queries != null && direction != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition) && limit>=0);
    this.condition = condition;
    this.queries = queries;
    this.orders = orders;
    this.direction=direction;
}
 
Example 7
Project: titan1.0.1.kafka   File: VertexCentricQuery.java   View source code 5 votes vote down vote up
public VertexCentricQuery(InternalVertex vertex, Condition<TitanRelation> condition,
                          Direction direction,
                          List<BackendQueryHolder<SliceQuery>> queries,
                          OrderList orders,
                          int limit) {
    super(condition, direction, queries, orders, limit);
    Preconditions.checkNotNull(vertex);
    this.vertex = vertex;
}
 
Example 8
Project: titan1.0.1.kafka   File: GraphCentricQuery.java   View source code 5 votes vote down vote up
public GraphCentricQuery(ElementCategory resultType, Condition<TitanElement> condition, OrderList orders,
                         BackendQueryHolder<JointIndexQuery> indexQuery, int limit) {
    super(limit);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null && orders.isImmutable());
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    Preconditions.checkNotNull(resultType);
    Preconditions.checkNotNull(indexQuery);
    this.condition = condition;
    this.orders = orders;
    this.resultType = resultType;
    this.indexQuery = indexQuery;
}
 
Example 9
Project: titan0.5.4-hbase1.1.1-custom   File: IndexQuery.java   View source code 5 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders, int limit) {
    super(limit);
    Preconditions.checkNotNull(store);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    this.condition = condition;
    this.orders = orders;
    this.store = store;

    this.hashcode = new HashCodeBuilder().append(condition).append(store).append(orders).append(limit).toHashCode();
}
 
Example 10
Project: titan0.5.4-hbase1.1.1-custom   File: StandardQueryDescription.java   View source code 5 votes vote down vote up
private StandardQueryDescription(int numCombinedQueries, Condition queryCondition, OrderList queryOrder, Query query, List<StandardSubQuery> subQueries) {
    Preconditions.checkArgument(numCombinedQueries>=1 && query!=null && subQueries!=null && queryCondition!=null && queryOrder!=null);
    this.noCombinedQueries = numCombinedQueries;
    this.queryCondition = queryCondition;
    this.queryOrder = queryOrder;
    this.toString = query.toString();
    this.subQueries = subQueries;
}
 
Example 11
Project: titan0.5.4-hbase1.1.1-custom   File: BaseVertexCentricQuery.java   View source code 5 votes vote down vote up
public BaseVertexCentricQuery(Condition<TitanRelation> condition, Direction direction,
                              List<BackendQueryHolder<SliceQuery>> queries, OrderList orders,
                              int limit) {
    super(limit);
    Preconditions.checkArgument(condition != null && queries != null && direction != null);
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition) && limit>=0);
    this.condition = condition;
    this.queries = queries;
    this.orders = orders;
    this.direction=direction;
}
 
Example 12
Project: titan0.5.4-hbase1.1.1-custom   File: VertexCentricQuery.java   View source code 5 votes vote down vote up
public VertexCentricQuery(InternalVertex vertex, Condition<TitanRelation> condition,
                          Direction direction,
                          List<BackendQueryHolder<SliceQuery>> queries,
                          OrderList orders,
                          int limit) {
    super(condition, direction, queries, orders, limit);
    Preconditions.checkNotNull(vertex);
    this.vertex = vertex;
}
 
Example 13
Project: titan0.5.4-hbase1.1.1-custom   File: GraphCentricQuery.java   View source code 5 votes vote down vote up
public GraphCentricQuery(ElementCategory resultType, Condition<TitanElement> condition, OrderList orders,
                         BackendQueryHolder<JointIndexQuery> indexQuery, int limit) {
    super(limit);
    Preconditions.checkNotNull(condition);
    Preconditions.checkArgument(orders != null && orders.isImmutable());
    Preconditions.checkArgument(QueryUtil.isQueryNormalForm(condition));
    Preconditions.checkNotNull(resultType);
    Preconditions.checkNotNull(indexQuery);
    this.condition = condition;
    this.orders = orders;
    this.resultType = resultType;
    this.indexQuery = indexQuery;
}
 
Example 14
Project: titan1withtp3.1   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders) {
    this(store, condition, orders, Query.NO_LIMIT);
}
 
Example 15
Project: titan1withtp3.1   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition) {
    this(store, condition, NO_ORDER, Query.NO_LIMIT);
}
 
Example 16
Project: titan1withtp3.1   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, int limit) {
    this(store, condition, NO_ORDER, limit);
}
 
Example 17
Project: titan1withtp3.1   File: IndexQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 18
Project: titan1withtp3.1   File: BaseVertexCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanRelation> getCondition() {
    return condition;
}
 
Example 19
Project: titan1withtp3.1   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
    Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
    return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
            new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
                    true, false), 0);
}
 
Example 20
Project: titan1withtp3.1   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 21
Project: titan1.0.1.kafka   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders) {
    this(store, condition, orders, Query.NO_LIMIT);
}
 
Example 22
Project: titan1.0.1.kafka   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition) {
    this(store, condition, NO_ORDER, Query.NO_LIMIT);
}
 
Example 23
Project: titan1.0.1.kafka   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, int limit) {
    this(store, condition, NO_ORDER, limit);
}
 
Example 24
Project: titan1.0.1.kafka   File: IndexQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 25
Project: titan1.0.1.kafka   File: BaseVertexCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanRelation> getCondition() {
    return condition;
}
 
Example 26
Project: titan1.0.1.kafka   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
    Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
    return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
            new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
                    true, false), 0);
}
 
Example 27
Project: titan1.0.1.kafka   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 28
Project: titan0.5.4-hbase1.1.1-custom   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, ImmutableList<OrderEntry> orders) {
    this(store, condition, orders, Query.NO_LIMIT);
}
 
Example 29
Project: titan0.5.4-hbase1.1.1-custom   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition) {
    this(store, condition, NO_ORDER, Query.NO_LIMIT);
}
 
Example 30
Project: titan0.5.4-hbase1.1.1-custom   File: IndexQuery.java   View source code 4 votes vote down vote up
public IndexQuery(String store, Condition condition, int limit) {
    this(store, condition, NO_ORDER, limit);
}
 
Example 31
Project: titan0.5.4-hbase1.1.1-custom   File: IndexQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 32
Project: titan0.5.4-hbase1.1.1-custom   File: BaseVertexCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanRelation> getCondition() {
    return condition;
}
 
Example 33
Project: titan0.5.4-hbase1.1.1-custom   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public static final GraphCentricQuery emptyQuery(ElementCategory resultType) {
    Condition<TitanElement> cond = new FixedCondition<TitanElement>(false);
    return new GraphCentricQuery(resultType, cond, OrderList.NO_ORDER,
            new BackendQueryHolder<JointIndexQuery>(new JointIndexQuery(),
                    true, false, null), 0);
}
 
Example 34
Project: titan0.5.4-hbase1.1.1-custom   File: GraphCentricQuery.java   View source code 4 votes vote down vote up
public Condition<TitanElement> getCondition() {
    return condition;
}
 
Example 35
Project: titan0.5.4-hbase1.1.1-custom   File: StandardQueryDescription.java   View source code 2 votes vote down vote up
/**
 * Returns the query condition for this query
 * @return
 */
public Condition getQueryCondition() {
    return queryCondition;
}