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

Method writeReference

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

Write RDF reference @param w XML writer @param el element name @param uri ID @throws XMLStreamException

(XMLStreamWriter w, String el, Value uri)

Source from the content-addressed store, hash-verified

468 * @throws XMLStreamException
469 */
470 private static void writeReference(XMLStreamWriter w, String el, Value uri) throws XMLStreamException {
471 if (uri instanceof IRI iri) {
472 w.writeEmptyElement(el);
473 w.writeAttribute("rdf:resource", iri.stringValue());
474 } else {
475 LOG.error("Element {}: not a reference IRI {}, skipping", el, uri.stringValue());
476 }
477 }
478
479 /**
480 * Write multiple references

Callers 1

writeReferencesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected