Not logged in : Login

About: VirtTipsAndTricksGuideCustomExactDate     Goto   Sponge   NotDistinct   Permalink

An Entity of Type : atom:Entry, within Data Space : ods.openlinksw.com associated with source document(s)

AttributesValues
type
Date Created
Date Modified
label
  • VirtTipsAndTricksGuideCustomExactDate
maker
Title
  • VirtTipsAndTricksGuideCustomExactDate
isDescribedUsing
has creator
content
  • %META:TOPICPARENT{name="VirtTipsAndTricksGuide"}% ---+How Can I Get an exact mapping for a date? Assume a given attempts to get an exact mapping for the literal "1950" using <b>bif:contains</b>: <verbatim> SPARQL SELECT DISTINCT ?s ?o FROM <http://dbpedia.org> WHERE { ?s ?p ?o . FILTER( bif:contains (?o, '"1950"') &amp;&amp; isLiteral(?o) &amp;&amp; ( str(?p) ! = rdfs:label || str(?p) != foaf:name &amp;&amp; ( ?o='1950') ) } </verbatim> As an <b>integer</b> 1950 or <b>date</b> 1950-01-01 are not texts, they are not in free-text index and thus invisible for CONTAINS free-text predicate. A possible way to make them visible that way is to introduce an additional RDF predicate that will contain objects of the triples in question, converted to strings via str() function. Thus better results will be approached: if searches about dates are frequent then a new predicate can have date/datetime values extracted from texts, eliminating the need for bif:contains. Therefor, the query from above should be changed to: <verbatim> SPARQL SELECT DISTINCT ?s ?o FROM <http://dbpedia.org> WHERE { ?s ?p ?o . FILTER ( isLiteral(?o) &amp;&amp; ( str(?p) != str(rdfs:label) || str(?p) != foaf:name ) &amp;&amp; str(?o) in ("1950", "1950-01-01")) } </verbatim> ---+++Related * [[VirtTipsAndTricksGuide][Virtuoso Tips and Tricks Collection]] * [[http://docs.openlinksw.com/virtuoso/rdfsparql.html][SPARQL]]
id
  • 04d0ed989d3bb960892130e44cc0c594
link
has container
http://rdfs.org/si...ices#has_services
atom:title
  • VirtTipsAndTricksGuideCustomExactDate
links to
atom:source
atom:author
atom:published
  • 2017-06-13T05:49:32Z
atom:updated
  • 2017-06-13T05:49:32Z
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
Faceted Search & Find service v1.17_git150 as of Jan 20 2025


Alternative Linked Data Documents: iSPARQL | ODE     Content Formats:   [cxml] [csv]     RDF   [text] [turtle] [ld+json] [rdf+json] [rdf+xml]     ODATA   [atom+xml] [odata+json]     Microdata   [microdata+json] [html]    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 08.03.3332 as of Sep 11 2024, on Linux (x86_64-generic-linux-glibc25), Single-Server Edition (15 GB total memory, 859 MB memory in use)
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2025 OpenLink Software