freme-project / e-Link

Apache License 2.0
0 stars 0 forks source link

Examples for Template 1 and 5 #40

Closed jnehring closed 8 years ago

jnehring commented 9 years ago

The examples from Template 1 and 5 produce no data.

Template 1:

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 {
  ?museum <http://xmlns.com/foaf/0.1/based_near > <@@@entity_uri@@@ > .
} WHERE {
  <@@@entity_uri@@@ > geo:geometry ?citygeo .
  ?museum rdf:type <http://schema.org/Museum > .
  ?museum geo:geometry ?museumgeo .
  FILTER (<bif:st_intersects >(?museumgeo, ?citygeo, 10))
} LIMIT 10 

Template 5:

PREFIX edm: <http://www.europeana.eu/schemas/edm/ >
PREFIX ore: <http://www.openarchives.org/ore/terms/ >
CONSTRUCT {
  ?CHO edm:HasMet <@@@entity_uri@@@ >
} WHERE {
  ?EuropeanaObject  edm:year  ?year ;
  edm:hasMet <@@@entity_uri@@@ > .
  ?EuropeanaObject ore:proxyFor ?CHO .
  FILTER (?year < "1800")
  FILTER (?year > "1700")
} LIMIT 5 
m1ci commented 8 years ago

Regarding template 1) - The problem is that in the latest DBpedia release the official DBpedia endpoint does not contain anymore the geometry information. However DBpedia live contains. I recommend switching template 1) to

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

and SPARQL endpoint http://live.dbpedia.org/sparql/ where @@@entity_uri@@@ is location.

Regarding template 5) - it seems the data model has been recently changed and the template does not match anymore. I recommend switching this template with two another:

Template 5-1:

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

and SPARQL endpoint http://europeana.ontotext.com/sparql where @@@entity_uri@@@ is a location. E.g. entity_uri can be http://dbpedia.org/resource/Italy.

Template 5-2:

PREFIX edm: <http://www.europeana.eu/schemas/edm/>
PREFIX ore: <http://www.openarchives.org/ore/terms/>
CONSTRUCT {
  ?object <http://purl.org/dc/elements/1.1/creator> <@@@entity_uri@@@> ; .
} WHERE {
  ?object <http://purl.org/dc/elements/1.1/creator> <@@@entity_uri@@@> ; .
} LIMIT 10

and SPARQL endpoint http://europeana.ontotext.com/sparql where @@@entity_uri@@@ is a person creator. E.g. entity_uri can be http://dbpedia.org/resource/Alessandro_Allori

jnehring commented 8 years ago

Sounds good to me. Please do that.

m1ci commented 8 years ago

how should we proceed with this? what about manually adding them to the DB, assuring that we have the IDs we want? Actually, I can add them via the API but the IDs will be not as we want.

jnehring commented 8 years ago

I will assign these templates to the admin user and then give you the username and password of the admin user. Then you can update the templates via the API. Does this sound good to you?

m1ci commented 8 years ago

OK, but I think editing them directly in the DB will be much easier. But I'm fine with both ways of updating them.

jnehring commented 8 years ago

Either way will work. Do you have access to the database? I can provide you with the credentials if you dont have them.

m1ci commented 8 years ago

No I don't have, but you have experience with that tech, so maybe you can do that faster. I'm more for updating the templates via the API.

jnehring commented 8 years ago

I updated the database as written above and send the admin auth token to milan so he can update the templates.

m1ci commented 8 years ago

instead of template 5 we decided to introduce two similar templates. One can re-use the ID 5, what about the other template?

m1ci commented 8 years ago

template 1 has been updated. See http://api-dev.freme-project.eu/current/e-link/templates/1?outformat=json

Waiting for feedback on https://github.com/freme-project/e-Link/issues/40#issuecomment-149163253 to update template 5

jnehring commented 8 years ago

instead of template 5 we decided to introduce two similar templates. One can re-use the ID 5, what about the other template?

I suggest to create a new template for 5-2. Or do you have another idea?

m1ci commented 8 years ago

5-2 is not valid ID. I checked and ID 8 is free. I'll push this template under ID 8.

m1ci commented 8 years ago

The template has been created under ID 304. We need manually to change the ID from 304 to 8.

jnehring commented 8 years ago

I think id 304 is ok. Or do you see a problem with id 304?

m1ci commented 8 years ago

Or do you see a problem with id 304?

Not at all :) ok, then this issue should be solved.