def project_view(uri): g = Graph() g.namespace_manager = namespace_manager p = graph.resource(uri) for triple in graph.triples((uri, None, None)): g.add(triple) for k in [x.identifier for x in p[DOAP.release]]: for triple in graph.triples((k, None, None)): g.add(triple) for k in [x.identifier for x in p[DOAP.maintainer]]: for triple in graph.triples((k, None, None)): g.add(triple) for k in [x.identifier for x in p[DOAP.developer]]: for triple in graph.triples((k, None, None)): g.add(triple) for k in [x.identifier for x in p[DOAP.repository]]: for triple in graph.triples((k, None, None)): g.add(triple) return g
def project_view(uri): g = Graph() g.namespace_manager = namespace_manager p = graph.resource(uri) for triple in graph.triples( (uri, None, None) ): g.add(triple) for k in [x.identifier for x in p[DOAP.release]]: for triple in graph.triples( (k, None, None) ): g.add(triple) for k in [x.identifier for x in p[DOAP.maintainer]]: for triple in graph.triples( (k, None, None) ): g.add(triple) for k in [x.identifier for x in p[DOAP.developer]]: for triple in graph.triples( (k, None, None) ): g.add(triple) for k in [x.identifier for x in p[DOAP.repository]]: for triple in graph.triples( (k, None, None) ): g.add(triple) return g
def default_view(uri): g = Graph() g.namespace_manager = namespace_manager for triple in graph.triples((uri, None, None)): g.add(triple) return g
def default_view(uri): g = Graph() g.namespace_manager = namespace_manager for triple in graph.triples( (uri, None, None) ): g.add(triple) return g