MCPcopy Create free account
hub / github.com/Fedict/dcattools / writeRole

Method writeRole

tools/src/main/java/be/gov/data/tools/EDP.java:421–431  ·  view source on GitHub ↗

Write geodcat roles of a dcat:Dataset @param w XML writer @param con RDF triple store connection @param uri URI of the dataset @param pred RDF predicate @throws XMLStreamException

(XMLStreamWriter w, RepositoryConnection con,
		IRI uri, IRI pred, String el)

Source from the content-addressed store, hash-verified

419 * @throws XMLStreamException
420 */
421 private static void writeRole(XMLStreamWriter w, RepositoryConnection con,
422 IRI uri, IRI pred, String el) throws XMLStreamException {
423 try (RepositoryResult<Statement> res = con.getStatements(uri, pred, null)) {
424 while (res.hasNext()) {
425 Resource agent = (Resource) res.next().getObject();
426 w.writeStartElement(el);
427 writeAgent(w, con, agent);
428 w.writeEndElement();
429 }
430 }
431 }
432
433 /**
434 * Write multiple references

Callers 1

writeResourceMethod · 0.95

Calls 1

writeAgentMethod · 0.95

Tested by

no test coverage detected