Examples of RdfPatchParserImpl


Examples of org.apache.marmotta.platform.ldp.patch.parser.RdfPatchParserImpl

            }
        }
    }

    private static List<PatchLine> getPatch(ValueFactory valueFactory, InputStream is) throws ParseException {
        RdfPatchParser parser = new RdfPatchParserImpl(is);
        parser.setValueFactory(valueFactory);
        return parser.parsePatch();
    }
View Full Code Here

Examples of org.apache.marmotta.platform.ldp.patch.parser.RdfPatchParserImpl

*/
public class RdfPatchIOTest {

    @Test
    public void testIllustrative() throws Exception {
        RdfPatchParserImpl parser = new RdfPatchParserImpl(getClass().getResourceAsStream("/illustrative.rdfp"));
        checkRoundtrip(parser, Collections.<String, String>emptyMap());
    }
View Full Code Here

Examples of org.apache.marmotta.platform.ldp.patch.parser.RdfPatchParserImpl

        checkRoundtrip(parser, Collections.<String, String>emptyMap());
    }

    @Test
    public void testRdfPatch() throws ParseException {
        RdfPatchParserImpl parser = new RdfPatchParserImpl(getClass().getResourceAsStream("/rdf-patch.rdfp"));
        checkRoundtrip(parser, Collections.singletonMap(DCTERMS.PREFIX, DCTERMS.NAMESPACE));
    }
View Full Code Here

Examples of org.apache.marmotta.platform.ldp.patch.parser.RdfPatchParserImpl

    @Override
    public void patchResource(RepositoryConnection connection, URI uri, InputStream patchData, boolean strict) throws RepositoryException, ParseException, InvalidModificationException, InvalidPatchDocumentException {
        final Literal now = connection.getValueFactory().createLiteral(new Date());

        log.trace("parsing patch");
        List<PatchLine> patch = new RdfPatchParserImpl(patchData).parsePatch();

        // we are allowed to restrict the patch contents (Sec. ???)
        log.trace("checking for invalid patch statements");
        for (PatchLine patchLine : patch) {
            if (LDP.contains.equals(patchLine.getStatement().getPredicate())) {
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.