freme-project / e-services

Apache License 2.0
1 stars 1 forks source link

Problem with e-Link #55

Closed jnehring closed 7 years ago

jnehring commented 7 years ago

There is a problem with the e-Link template that the FREME workflow editor uses. I reproduced the problem in CURL. Do you know what is the issue?

curl -X POST -H "Cache-Control: no-cache" -H "Postman-Token: f988de22-39d7-4583-315f-7e499bfb7e04" -d '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:itsrdf="http://www.w3.org/2005/11/its/rdf#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:nif="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#"> 
  <rdf:Description rdf:about="http://freme-project.eu/#char=242,249">
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9847523403691555</itsrdf:taConfidence>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">249</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Germany</nif:anchorOf>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Germany"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Country"/>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">242</nif:beginIndex>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=0,605">
    <nif:isString rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Berlin is the capital of Germany and one of the 16 states of Germany. With a population of 3.5 million people, it is the second most populous city proper and the seventh most populous urban area in the European Union. Located in northeastern Germany on the banks of Rivers Spree and Havel, it is the center of the Berlin-Brandenburg Metropolitan Region, which has about six million residents from over 180 nations. Due to its location in the European Plain, Berlin is influenced by a temperate seasonal climate. Around one-third of the city'"'"'s area is composed of forests, parks, gardens, rivers and lakes.</nif:isString>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">605</nif:endIndex>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Context"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=61,68">
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Germany"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Country"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">68</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9840834208711089</itsrdf:taConfidence>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Germany</nif:anchorOf>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">61</nif:beginIndex>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=266,278">
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Rivers Spree</nif:anchorOf>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">278</nif:endIndex>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">266</nif:beginIndex>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9866821072512713</itsrdf:taConfidence>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=0,6">
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9911639828700279</itsrdf:taConfidence>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Berlin"/>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Region"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">6</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/AdministrativeRegion"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">0</nif:beginIndex>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Berlin</nif:anchorOf>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=458,464">
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/AdministrativeRegion"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">458</nif:beginIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Berlin</nif:anchorOf>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">464</nif:endIndex>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Berlin"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9927874817183655</itsrdf:taConfidence>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Region"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=314,352">
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9900269334535582</itsrdf:taConfidence>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Berlin-Brandenburg Metropolitan Region</nif:anchorOf>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">314</nif:beginIndex>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">352</nif:endIndex>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=25,32">
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">32</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Country"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.98131423694663</itsrdf:taConfidence>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Germany</nif:anchorOf>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">25</nif:beginIndex>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Germany"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=442,456">
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/European_Plain"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.5941064253611315</itsrdf:taConfidence>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">European Plain</nif:anchorOf>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">442</nif:beginIndex>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">456</nif:endIndex>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=202,216">
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">202</nif:beginIndex>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">European Union</nif:anchorOf>
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">216</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/PopulatedPlace"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/European_Union"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Organization"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Country"/>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.9708535885818516</itsrdf:taConfidence>
  </rdf:Description>
  <rdf:Description rdf:about="http://freme-project.eu/#char=283,288">
    <nif:referenceContext rdf:resource="http://freme-project.eu/#char=0,605"/>
    <nif:anchorOf rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Havel</nif:anchorOf>
    <itsrdf:taConfidence rdf:datatype="http://www.w3.org/2001/XMLSchema#double">0.8178545845282159</itsrdf:taConfidence>
    <nif:beginIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">283</nif:beginIndex>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Phrase"/>
    <itsrdf:taClassRef rdf:resource="http://nerd.eurecom.fr/ontology#Location"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/River"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/NaturalPlace"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Place"/>
    <itsrdf:taIdentRef rdf:resource="http://dbpedia.org/resource/Havel"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/BodyOfWater"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#String"/>
    <nif:endIndex rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">288</nif:endIndex>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Stream"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#RFC5147String"/>
    <itsrdf:taClassRef rdf:resource="http://dbpedia.org/ontology/Location"/>
    <rdf:type rdf:resource="http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core#Word"/>
  </rdf:Description>
</rdf:RDF>
' "http://rv1460.1blu.de/current/e-link/documents?informat=application%2Frdf%2Bxml&outformat=rdf-xml&templateid=4476"

produces

{
  "exception": "eu.freme.common.exception.BadRequestException",
  "path": "/e-link/documents",
  "message": "There is a problem: Could not process the enrichment result from the endpoint=http://dbpedia.org/sparql/ executing the query=select ?abstract  ?image \nwhere {\n <http://dbpedia.org/resource/Havel> <http://dbpedia.org/ontology/abstract> ?abstract . \n  <http://dbpedia.org/resource/Havel> <http://dbpedia.org/ontology/thumbnail> ?image \n  FILTER (lang(?abstract) = 'en') \n}. Error message: [line: 7, col: 7 ] {E201} The attributes on this property element, are not permitted with any content; expecting end element tag.",
  "error": "Bad Request",
  "status": 400,
  "timestamp": 1485251261900
}
m1ci commented 7 years ago

the request is using template which is defined with select query. Unfortunately, e-link templates work with construct queries only.

jnehring commented 7 years ago

ok thanks.