- From: Ricardo Almeida <ralmeida@dei.isep.ipp.pt>
- Date: Tue, 9 Sep 2008 15:15:29 +0100
- To: <public-sparql-dev@w3.org>
- Message-ID: <00c001c91286$839bc030$8ad34090$@isep.ipp.pt>
I,
I’m using sparql with Jena, to make some queries. I have two ontologies
(src1 and tgt), and two rdf files were I have my instances, according to
this ontologies.
Caixa de texto: M1src1:
person: Set of
personId
name
addressId
addressSrc: Set of
adressIdSrc
street
pobox
tgt:
employee: Set of
employee:
employeeId
firstName
lastName
addressId
addressTgt: Set of
adressIdTgt
address
I would like to use construct to obtain data from one ontology, according to
the other. Is it possible to make a concatenation (or a split), with
construct?
I made the query described above and I obtain all the first names, but what
I really wanted was to obtain the concatenation of firstName and lastName,
of tgt as the name of src1.
private String QConstructSrcFromTgt =
"CONSTRUCT { ?s rdf:type
<http://www.owl-ontologies.com/Ontology1200929461.owl#Person> ." +
" ?s
<http://www.owl-ontologies.com/Ontology1200929461.owl#name> ?firstName" +
"} FROM <http://www.owl-ontologies.com/Ontology1200929459.owl> WHERE
{?s rdf:type ?o ." +
" ?s
<http://www.owl-ontologies.com/Ontology1200929459.owl#firstName> ?firstName}
";
//" ?s
<http://www.owl-ontologies.com/Ontology1200929459.owl#lasttName> ?lastName.
"+
//" FILTER regex(?lastName, \"Castro\") } ";
Thanks,
Ricardo Gabriel Soares Fernandes de Almeida.
----------------------------------------------------------------------------
---
Departamento de Engenharia Informática
Instituto Superior de Engenharia
Instituto Politécnico do Porto
Rua Dr. António Bernardino de Almeida, 431
4200-072 Porto
Portugal
Tel.:(+351) 228 340 500 / Fax.: (+351) 228 021 159
_____
Attachments
- image/png attachment: image001.png
- image/png attachment: image002.png
- image/png attachment: image003.png
- image/png attachment: image004.png
- image/png attachment: image005.png
- image/png attachment: image006.png
- image/png attachment: image007.png
- image/png attachment: image008.png
Received on Tuesday, 9 September 2008 14:44:00 UTC