/** * <pre> * drop graph <http://www.bigdata.com/data> * </pre> */ public void test_drop_graph() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop graph <http://www.bigdata.com/data>"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * create graph <http://www.bigdata.com/graph1> * </pre> */ public void test_create() throws MalformedQueryException, TokenMgrError, ParseException { //CREATE ( SILENT )? GRAPH IRIref final String sparql = "create graph <http://www.bigdata.com/graph1>"; final UpdateRoot expected = new UpdateRoot(); { final CreateGraph op = new CreateGraph(); expected.addChild(op); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * load <http://www.bigdata.com/data> * </pre> */ public void test_load_graph() throws MalformedQueryException, TokenMgrError, ParseException { //LOAD ( SILENT )? IRIref_from ( INTO GRAPH IRIref_to )? final String sparql = "load <http://www.bigdata.com/data>"; final UpdateRoot expected = new UpdateRoot(); { final LoadGraph op = new LoadGraph(); expected.addChild(op); final RDFParserOptions options = new RDFParserOptions(); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * copy silent default to <http://www.bigdata.com/graph2> * </pre> */ public void test_silent_copy_default_to_graph() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "copy silent default to <http://www.bigdata.com/graph2>"; final UpdateRoot expected = new UpdateRoot(); { final CopyGraph op = new CopyGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph2")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * move silent default to <http://www.bigdata.com/graph2> * </pre> */ public void test_silent_move_default_to_graph() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "move silent default to <http://www.bigdata.com/graph2>"; final UpdateRoot expected = new UpdateRoot(); { final MoveGraph op = new MoveGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph2")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * add silent default to <http://www.bigdata.com/graph2> * </pre> */ public void test_silent_add_default_to_graph() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "add silent default to <http://www.bigdata.com/graph2>"; final UpdateRoot expected = new UpdateRoot(); { final AddGraph op = new AddGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph2")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * create silent graph <http://www.bigdata.com/graph1> * </pre> */ public void test_create_silent() throws MalformedQueryException, TokenMgrError, ParseException { //CREATE ( SILENT )? GRAPH IRIref final String sparql = "create silent graph <http://www.bigdata.com/graph1>"; final UpdateRoot expected = new UpdateRoot(); { final CreateGraph op = new CreateGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * move silent <http://www.bigdata.com/graph1> to default * </pre> */ public void test_move_graph_to_default() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "move silent <http://www.bigdata.com/graph1> to default"; final UpdateRoot expected = new UpdateRoot(); { final MoveGraph op = new MoveGraph(); expected.addChild(op); op.setSilent(true); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data"))));
op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data"))));
op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data"))));
/** * <pre> * drop graph <http://www.bigdata.com/data> * </pre> */ public void test_drop_graph() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop graph <http://www.bigdata.com/data>"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * create graph <http://www.bigdata.com/graph1> * </pre> */ public void test_create() throws MalformedQueryException, TokenMgrError, ParseException { //CREATE ( SILENT )? GRAPH IRIref final String sparql = "create graph <http://www.bigdata.com/graph1>"; final UpdateRoot expected = new UpdateRoot(); { final CreateGraph op = new CreateGraph(); expected.addChild(op); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * create silent graph <http://www.bigdata.com/graph1> * </pre> */ public void test_create_silent() throws MalformedQueryException, TokenMgrError, ParseException { //CREATE ( SILENT )? GRAPH IRIref final String sparql = "create silent graph <http://www.bigdata.com/graph1>"; final UpdateRoot expected = new UpdateRoot(); { final CreateGraph op = new CreateGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * move silent <http://www.bigdata.com/graph1> to default * </pre> */ public void test_move_graph_to_default() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "move silent <http://www.bigdata.com/graph1> to default"; final UpdateRoot expected = new UpdateRoot(); { final MoveGraph op = new MoveGraph(); expected.addChild(op); op.setSilent(true); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * add silent <http://www.bigdata.com/graph1> to default * </pre> */ public void test_add_graph_to_default() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "add silent <http://www.bigdata.com/graph1> to default"; final UpdateRoot expected = new UpdateRoot(); { final AddGraph op = new AddGraph(); expected.addChild(op); op.setSilent(true); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * add silent default to <http://www.bigdata.com/graph2> * </pre> */ public void test_silent_add_default_to_graph() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "add silent default to <http://www.bigdata.com/graph2>"; final UpdateRoot expected = new UpdateRoot(); { final AddGraph op = new AddGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph2")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * copy silent default to <http://www.bigdata.com/graph2> * </pre> */ public void test_silent_copy_default_to_graph() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "copy silent default to <http://www.bigdata.com/graph2>"; final UpdateRoot expected = new UpdateRoot(); { final CopyGraph op = new CopyGraph(); expected.addChild(op); op.setSilent(true); op.setTargetGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph2")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * load <http://www.bigdata.com/data> * </pre> */ public void test_load_graph() throws MalformedQueryException, TokenMgrError, ParseException { //LOAD ( SILENT )? IRIref_from ( INTO GRAPH IRIref_to )? final String sparql = "load <http://www.bigdata.com/data>"; final UpdateRoot expected = new UpdateRoot(); { final LoadGraph op = new LoadGraph(); expected.addChild(op); final RDFParserOptions options = new RDFParserOptions(); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/data")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * copy silent <http://www.bigdata.com/graph1> to default * </pre> */ public void test_copy_graph_to_default() throws MalformedQueryException, TokenMgrError, ParseException { //COPY ( SILENT )? ( ( GRAPH )? IRIref_from | DEFAULT) TO ( ( GRAPH )? IRIref_to | DEFAULT ) final String sparql = "copy silent <http://www.bigdata.com/graph1> to default"; final UpdateRoot expected = new UpdateRoot(); { final CopyGraph op = new CopyGraph(); expected.addChild(op); op.setSilent(true); op.setSourceGraph(new ConstantNode(makeIV(valueFactory .createURI("http://www.bigdata.com/graph1")))); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }