1 23 package org.objectweb.medor.query.lib; 24 25 import org.objectweb.medor.query.api.BinaryUnaryQueryNodeFactory; 26 import org.objectweb.medor.query.api.QueryNode; 27 import org.objectweb.medor.query.api.QueryTree; 28 import org.objectweb.medor.query.api.OperationType; 29 import org.objectweb.medor.api.TupleStructure; 30 import org.objectweb.medor.api.QueryNodeException; 31 import org.objectweb.medor.api.MedorException; 32 import org.objectweb.medor.expression.api.Expression; 33 34 public class BasicBinaryUnaryQueryNodeFactory 35 implements BinaryUnaryQueryNodeFactory { 36 37 public QueryNode createQueryNode(QueryTree child, short operationType, 38 Expression filter, 39 TupleStructure tupleStructure) 40 throws QueryNodeException { 41 try { 42 switch (operationType) { 43 case OperationType.SELECT_PROJECT: 44 default: 46 throw new QueryNodeException("QueryNode operation type error: " + operationType); 47 } 48 } catch (MedorException e) { 49 throw new QueryNodeException(e); 50 } 51 } 52 53 public QueryNode createQueryNode(QueryTree leftChild, QueryTree rightChild, 54 short operationType, 55 Expression filter, 56 TupleStructure tupleStructure) 57 throws QueryNodeException { 58 try { 59 switch (operationType) { 60 case OperationType.JOIN_PROJECT: 61 default: 63 throw new QueryNodeException("QueryNode operation type error: " + operationType); 64 } 65 } catch (MedorException e) { 66 throw new QueryNodeException(e); 67 } 68 } 69 } 70 | Popular Tags |