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)
| 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 |
no test coverage detected