innoq / iqvoc

iQvoc - A SKOS(-XL) Vocabulary Management System for the Semantic Web
http://iqvoc.net/
Other
117 stars 44 forks source link

http://try.iqvoc.net/hierarchy/artistic_hobbies.ttl?dir=down&depth=1 doesn't work #356

Closed etcware closed 7 years ago

etcware commented 7 years ago

I would like to get the subtree from a top concept but it doesn't work. It works only from second level concepts. Is an API available to get that subtree? Thanks Alessandra

mjansing commented 7 years ago

Is an API available to get that subtree?

Yes it is. The Hierarchy API is your friend: http://try.iqvoc.net/apidoc/

You have to use the uri slug for your api request (which is _dbec7ab6 and not artistic_hobbies (http://try.iqvoc.net/hierarchy/_dbec7ab6.ttl?dir=down&depth=1):

screen shot 2017-02-01 at 08 48 16
curl http://try.iqvoc.net/hierarchy/_dbec7ab6.ttl\?dir\=down\&depth\=1
@prefix : <http://try.iqvoc.net/>.
@prefix dct: <http://purl.org/dc/terms/>.
@prefix foaf: <http://xmlns.com/foaf/spec/>.
@prefix iqvoc: <http://try.iqvoc.net/schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix schema: <http://try.iqvoc.net/schema#>.
@prefix skos: <http://www.w3.org/2004/02/skos/core#>.
@prefix void: <http://rdfs.org/ns/void#>.

:dance a skos:Concept;
       skos:prefLabel "Dance"@en.
:_9a307fd8 a skos:Concept;
           skos:prefLabel "Painting"@en;
           skos:prefLabel "Malerei"@de;
           skos:prefLabel "Peinture"@fr;
           skos:prefLabel "Pintura"@es;
           skos:prefLabel "карти́на"@ru.
:photography a skos:Concept;
             skos:prefLabel "Photography"@en.
:_dbec7ab6 a skos:Concept;
           skos:topConceptOf :scheme;
           skos:prefLabel "Artistic hobbies"@en;
           skos:prefLabel "Künstlerische Hobbies"@de;
           skos:narrower :dance;
           skos:narrower :_9a307fd8;
           skos:narrower :photography.