I’m trying to write a SPARQL filter to filter ?support_status = Obsolete and
?start_date is <= NOW.
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
------------------------------------------------------------------------------
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
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel