/** * <pre> * clear named * </pre> */ public void test_clear_named() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear named"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); expected.addChild(op); op.setScope(Scope.NAMED_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * clear default * </pre> */ public void test_clear_default() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear default"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); expected.addChild(op); op.setScope(Scope.DEFAULT_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * drop default * </pre> */ public void test_drop_default() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop default"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setScope(Scope.DEFAULT_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * drop named * </pre> */ public void test_drop_named() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop named"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setScope(Scope.NAMED_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * clear all * </pre> */ public void test_clear_all() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear all"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); op.setAllGraphs(true); op.setAllSolutionSets(true); expected.addChild(op); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * drop all * </pre> */ public void test_drop_all() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop all"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); op.setAllGraphs(true); op.setAllSolutionSets(true); expected.addChild(op); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <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> * drop named * </pre> */ public void test_drop_named() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop named"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setScope(Scope.NAMED_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * clear named * </pre> */ public void test_clear_named() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear named"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); expected.addChild(op); op.setScope(Scope.NAMED_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * clear default * </pre> */ public void test_clear_default() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear default"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); expected.addChild(op); op.setScope(Scope.DEFAULT_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * drop default * </pre> */ public void test_drop_default() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop default"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); expected.addChild(op); op.setScope(Scope.DEFAULT_CONTEXTS); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * drop all * </pre> */ public void test_drop_all() throws MalformedQueryException, TokenMgrError, ParseException { //drop ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "drop all"; final UpdateRoot expected = new UpdateRoot(); { final DropGraph op = new DropGraph(); op.setAllGraphs(true); op.setAllSolutionSets(true); expected.addChild(op); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <pre> * clear all * </pre> */ public void test_clear_all() throws MalformedQueryException, TokenMgrError, ParseException { //CLEAR ( SILENT )? (GRAPH IRIref | DEFAULT | NAMED | ALL ) final String sparql = "clear all"; final UpdateRoot expected = new UpdateRoot(); { final ClearGraph op = new ClearGraph(); op.setAllGraphs(true); op.setAllSolutionSets(true); expected.addChild(op); } final UpdateRoot actual = parseUpdate(sparql, baseURI); assertSameAST(sparql, expected, actual); }
/** * <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 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); }