public QueryMetaData getMetaData(HyperGraph graph, HGQueryCondition condition)
	{
		QueryMetaData x = QueryMetaData.ORACCESS.clone(condition); // assume we have ORACCESS, but check below
		boolean ispredicate = true;
		x.predicateCost = 0;
		for (HGQueryCondition sub : ((And)condition))
		{
			ConditionToQuery transformer = ToQueryMap.getInstance().get(sub.getClass());
			if (transformer == null)
				if (! (sub instanceof HGAtomPredicate))
					throw new HGException("Condition " + sub + " is not query translatable, nor a predicate.");
				else 
				{
					x.ordered = false;
					x.randomAccess = false;
					continue;
				}
			QueryMetaData subx = transformer.getMetaData(graph, sub);
			ispredicate = ispredicate && subx.predicateCost > -1;
			x.predicateCost += subx.predicateCost;					
			x.ordered = x.ordered && subx.ordered;
			x.randomAccess = x.randomAccess && subx.randomAccess;
		}
		if (!ispredicate)
			x.predicateCost = -1;
		return x;
	}