1

我正在使用 jena-fuseki 服务器。例如,假设我的默认图表具有以下三元组。

@prefix bprefix: <http://raghav/Rathi#> 

bprefix:title71  a              bprefix:Title ;
        bprefix:fromCountry     bprefix:UnitedStates ;
        bprefix:hasCast         bprefix:BobbyMoynihan , bprefix:DemetriMartin , bprefix:EricEdelstein ;
        bprefix:hasDateAdded    "September 30, 2018" ;
        bprefix:hasDescription  "Grizzly, Panda and Ice Bear are three adopted bear brothers struggling against their animal instincts to fit into the civilized, modern human world." ;
        bprefix:hasDuration     "1 Season" ;
        bprefix:hasID           "80116921"^^xsd:int ;
        bprefix:hasRating       bprefix:TV-Y7 ;
        bprefix:hasReleaseyear  "2017"^^xsd:int ;
        bprefix:hasTitle        "We Bare Bears" ;
        bprefix:hasType         bprefix:TVShow ;
        bprefix:isListedin      bprefix:TVComedies , <http://raghav/Rathi#Kids'TV> .

bprefix:title84  a              bprefix:Title ;
        bprefix:fromCountry     bprefix:UnitedKingdom ;
        bprefix:hasCast         bprefix:PaulHollywood ;
        bprefix:hasDateAdded    "September 29, 2017" ;
        bprefix:hasDescription  "Gear up for a fast-paced journey as celebrity chef and avid auto enthusiast Paul Hollywood takes in the cars and culture of France, Italy and Germany." ;
        bprefix:hasDuration     "1 Season" ;
        bprefix:hasID           "80199032"^^xsd:int ;
        bprefix:hasRating       bprefix:TV-14 ;
        bprefix:hasReleaseyear  "2014"^^xsd:int ;
        bprefix:hasTitle        "Paul Hollywood's Big Continental Road Trip" ;
        bprefix:hasType         bprefix:TVShow ;
        bprefix:isListedin      bprefix:BritishTVShows , bprefix:Docuseries , bprefix:InternationalTVShows .

bprefix:title28  a              bprefix:Title ;
        bprefix:fromCountry     bprefix:UnitedStates ;
        bprefix:hasDateAdded    "September 7, 2018" ;
        bprefix:hasDescription  "Women whO ve been sexually brutalized in war-torn Congo begin to heal at City of Joy, a center that helps them regain a sense of self and empowerment." ;
        bprefix:hasDirector     bprefix:MadeleineGavin ;
        bprefix:hasDuration     "77 min" ;
        bprefix:hasID           "80203094"^^xsd:int ;
        bprefix:hasRating       bprefix:TV-MA ;
        bprefix:hasReleaseyear  "2018"^^xsd:int ;
        bprefix:hasTitle        "City of Joy" ;
        bprefix:hasType         bprefix:Movie ;
        bprefix:isListedin      bprefix:Documentaries .

现在我想将 title hasReleaseyear>2015 的三元组从这个默认图移动到命名图http://example.org/mynamedgraph

我可以构建我想要移动的三元组

CONSTRUCT {?title ?predicate ?object} WHERE{
  ?title ?predicate ?object.
  ?title bprefix:hasReleaseyear ?year FILTER(?year>2015)
}

我可以在网上看到的是 MOVE 操作会将“所有”三元组从默认移动到这个命名图。如何在将三元组从默认图移动到命名图之前过滤它们。

4

0 回答 0