This is an internal mediawiki -----Original Message----- From: Kingsley Idehen [mailto:kide...@openlinksw.com] Sent: Friday, July 25, 2014 5:40 PM To: Legault, Phillip [ITSUS] Cc: virtuoso-users@lists.sourceforge.net Subject: Re: [Virtuoso-users] Trouble writing a query filter
On 7/25/14 4:26 PM, Legault, Phillip [ITSUS] wrote: > Tried this and I'm unable to get it to work. > > Sent from my iPhone > >> On Jul 25, 2014, at 2:39 PM, "Rumi" <rtsek...@openlinksw.com> wrote: >> >> Hi Phillip, >> >>> On 25-Jul-14 4:00 PM, Legault, Phillip [ITSUS] wrote: >>> I'm trying to write a query filter, to filter ?support_status = Obsolete and ?start_date is <= NOW >> What about if you added: >> >> FILTER ( datatype (?start_date) in (xsd:dateTime, xsd:date) ) ; >> FILTER ( xsd:dateTime(str(?start_date)) <= xsd:dateTime( str(bif:now () ) )) ; >> >> >> Best Regards, >> Rumi Kocis >> >> >>> This works with the first part with ?support_status =Obsolete, however I'm stuck trying to figure out the second part. Any help is greatly appreciated. >>> >>> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> >>> PREFIX swivt:<http://semantic-mediawiki.org/swivt/1.0#> >>> PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> >>> SELECT ?supported_by ?category ?name ?version ?technology_name ?owner ?contact ?publication_date ?publication_status ?manufactured_by ?license_type ?support_status ?start_date ?end_date >>> WHERE >>> { >>> ?s ?p ?cat . >>> ?cat rdfs:label ?category . >>> FILTER(CONTAINS(STR(?cat), "Category") && regex(?category, "^(?!Technology)")) . >>> ?s property:Has_Name ?name . >>> OPTIONAL { >>> ?s swivt:specialProperty_SOBJ ?subobject . >>> ?subobject property:Has_Version ?version . >>> ?subobject property:Technology_Name ?technology_name . >>> ?subobject property:Has_Support_Status ?support_status . >>> ?subobject property:Has_Start_Date ?start_date . >>> } >>> OPTIONAL { >>> ?s swivt:specialProperty_SOBJ ?subobject . >>> ?subobject property:Has_End_Date ?end_date . >>> } >>> OPTIONAL { >>> ?s swivt:specialProperty_SOBJ ?subobject . >>> ?subobject property:Supported_By ?supported_by . >>> } >>> OPTIONAL { >>> ?s property:OwnedBy ?owner. >>> } >>> OPTIONAL { >>> ?s property:Contact ?contact. >>> } >>> OPTIONAL { >>> ?s property:PublicationDate ?publication_date . >>> } >>> OPTIONAL { >>> ?s property:PublicationStatus ?publication_status . >>> } >>> OPTIONAL { >>> ?s property:ManufacturedBy ?mb . >>> ?mb rdfs:label ?manufactured_by . >>> } >>> OPTIONAL { >>> ?s property:LicenseType ?lt . >>> ?lt rdfs:label ?license_type . >>> } >>> FILTER( regex(STR(?support_status), "Obsolete", "i")) >>> } >>> ORDER BY ?category ?name ?version >>> LIMIT 1000000 >>> >>> >>> >>> Thank You! >>> Phil >>> Are you able to make a rendition of this query on one of our live instances [1][2]? If you could, simply repeat and then share a query results URL. Note, if there's a public MediaWiki with similar content, you can sponge it, using the special export URL [3]. Links: [1] http://linkeddata.uriburner.com/sparql [2] http://lod.openlinksw.com/sparql [3] http://linkeddata.uriburner.com -- paste in the Semantic MediaWiki RDF export URL and then use that URL as the Named Graph IRI in your SPARQL query . -- Regards, Kingsley Idehen Founder & CEO OpenLink Software Company Web: http://www.openlinksw.com Personal Weblog 1: http://kidehen.blogspot.com Personal Weblog 2: http://www.openlinksw.com/blog/~kidehen Twitter Profile: https://twitter.com/kidehen Google+ Profile: https://plus.google.com/+KingsleyIdehen/about LinkedIn Profile: http://www.linkedin.com/in/kidehen Personal WebID: http://kingsley.idehen.net/dataspace/person/kidehen#this
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Want fast and easy access to all the code in your enterprise? Index and search up to 200,000 lines of code with a free copy of Black Duck Code Sight - the same software that powers the world's largest code search on Ohloh, the Black Duck Open Hub! Try it now. http://p.sf.net/sfu/bds
_______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users