Attributes | Values |
---|
type
| |
Date Created
| |
Date Modified
| |
label
| - VirtTipsAndTricksConvertPropertiesToString
|
maker
| |
Title
| - VirtTipsAndTricksConvertPropertiesToString
|
isDescribedUsing
| |
has creator
| |
content
| - %META:TOPICPARENT{name="VirtTipsAndTricksGuide"}%
---+How do I use SPARUL to change a selection of property values from URI References to Literals?
Assume a given graph where triples are comprised of property values that are mixed across URI References and Typed Literals as exemplified by the results of the
query below:
<verbatim>
SELECT DISTINCT ?sa ?oa
FROM <http://ucb.com/nbeabase>
WHERE
{
?sa a <http://ucb.com/nbeabase/resource/Batch> .
?sa <http://ucb.com/nbeabase/resource/chemAbsNo> ?oa . FILTER regex(?oa, '-','i')
}
</verbatim>
You can use the following SPARUL pattern to harmonize the property values across relevant triples in a specific graph, as shown below:
<verbatim>
SQL> SPARQL
INSERT INTO GRAPH <http://ucb.com/nbeabase>
{
?sa <http://ucb.com/nbeabase/resource/sampleId> `str (?oa)`
}
WHERE
{
?sa <http://ucb.com/nbeabase/resource/chemAbsNo> ?oa . FILTER regex(?oa, '-','i')
}
</verbatim>
---+++Related
* [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]]
* [[http://docs.openlinksw.com/virtuoso/rdfandsparql.html][RDF Data Access and Data Management]]
|
id
| - f1f29a07863be31fff4640f5f9c3afe1
|
link
| |
has container
| |
http://rdfs.org/si...ices#has_services
| |
atom:title
| - VirtTipsAndTricksConvertPropertiesToString
|
links to
| |
atom:source
| |
atom:author
| |
atom:published
| |
atom:updated
| |
topic
| |
is made
of | |
is container of
of | |
is link
of | |
is http://rdfs.org/si...vices#services_of
of | |
is creator of
of | |
is atom:entry
of | |
is atom:contains
of | |