Examples of PatchLine


Examples of org.apache.marmotta.platform.ldp.patch.model.PatchLine

            final WildcardStatement ws = new WildcardStatement(
                    s.getSubject().equals(pS) ? null : s.getSubject(),
                    s.getPredicate().equals(pP) ? null : s.getPredicate(),
                    s.getObject().equals(pO) ? null : s.getObject()
            );
            patch.add(new PatchLine(PatchLine.Operator.DELETE, ws));
            pS = s.getSubject();
            pP = s.getPredicate();
            pO = s.getObject();
        }
        for (Statement s : additions) {
            final WildcardStatement ws = new WildcardStatement(
                    s.getSubject().equals(pS) ? null : s.getSubject(),
                    s.getPredicate().equals(pP) ? null : s.getPredicate(),
                    s.getObject().equals(pO) ? null : s.getObject()
            );
            patch.add(new PatchLine(PatchLine.Operator.ADD, ws));
            pS = s.getSubject();
            pP = s.getPredicate();
            pO = s.getObject();
        }
View Full Code Here

Examples of org.apache.marmotta.platform.ldp.patch.model.PatchLine

        // Optimize here to have a predictable order of the patch lines.
        final List<PatchLine> diff = RdfPatchUtil.diff(orig, repository, true);
        Assert.assertEquals("Wrong patch size", 3, diff.size());

        Assert.assertThat("Wrong patch", diff, IsIterableContainingInOrder.contains(
                new PatchLine(PatchLine.Operator.DELETE, new WildcardStatement(bob, FOAF.KNOWS, charlie)),
                new PatchLine(PatchLine.Operator.ADD, new WildcardStatement(null, null, alice)),
                new PatchLine(PatchLine.Operator.ADD, new WildcardStatement(charlie, FOAF.MBOX, mbox))
                ));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.