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

Method writeDist

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

Write dcat distribution @param w XML writer @param con RDF triple store connection @param uri URI of the dataset @throws XMLStreamException

(XMLStreamWriter w, RepositoryConnection con,
		IRI uri)

Source from the content-addressed store, hash-verified

609 * @throws XMLStreamException
610 */
611 private static void writeDist(XMLStreamWriter w, RepositoryConnection con,
612 IRI uri) throws XMLStreamException {
613 w.writeStartElement("dcat:Distribution");
614 w.writeAttribute("rdf:about", uri.stringValue());
615
616 writeGeneric(w, con, uri);
617
618 writeReferences(w, con, uri, FOAF.PAGE, "foaf:page", "foaf:Document", false);
619 writeReferences(w, con, uri, DCAT.MEDIA_TYPE, "dcat:mediaType");
620 writeReferences(w, con, uri, DCTERMS.FORMAT, "dct:format");
621 writeReferences(w, con, uri, DCAT.COMPRESS_FORMAT, "dcat:compressFormat");
622 writeReferences(w, con, uri, DCAT.PACKAGE_FORMAT, "dcat:packageFormat");
623
624 // write as anyURI string
625 writeReferences(w, con, uri, DCAT.ACCESS_URL, "dcat:accessURL", "foaf:Document", false);
626 writeReferences(w, con, uri, DCAT.ACCESS_SERVICE, "dcat:accessService");
627 writeReferences(w, con, uri, DCAT.DOWNLOAD_URL, "dcat:downloadURL", "foaf:Document", false);
628
629 writeReferences(w, con, uri, DCTERMS.LICENSE, "dct:license");
630
631 writeReferences(w, con, uri, DCATAP_AVAILABILITY, "dcatap:availability");
632 writeLiterals(w, con, uri, DCAT.BYTE_SIZE, "dcat:byteSize");
633 writeLiterals(w, con, uri, CONTENT.CHARACTER_ENCODING, "cnt:characterEncoding");
634 writeLiterals(w, con, uri, DCAT.SPATIAL_RESOLUTION_IN_METERS, "dcat:spatialResolutionInMeters");
635 writeLiterals(w, con, uri, DCAT.TEMPORAL_RESOLUTION, "dcat:temporalResolution");
636
637 writeReferences(w, con, uri, MOBILITYDCAT.APPLICATION_LAYER_PROTOCOL, "mobilitydcatap:applicationLayerProtocol");
638 writeReferences(w, con, uri, MOBILITYDCAT.COMMUNICATION_METHOD, "mobilitydcatap:communicationMethod");
639 writeReferences(w, con, uri, MOBILITYDCAT.GRAMMAR, "mobilitydcatap:grammar");
640 writeReferences(w, con, uri, MOBILITYDCAT.HAS_MOBILITY_DATASET_STANDARD, "mobilitydcatap:mobilityDataStandard");
641 writeLiterals(w, con, uri, MOBILITYDCAT.DATA_FORMAT_NOTES, "mobilitydcatap:dataFormatNotes");
642
643 w.writeEndElement();
644 }
645
646 /**
647 * Write DCAT Dataset / Dataservice / Series

Callers 1

writeResourceMethod · 0.95

Calls 3

writeGenericMethod · 0.95
writeReferencesMethod · 0.95
writeLiteralsMethod · 0.95

Tested by

no test coverage detected