
webapp.data.profile.ttl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of corese-server Show documentation
Show all versions of corese-server Show documentation
Corese is a Semantic Web Factory (triple store and SPARQL endpoint) implementing RDF, RDFS, SPARQL 1.1
Query and Update.
The newest version!
#
# SWS profile: a construct query and a HTML transformation
# st:param specify parameters passed to transformation
# accessible using st:get(st:lang)
#
@prefix p: .
@prefix o: .
@prefix d3: .
@prefix db: .
@prefix navlab: .
@prefix spq: .
@prefix fun: .
# authorized sparql endpoints, see Profile defNamespace
st:access st:namespace
,
,
,
,
,
,
# authorized linked transformation,
,
.
# display
st:log a st:Server ;
st:service "log" ;
st:param [
st:mapzoom 2 ;
st:mapsize "mapmedium" ;
st:export true
] ;
st:workflow [
a sw:Workflow ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Transformation ; sw:uri st:logger ]
)
] .
st:dbpedia a st:Profile ;
st:param [
st:transformations (st:navlab d3:frame) ;
st:export true ;
st:lang "fr" ;
st:import st:dbpediaParam, st:mapParam
] ;
st:workflow st:dbpediawf
.
st:dbpediawf a sw:Workflow ;
sw:body (
[ a sw:Query ;
st:processquery fun:trace ;
sw:uri
]
[ a sw:Transformation ; sw:uri st:combine ]
)
.
st:dbpediatest a st:Profile ;
st:param [
st:export true;
st:lang "fr" ;
st:import st:dbpediaParam, st:mapParam ;
st:hyperlink true
] ;
st:workflow st:dbpediatestwf
.
st:dbpediatestwf a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:hturtle ]
)
.
#http://localhost:8080/srv/template?profile=st:hal&uri=https://aurehal.archives-ouvertes.fr/structure/178918/rdf
st:hal a st:Server ;
st:service "hal" ;
st:param [
st:transformations (d3:frame st:hturtle) ;
# export context parameters to subtransformation (st:profile, etc.):
st:export true;
# transformation does not focus on uri but display whole graph:
st:focus false ;
# transformation generates HTML hypertext links:
st:hyperlink true ;
# generate number for each displayed resource
st:number true ;
st:lodprofile (
( st:hal)
( st:hal)
( st:dbpedia)
("*" st:lod)
)
] ;
st:workflow [
a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:combine ]
#[ a sw:Transformation ; sw:uri st:d3 ]
)
]
.
st:hal3 a st:Server ;
st:service "hal3" ;
st:param [
# export context parameters to subtransformation (st:profile, etc.):
st:export true;
# transformation does not focus on uri but display whole graph:
st:focus false ;
# transformation generates HTML hypertext links:
st:hyperlink true ;
st:lodprofile (
( st:hal)
( st:hal)
( st:hal)
("*" st:lod)
)
] ;
st:workflow [
a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:hturtle ]
)
]
.
#
# Display SPARQL Results Format using W3C RDF graph format
# and hturtle with hyperlinks
# To be used with query=...
#
st:halendpoint a st:Profile ;
st:transform st:hturtle ;
st:param [
st:hyperlink true ;
st:export true ;
st:param "verbatim" ;
st:lodprofile (
( st:hal)
( st:hal)
( st:hal)
("*" st:lod)
)
] .
#
# Display SPARQL Results Format using W3C RDF graph format
# and hturtle with hyperlinks
# To be used with query=...
#
st:endpoint a st:Profile ;
st:transform st:hturtle ;
st:param [
st:hyperlink true ;
st:export true ;
st:param "verbatim"
] .
st:hal2 a st:Server ;
st:service "hal2" ;
st:param [
st:focus false ;
st:export true ;
st:hyperlink true ;
st:lodprofile (
( st:hal2)
( st:hal2)
("*" st:lod)
)
] ;
st:workflow [
a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:hrdfxml ]
)
]
.
st:geoloc a st:Profile ;
st:workflow st:geoloc ;
sw:body (
st:dbpediawf
)
.
st:hturtle a st:Profile ;
st:workflow st:hturtleWF ;
st:param [
st:hyperlink true ;
st:export true
] .
st:hturtleWF a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:hturtle ]
) .
st:turtle a st:Profile ;
st:workflow st:turtleWF .
st:turtleWF a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:turtle ]
) .
st:rdfxml a st:Profile ;
st:workflow st:rdfxmlWF .
st:rdfxmlWF a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:rdfxml ]
) .
st:json a st:Profile ;
st:workflow st:jsonWF .
st:jsonWF a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:json ]
) .
st:dbhistory a st:Profile ;
st:param [
st:uri ;
# st:plink() include in hyperlink: mode = dbo:Artist
st:include (("mode" st:mode))
] ;
st:workflow [
a sw:Workflow ; sw:body (
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri st:dbhistory ]
)
] .
st:dbhistorytype a st:Profile ;
st:param [
st:uri ;
# st:plink() include in hyperlink: mode = dbo:Artist
st:include (("mode" st:mode))
] ;
st:workflow [
a sw:Workflow ; sw:body (
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri st:dbhistory ]
)
] .
st:mapParam
st:param [
st:mapzoom 6 ;
st:mapsize "mapmedium" ;
st:mapicon1 "/img/bmarker.png" ;
st:mapicon2 "/img/smarker.png"
] .
st:dbpediaParam
st:param [
st:person (
(p:dateDeNaissance "Naissance" "Birth")
(p:dateDeDécès "Décès" "Death")
(o:predecessor "Prédécesseur" "Predecessor")
(o:successor "Successeur" "Successor")
(o:father "Père" "Father")
(o:mother "Mère" "Mother")
(o:spouse "Conjoints" "Spouse")
(o:child "Enfants" "Children")
(o:residence "Résidence" "Residence")
(rdfs:comment "Résumé" "Abstract")
(o:wikiPageRedirects "Voir aussi" "See Also")
(o:wikipedia "Wikipedia" "Wikipedia")
(o:dbpedia "DBpedia" "DBpedia"))
] .
st:dbpediaen a st:Profile ;
st:query ;
st:transform st:navlab ;
st:param [
st:lang "en" ;
] .
st:calendar a st:Profile ;
st:transform st:calendar ;
st:param [
st:debug true ;
] .
st:calendar1 a st:Profile ;
st:query ;
st:transform st:content ;
st:param [
st:uri st:y2000 ;
st:title "Born calendar";
] .
st:calendar2 a st:Profile ;
st:query ;
st:transform st:content ;
st:param [
st:uri st:y2000 ;
st:title "Decease calendar";
] .
st:calendar3 a st:Profile ;
st:query ;
st:transform st:content ;
st:param [
st:uri st:y1944 ;
st:title "Event calendar";
] .
@prefix ct: .
# calendar to query dbpedia for event given month-day for any year
# show answer of such query
st:gcalendar a st:Profile ;
st:query ;
st:transform ct:query ;
st:param [
st:import st:cal ;
st:title "Born calendar";
] .
# additional shared param
st:cal
st:param [
st:uri st:d2000-02-29 ;
].
st:gcalendar2 a st:Profile ;
st:query ;
st:transform ct:query ;
st:param [
st:import st:cal ;
st:title "Decease calendar";
] .
st:gcalendar3 a st:Profile ;
st:query ;
st:transform ct:query ;
st:param [
st:import st:cal ;
st:title "Born & Decease calendar";
] .
st:dbpediasparql a st:Profile ;
st:query ;
st:transform st:sparql .
st:dbpediacopy a st:Profile ;
st:query ;
st:transform st:navlab .
st:navlab a st:Profile ;
st:param [
st:mapzoom 7 ;
st:mapsize "maplarge"
] ;
st:workflow [
sw:body ( [ a sw:Transformation ; sw:uri st:navlab ] )
] .
st:web a st:Profile ;
st:transform st:web .
st:weben a st:Profile ;
st:param [ st:lang 'en' ];
st:transform st:web .
# LDP on local dataset
st:sparql a st:Profile ;
st:query ;
st:variable "?r" ;
st:transform st:sparql .
# LDP on target URI
st:std a st:Profile ;
st:query ;
st:variable "?r" ;
st:transform st:sparql .
st:rdfs a st:Profile ;
st:transform st:rdfs .
# ******************************************************
#
# Server Content
#
# ******************************************************
#
# Default server for the SPARQL endpoint, content loaded using -lp option
# change name to st:default
# User profile loaded using -pp option
#
st:default a st:Server ;
st:param [ st:ldp ] ;
st:content st:humancontent
.
st:humancontent a sw:Workflow ; sw:body (
# [ a sw:Load ; sw:path ; sw:name st:data1 ]
# draft event functions for getVisitor().beforeRequest(request) and /agent?action=sparql
# [ a sw:Query ; sw:uri ]
[ a sw:Load ; sw:path ; sw:name st:data1 ]
[ a sw:Load ; sw:path ; sw:name st:data2 ]
[ a sw:Load ; sw:path ; sw:name st:pragma ]
)
.
st:system a st:Server ;
st:service "system"
.
st:show a st:Server ;
st:service "show" ;
st:content st:humancontent ;
st:workflow us:showWF
.
st:show2 a st:Server ;
st:service "show2" ;
st:content st:humancontent ;
st:workflow us:showWF2
.
us:showWF2 a sw:Workflow ;
sw:body (
[ a sw:Template ; sw:uri ]
).
us:showWF a sw:Workflow ;
st:param [
st:hyperlink true ;
st:export true
];
sw:body (
[ a sw:Parallel ; sw:body (
[a sw:Transformation ; sw:uri ]
[a sw:Transformation ; sw:uri ]
[a sw:Transformation ; sw:uri ]
[a sw:Transformation ; sw:uri ]
#[a sw:Template ; sw:uri ]
)
]
[ a sw:Template ; sw:uri ]
) .
st:tutorial2 a st:Server ;
st:param [ st:lang 'en';
st:sttl st:combine ;
st:transformations (spq:result) ;
st:exportlist( st:sttl st:transformations st:mappings )
] ;
st:service "sparql" ;
st:transform st:web ;
st:content st:tutocontent
.
st:tutocontent a sw:Workflow ; sw:body (
[ a sw:Parallel ; sw:body (
# main dataset
st:humancontent
# context dataset with predefined queries in a specific graph
[ a sw:Workflow ; sw:name st:context ; sw:body (
#[ a sw:Query ; sw:body "construct where {}" ]
[ a sw:Load ; sw:path ; sw:name st:context ]
st:indexQuery ) ]
) ]
# set st:context graph as named graph of main
[a sw:Dataset]
).
st:indexQuery a sw:Query ;
# sw:body
# "insert { ?q st:index ?n } where { ?q a sw:Query bind (kg:number() as ?n) }"
sw:uri
.
# execute the whole query list of the tutorial above
st:tutocheck a st:Profile ;
st:workflow
[ a sw:Workflow ; sw:uri ]
.
st:mytest a st:Server ;
st:service "mytest" ;
st:param [
st:export true
] ;
st:workflow [
a sw:Workflow ; sw:body (
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri st:testgraph ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri st:testgraph ]
[ a sw:Transformation ; sw:uri st:testdisplay ]
)
]
.
st:myload a st:Server ;
st:service "myload" ;
st:param [
st:export true
] ;
st:workflow [
a sw:Workflow ; sw:body (
[ a sw:Query ; sw:uri ]
#[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:frame ]
)
]
.
st:rome a st:Server ;
st:service "rome" ;
st:param [
st:lang "fr" ;
st:import st:dbpediaParam, st:mapParam ;
] ;
st:shareContent st:romecontent ;
st:transform st:navlab .
st:romecontent a sw:Workflow ; sw:body (
[ a sw:Load ; sw:path ] )
.
# geographic enclaves
st:geo a st:Server ;
st:service "geo" ;
st:transform st:navlab ;
st:param [
st:lang "en" ;
st:mapzoom 5 ;
st:mapsize "maplarge" ;
st:import st:mapParam ;
] ;
st:content st:geocontent
.
st:geocontent a sw:Workflow ; sw:body (
[ a sw:Load ; sw:path ] )
.
st:inria a st:Server ;
st:service "inria" ;
st:transform st:navlab ;
st:param [
st:lang "en" ;
st:mapzoom 6 ;
st:mapsize "mapmedium" ;
st:import st:mapParam ;
] ;
st:content st:inriacontent
.
st:inriacontent a sw:Workflow ; sw:body (
[ a sw:Load ; sw:path ] )
.
# ************************************************************************
# Former Java hard coded Process implemented as declarative Workflow
# These Profile are also Workflow
#
# get param=rdf & mode=shape & format=st:turtle from server Context
# workflow parser get them from server Context when creating ShapeProcess
st:shape a st:Server ;
st:service "shape" ;
st:workflow st:shape ;
st:param [
st:title "Shacl" ;
st:function sh:shacl;
st:schema ;
st:rdf
] ;
sw:body (
[ a sw:Shape ]
[ a sw:Transformation ; sw:uri st:dsresult ]
) .
st:shex a st:Server ;
st:service "shex" ;
st:workflow st:shex ;
st:param [
st:title "Shex" ;
st:comment "Shex Shacl Translator with Shex parser http://shexjava.lille.inria.fr" ;
st:function sh:shex ;
st:schema ;
st:rdf
] ;
sw:body (
[ a sw:Shex ]
[ a sw:Transformation ; sw:uri st:dsresult ]
) .
#
# Generic type check
# Context st:param is the RDF to load
# Context st:mode is the transformation type checker
#
st:typecheck a st:Profile ;
st:workflow st:typecheck ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Probe ; sw:mode sw:visitor ]
[ a sw:Transformation ] # sw:uri = st:mode
[ a sw:Transformation ; sw:uri st:hturtle ]
)
.
st:typecheckowl a st:Profile ;
st:workflow st:typecheckowl ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # st:param
[ a sw:Probe ; sw:mode sw:visitor ]
[ a sw:Transformation ; sw:uri st:owltc ]
[ a sw:Transformation ; sw:uri st:owlrl ]
[ a sw:Transformation ; sw:uri st:owlqltc ]
[ a sw:Transformation ; sw:uri st:owleltc ]
[ a sw:Transformation ; sw:uri st:hturtle ]
)
.
st:display a st:Profile ;
st:workflow st:display ;
st:param [
st:export true ;
st:transformations (d3:frame st:hturtle)
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Transformation ] # sw:uri = st:mode
)
.
st:graphic a st:Server ;
st:service "graphic" ;
st:workflow st:graphic ;
st:param [
st:title "Graph" ;
st:hierarchy (rdfs:subClassOf rdfs:subPropertyOf) ;
# st:hierarchy (rdfs:subClassOf ) ;
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:frame ]
)
.
@prefix ai: .
@prefix phi: .
st:ontology a st:Server ;
st:service "ontology" ;
st:workflow st:ontology ;
st:param [
st:title "Ontology" ;
st:hierarchy (rdfs:subClassOf rdfs:subPropertyOf) ;
st:prefix (("ai" ai:)("phi" phi:))
# st:hierarchy (rdfs:subClassOf ) ;
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:class a st:Server ;
st:service "class" ;
st:workflow st:class ;
st:param [
st:title "Class" ;
st:hierarchy (rdfs:subClassOf ) ;
st:trace false ;
st:prefix (("ai" ai:)("phi" phi:))
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:individual a st:Server ;
st:service "individual" ;
st:workflow st:individual ;
st:param [
st:title "Class" ;
st:hierarchy ( rdfs:subClassOf rdf:type ) ;
# to be displayed on mouse over
st:nodePropertyDisplay ("url" "property" "class") ;
st:nodePropertyList (("property" us:value)) ;
st:export true ;
st:trace false ;
st:prefix (("ai" ai:)("phi" phi:))
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:property a st:Server ;
st:service "property" ;
st:workflow st:property ;
st:param [
st:title "Property" ;
st:hierarchy (rdfs:subPropertyOf) ;
st:nodePropertyDisplay ("url" "domain" "range") ;
st:trace false ;
st:prefix (("ai" ai:)("phi" phi:))
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:signature a st:Server ;
st:service "signature" ;
st:workflow st:signature ;
st:param [
st:title "Property" ;
st:hierarchy (rdfs:domain rdfs:isRangeOf) ;
st:nodePropertyDisplay ("url" "class" ) ;
st:trace false ;
st:prefix (("ai" ai:)("phi" phi:))
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:gclass a st:Server ;
st:service "gclass" ;
st:workflow st:gclass ;
st:param [
st:title "Class" ;
st:hierarchy (rdfs:subClassOf ) ;
st:trace false ;
st:prefix (("ai" ai:)("phi" phi:))
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Query ] #
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
#
# AI4EU
#
@prefix rs: .
st:ldpath a st:Server ;
st:service "ldpath" ;
st:workflow st:ldpath ;
st:param [
st:title "Property" ;
st:hierarchy (us:path us:distinct) ;
st:nodePropertyDisplay ("url" "class") ;
st:export true ;
st:trace true
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ] # sw:uri = st:param
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Query ; sw:uri ]
[ a sw:Transformation ; sw:uri d3:ontology ]
)
.
st:lod a st:Server ;
st:service "lod" ;
st:workflow st:lodworkflow ;
st:param [
st:title "LOD Browser" ;
st:uriparam st:param ;
st:export true ;
st:transformations (d3:frame st:hturtle) ;
st:hyperlink true ;
]
.
st:lodworkflow a sw:Workflow ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
# set rdfxml format because fr.dbpedia.org default format generates parsing error
[ a sw:Load ; sw:format st:rdfxml ] # sw:uri = st:param
# decorate graph with style and hypertext link
[ a sw:Probe ; sw:exp [ a sw:Query ; sw:uri ] ]
[ a sw:Transformation ; sw:uri st:combine]
)
.
st:sparqltc a st:Profile ;
st:workflow st:sparqltc ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ; sw:mode sw:spin ] # sw:uri = st:param
[ a sw:Probe ; sw:mode sw:visitor ]
[ a sw:Transformation ; sw:uri st:spintc]
[ a sw:Transformation ; sw:uri st:spinhtml ]
)
.
st:sparqldsp a st:Profile ;
st:workflow st:sparqldsp ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ; sw:mode sw:spin ] # sw:uri = st:param
[ a sw:Transformation ] # sw:uri = st:mode
)
.
st:spinquery a st:Server ;
st:workflow st:spinquery ;
st:service "spinquery" ;
#st:param [ st:export true ] ;
st:content [
a sw:Workflow ; sw:body (
[ a sw:Load ; sw:path rdf: ; sw:name rdf: ]
)
] ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ; sw:mode sw:spin ] # query uri = st:param | query text = st:arg
[ a sw:Query ] # place holder, get query text with query=text
[ a sw:Result ; sw:format st:json ]
)
.
st:spin a st:Server ;
st:workflow st:spin ;
st:service "spin" ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ; sw:mode sw:spin ] # sw:uri = st:param | text = st:arg
[ a sw:Transformation ; sw:uri st:turtle ]
)
.
st:spin2 a st:Server ;
st:workflow st:spin2 ;
st:service "spin2" ;
sw:body (
[ a sw:Dataset ; sw:mode sw:new ]
[ a sw:Load ; sw:mode sw:spin ] # sw:uri = st:param | text = st:arg
[ a sw:Transformation ; sw:uri st:spin ]
)
.
st:sensor a st:Server ;
st:service "sensor" ;
st:param [
st:export true ;
st:hyperlink true ;
#st:uri ;
st:lodprofile (
( st:dbpedia)
("*" st:lod)
) ;
st:mapzoom 4 ;
st:mapsize "mapsmall" ;
] ;
st:workflow st:demoWorkflow ;
st:content st:demoContent
.
# process data:
st:demoWorkflow a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri st:sensor ]
) .
# load data:
st:demoContent a sw:Workflow ; sw:body (
# [ a sw:Query ; sw:uri ]
[ a sw:Load ; sw:path , , ,
, , , , , , ,
, , ,
, , , , , ,
]
# [ a sw:Query ; sw:uri ]
)
.
st:function a st:Server ;
st:service "funcall" ;
st:workflow [
a sw:Workflow ;
sw:body (
[ a sw:Transformation ; sw:uri ]
)
] .
© 2015 - 2025 Weber Informatics LLC | Privacy Policy