Examples of JenaRDFParser


Examples of com.github.jsonldjava.impl.JenaRDFParser

    return callback.getJenaModel();
  }

  @Override
  public String serialize(Model model) throws IOException {
    JenaRDFParser serializer = new JenaRDFParser();
    serializer.importModel(new RDFDataset(), model);
    try {
      return JSONUtils.toString(JSONLD.fromRDF(model, serializer));
    } catch (JSONLDProcessingError e) {
      throw new IOException(e);
    }
View Full Code Here

Examples of com.github.jsonldjava.jena.JenaRDFParser

            }
        };

        final Model modelResult = ModelFactory.createDefaultModel().read(
                new ByteArrayInputStream(turtle.getBytes()), "", "TURTLE");
        final JenaRDFParser parser = new JenaRDFParser();
        final Object json = JsonLdProcessor.fromRDF(modelResult, parser);

        assertTrue(Obj.equals(json, expected));
    }
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.