Exemplo n.º 1
0
    def __init__(self, request, url=None, view=None, format=None):

        views = {
            'dcat':
            pyldapi.View('Dataset Catalog Vocabulary - DCAT',
                         'The DCAT view, according to DCATv2 (2018)',
                         ['text/html'] + pyldapi.Renderer.RDF_MIMETYPES,
                         'text/html',
                         namespace='http://www.w3.org/ns/dcat'),
            'reg':
            pyldapi.View(
                'Registry Ontology view',
                'A \'core ontology for registry services\': items are listed in Registers with acceptance statuses',
                ['text/html'] + pyldapi.Renderer.RDF_MIMETYPES,
                'text/html',
                namespace='http://purl.org/linked-data/registry'),
            'void':
            pyldapi.View(
                'Vocabulary of Interlinked Data Ontology view',
                'VoID is \'an RDF Schema vocabulary for expressing metadata about RDF datasets\'',
                pyldapi.Renderer.RDF_MIMETYPES,
                'text/turtle',
                namespace='http://rdfs.org/ns/void'),
        }
        # push RofR properties up to the RofR constructor
        if url is None:
            url = request.url
        super().__init__(request, url, views, 'dcat', 'alternates_view.html')

        # replace automatically-calculated view & format with specifically set ones
        if view is not None:
            self.view = view

        if format is not None:
            self.format = format
Exemplo n.º 2
0
# -*- coding: utf-8 -*-
from flask import render_template, Response
from psycopg2 import sql
import pyldapi

import _config as config
from db import get_db_cursor
from model import NotFoundError

DCTView = pyldapi.View(
    'dct',
    "Dublin Core Terms from the Dublin Core Metadata Initiative", [
        "text/html", "text/turtle", "application/rdf+xml",
        "application/ld+json", "application/n-triples", "application/xml",
        "_internal"
    ],
    "text/html",
    namespace="http://purl.org/dc/terms/")
GNAFView = pyldapi.View(
    'gnaf',
    "G-NAF web page view. A simple human-readable, web page-only view, based on the data model of PSMA's G-NAF as of August, 2017",
    [
        "text/html", "text/turtle", "application/rdf+xml",
        "application/ld+json", "application/n-triples", "application/xml",
        "_internal"
    ],
    "text/html",
    namespace="http://reference.data.gov.au/def/ont/gnaf/")
ISOView = pyldapi.View(
    'ISO19160',
    "The OWL ontology view of the ISO 19160-1:2015 Address standard from the OGC's TC211 UML to OWL mapping: https://github.com/ISO-TC211/GOM/tree/master/isotc211_GOM_harmonizedOntology/19160-1/2015",
Exemplo n.º 3
0
# -*- coding: utf-8 -*-

from flask import render_template, Response
import pyldapi
from flask_paginate import Pagination

import geofabric._config as config
from geofabric.model import GFModel

HYFView = pyldapi.View(
    'hyfeatures',
    "Features modelled using the HY_Features ontology", [
        "text/html", "text/turtle", "application/rdf+xml",
        "application/ld+json", "application/n-triples"
    ],
    "text/turtle",
    namespace="https://www.opengis.net/def/appschema/hy_features/hyf/")
GEOFView = pyldapi.View(
    'geofabric',
    "A customised geofabric view based on HY_Features", [
        "text/html", "text/turtle", "application/rdf+xml",
        "application/ld+json", "application/n-triples", "application/gml+xml"
    ],
    "text/html",
    namespace="http://reference.data.gov.au/def/ont/geofabric/")
SchemaOrgView = pyldapi.View(
    'schemaorg',
    "An initiative by Bing, Google and Yahoo! to create and support a common set of schemas for structured data markup on web pages. It is serialised in JSON-LD",
    ["application/ld+json"],
    "application/ld+json",
    namespace="http://schema.org")
Exemplo n.º 4
0
# -*- coding: utf-8 -*-

from flask import render_template, Response, redirect

import pyldapi
from asgs_dataset.model import ASGSModel, NotFoundError
from asgs_dataset.model.asgs_feature import ASGSFeature

ASGSView = pyldapi.View(
    'ASGS',
    'View of an ASGS Feature using the ASGS ontology and those it imports',
    ['text/html', '_internal'] + pyldapi.Renderer.RDF_MIMETYPES,
    'text/turtle',
    languages=['en'],
    namespace='http://linked.data.gov.au/def/asgs#')
LOCIView = pyldapi.View(
    'LOCI',
    'View of an ASGS Feature using a mixture of ASGS ontology and LOCI harmonised properties',
    ['text/html', '_internal'] + pyldapi.Renderer.RDF_MIMETYPES,
    'text/turtle',
    languages=['en'],
    namespace='http://linked.data.gov.au/def/loci#')
GEOSparqlView = pyldapi.View(
    'GeoSPARQL',
    'A view of GeoSPARQL ontology properties and those of ontologies it imports only',
    pyldapi.Renderer.RDF_MIMETYPES,
    'text/turtle',
    languages=['en'],
    namespace='http://www.opengis.net/ont/geosparql#')
WFSView = pyldapi.View(
    'Web Feature Service',