
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

/*!40000 ALTER TABLE `template` DISABLE KEYS */;
INSERT INTO `template` (`id`, `creation_time`, `description`, `visibility`, `endpoint`, `endpoint_type`, `label`, `query`, `owner_name`) VALUES 
(1,0,'This template enriches with a list of museums (max 10) within a 50km radius around each location entity.',1,'http://live.dbpedia.org/sparql/',0,'Find nearest museums','PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbo: <http://dbpedia.org/ontology/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT {  ?museum <http://xmlns.com/foaf/0.1/based_near> <@@@entity_uri@@@> . } WHERE {  <@@@entity_uri@@@> geo:geometry ?citygeo .  OPTIONAL { ?museum rdf:type dbo:Museum . }  ?museum geo:geometry ?museumgeo .  FILTER (<bif:st_intersects>(?museumgeo, ?citygeo, 50)) } LIMIT 10','admin'),
(2,0,'The template retrieves events (max 10) related to a place. The information is retrieved from the DBpedia live SPARQL endpoint.',1,'http://live.dbpedia.org/sparql',0,'Events related to a place','PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> . } WHERE { ?event rdf:type <http://dbpedia.org/ontology/Event> .  ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> .  } LIMIT 10','admin'),
(3,0,'',1,'http://factforge.net/sparql',0,'dataset label','PREFIX geo-pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . } WHERE { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . }','admin'),
(4,0,'This template enriches with a list of persons (max 10) born in locations provided in the text. This template is using Europeana SPARQL endpoint as source for information.',1,'http://europeana.ontotext.com/sparql',0,'Authors born in place','PREFIX edm: <http://www.europeana.eu/schemas/edm/> PREFIX ore: <http://www.openarchives.org/ore/terms/> CONSTRUCT {  ?person  <http://rdvocab.info/ElementsGr2/placeOfBirth> <@@@entity_uri@@@> ;  } WHERE {  ?person  <http://rdvocab.info/ElementsGr2/placeOfBirth> <@@@entity_uri@@@> ;  } LIMIT 10','admin'),
(5,0,'',1,'http://europeana.ontotext.com/sparql',0,'','PREFIX dbpedia: <http://dbpedia.org/resource/> PREFIX dbpedia-owl: <http://dbpedia.org/ontology/> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> . } WHERE { ?event rdf:type <http://dbpedia.org/ontology/@@@event_type@@@> .  ?event <http://dbpedia.org/ontology/place> <@@@entity_uri@@@> .  } LIMIT 10','admin'),
(6,0,'This template retrieves bakeries near a place within radius of 10 km. The places should be identified with DBpedia or GeoNames URIs.',1,'http://linkedgeodata.org/sparql/',0,'Bakeries near a place','Prefix lgdo: <http://linkedgeodata.org/ontology/> Prefix geom: <http://geovocab.org/geometry#> Prefix ogc: <http://www.opengis.net/ont/geosparql#> Prefix owl: <http://www.w3.org/2002/07/owl#> CONSTRUCT {  ?b <http://xmlns.com/foaf/0.1/based_near> <@@@entity_uri@@@> .  ?b <http://www.w3.org/2000/01/rdf-schema#label> ?label . } WHERE {  ?c    owl:sameAs <@@@entity_uri@@@> ;    geom:geometry [      ogc:asWKT ?cg    ] .  ?b    a lgdo:Bakery ;    <http://www.w3.org/2000/01/rdf-schema#label> ?label ;        geom:geometry [      ogc:asWKT ?bg    ] .    Filter(<bif:st_intersects>(?cg, ?bg, 10)) .} Limit 10','admin'),
(7,0,'This template is using a Linked Data Frament endpoint to fetch DBpedia categories for a DBpedia resource.',1,'http://rv2622.1blu.de:5000/dbpedia-categories',1,'DBpedia Categories via LDF','CONSTRUCT {  <@@@entity_uri@@@> <http://purl.org/dc/terms/subject> ?category .  ?category <http://www.w3.org/2000/01/rdf-schema#label> ?label } WHERE { <@@@entity_uri@@@> <http://purl.org/dc/terms/subject> ?category . ?category <http://www.w3.org/2000/01/rdf-schema#label> ?label }','admin'),
(8,0,'Retrieve all bakeries 10km close to a place.',1,'http://linkedgeodata.org/vsnorql',0,'Linked Geo Data','  PREFIX owl: <http://www.w3.org/2002/07/owl# >PREFIX ogc: <http://www.opengis.net/ont/geosparql# >PREFIX geom: <http://geovocab.org/geometry# >PREFIX lgdo: <http://linkedgeodata.org/ontology/ >CONSTRUCT {?s <http://xmlns.com/foaf/0.1/based_near > <@@@entity_uri@@@ > .} WHERE {?sa lgdo:Bakery ;geom:geometry [ ogc:asWKT ?sg ] .?aowl:sameAs <@@@entity_uri@@@ > ;geom:geometry [ ogc:asWKT ?ag ] .FILTER(bif:st_intersects(?sg, ?ag, 10))} LIMIT 10 ','admin'),
(9,1484826755667,'This is a template for the CKEditor, an alternative to explore, with all labels where possible',1,'http://dbpedia.org/sparql/',0,'Everything with labels','CONSTRUCT {\r\n <@@@entity_uri@@@> ?p ?o.\r\n ?p <http://www.w3.org/2000/01/rdf-schema#label> ?pLabel.\r\n ?o <http://www.w3.org/2000/01/rdf-schema#label> ?oLabel.\r\n} WHERE {\r\n {\r\n   SELECT * WHERE {\r\n    <@@@entity_uri@@@> ?p ?o.\r\n\r\n    OPTIONAL {\r\n     ?p <http://www.w3.org/2000/01/rdf-schema#label> ?pLabel.\r\n    }\r\n\r\n    OPTIONAL {\r\n     ?o <http://www.w3.org/2000/01/rdf-schema#label> ?oLabel.\r\n    }\r\n   }\r\n }\r\n}','admin'),
(10,1485178165713,'Ocelot Template for graph',1,'http://dbpedia.org/sparql',0,'New Ocelot Template','PREFIX dbo: <http://dbpedia.org/ontology/> \nPREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> \nPREFIX foaf: <http://xmlns.com/foaf/0.1/> \nPREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> \nPREFIX dbp: <http://dbpedia.org/property/> \nPREFIX dc: <http://purl.org/dc/elements/1.1/> \nCONSTRUCT {<@@@entity_uri@@@> ?p ?o } \nWHERE \n{  \nOPTIONAL {<@@@entity_uri@@@> ?p ?o } .   \nFILTER ((!isLiteral(?o) || lang(?o)=\"\" || langMatches(lang(?o),
 \"@@@language@@@\") ) &&        \n(?p in (dbo:abstract, rdfs:comment, dbo:thumbnail, foaf:depiction, foaf:isPrimaryTopicOf, foaf:homepage, dbo:birthDate, dbo:deathDate, dc:description, <http://dbpedia.org/ontology/PopulatedPlace/areaTotal>, dbo:populationTotal, geo:lat, geo:long, dbp:type, dbp:location, rdfs:label, dbo:artist, dbo:bandMember, dbo:battle, dbo:binomialAuthority, dbo:birthPlace, dbo:ceremonialCounty, dbo:chairman, dbo:city, dbo:author, dbo:class, dbp:clubs, dbp:combatant, dbo:commander, dbo:composer, dbo:country, dbo:creator, dbo:creatorOfDish, dbo:deathPlace, dbo:designer, dbo:developer, dbo:director, dbo:discoverer, dbo:distributor, dbo:editor, dbo:endPoint, dbo:family, dbo:genre, dbo:governmentType, dbo:hometown, dbo:illustrator, dbo:isPartOf, dbo:isPartOfMilitaryConflict, dbo:kingdom, dbo:leaderName, dbo:league, dbo:locatedInArea, dbo:location, dbo:manager, dbo:manufacturer, dbo:militaryBranch, dbo:mountainRange, dbo:mouthCountry, dbo:mouthPlace, dbo:mouthRegion, dbo:museum, dbo:musicalBand, dbo:musicComposer, dbo:nationality, dbo:order, dbo:origin, dbp:owner, dbo:place, dbo:position, dbo:principalEngineer, dbo:producer, dbo:publisher, dbo:recordLabel, dbo:residence, dbo:riverMouth, dbo:routeEnd, dbo:routeStart, dbo:source, dbo:sourceCountry, dbo:sourcePlace, dbo:sourceRegion, dbo:sportGoverningBody, dbo:spouse, dbo:starring, dbo:startPoint, dbo:trainer, dbp:venue, dbo:writer)) ) . \n}','admin'),
 (11,1485250693091,'Get image and abstract of dbpedia resources.',1,'http://dbpedia.org/sparql/',0,'FREME Workflow Editor e-Link template','select ?abstract  ?image \nwhere {\n <@@@entity_uri@@@> <http://dbpedia.org/ontology/abstract> ?abstract . \n  <@@@entity_uri@@@> <http://dbpedia.org/ontology/thumbnail> ?image \n  FILTER (lang(?abstract) = \'en\') \n}','admin'),
 (4517,1476199668967,NULL,1,'http://data.europa.eu/euodp/sparqlep',0,'jrcnamesquery','PREFIX lemon: <http://www.lemon-model.net/lemon#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> CONSTRUCT {<@@@entity_uri@@@> lemon:writtenRep ?Rep } WHERE { { SELECT  ?Rep ?ref WHERE   {      ?variant rdf:type lemon:LexicalEntry .     ?variant lemon:language \'ja\' .     ?variant lemon:sense ?sense .     ?sense lemon:reference ?ref .     ?ref <http://www.w3.org/2002/07/owl#sameAs> <@@@entity_uri@@@>.     ?variant lemon:canonicalForm ?form .     ?form lemon:writtenRep ?Rep .   }       } }','admin'),
 (4518,1476199820947,NULL,1,'http://data.europa.eu/euodp/sparqlep',0,'jrcnamesquery','PREFIX lemon: <http://www.lemon-model.net/lemon#> PREFIX skos: <http://www.w3.org/2004/02/skos/core#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> CONSTRUCT {<@@@entity_uri@@@> lemon:writtenRep ?Rep } WHERE { { SELECT  ?Rep ?ref WHERE   {      ?variant rdf:type lemon:LexicalEntry .     ?variant lemon:language \'ru\' .     ?variant lemon:sense ?sense .     ?sense lemon:reference ?ref .     ?ref <http://www.w3.org/2002/07/owl#sameAs> <@@@entity_uri@@@>.     ?variant lemon:canonicalForm ?form .     ?form lemon:writtenRep ?Rep .   }       } }','admin'),
 (4519,1485352391760,'geocoordinates of place',1,'http://factforge.net/sparql',0,'template pipeline tutorial','PREFIX geo-pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> CONSTRUCT { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . } WHERE { <@@@entity_uri@@@> geo-pos:lat ?lat . <@@@entity_uri@@@> geo-pos:long ?long . }','admin');
/*!40000 ALTER TABLE `template` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;




