ResourceObjectSupport implements ResourceObject { @Override public String getTriples(RDFFormat format) { try { return getTriples(format, 1, null); } catch (RepositoryException e) { e.printStackTrace(); return null; } }  @Override String getTriples(RDFFormat format); @Override String getTriples(RDFFormat format, int maxPathLength, Resource... contexts); @Override void setResource(Resource resource); @ParameterTypes({}) Resource getResource(ObjectMessage msg); @Override void setResourceAsString(String resourceAsString); String getResourceAsString(); @Override void delete(); @Override void update();  }
@Test public void testGetTriples() throws Exception { Anno4j anno4j = new Anno4j(new SailRepository(new MemoryStore()), null, false); parseRDF(SpecialAnnotation.class, anno4j, GET_TRIPLES_TEST_GRAPH_DEFAULT, new URL("http: URI context = new URIImpl("http: parseRDF(SpecialAnnotation.class, anno4j, GET_TRIPLES_TEST_GRAPH_WITH_CONTEXT, new URL("http: SpecialAnnotation a = anno4j.findByID(SpecialAnnotation.class, "http: Anno4j parsed = new Anno4j(); String serialized = a.getTriples(RDFFormat.JSONLD, 1, null); parseRDF(SpecialAnnotation.class, parsed, serialized, new URL("http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: parsed = new Anno4j(); serialized = a.getTriples(RDFFormat.JSONLD, 2, null); parseRDF(SpecialAnnotation.class, parsed, serialized, new URL("http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: parsed = new Anno4j(); serialized = a.getTriples(RDFFormat.JSONLD, 2, context, null); parseRDF(SpecialAnnotation.class, parsed, serialized, new URL("http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNotNull(parsed.findByID(SpecialAnnotation.class, "http: assertNull(parsed.findByID(SpecialAnnotation.class, "http: }