// ex6.trp - Example 6 // // A TRIPLE example using RDF // // Run with the -rdfdata command line argument: // // triple.sh -rdfdata Example6.rdf http://local.example.com/localNameSpace# localModelName ex6.trp lns := "http://local.example.com/localNameSpace#". rdf := "http://www.w3.org/1999/02/22-rdf-syntax-ns#". ex6 := "http://argos.isi.edu/example6#". @newModel { // Copy only the Computers into the new model FORALL O,P,V O[P->V] <- O[P->V]@lns:localModelName AND O[rdf:type -> ex6:Computer]@lns:localModelName. } //FORALL X,Y,Z,Mdl <- X[Y->Z]@Mdl. //See all facts FORALL X,Y,Z <- X[Y->Z]@newModel. //See facts in @newModel /* OUTPUT *** X = 'http://argos.isi.edu/example6#':'ISI_Office_Computer', Y = 'http://www.w3.org/TR/1999/PR-rdf-schema-19990303#':label, Z = 'ISI_Office_Computer' X = 'http://argos.isi.edu/example6#':'ISI_Office_Computer', Y = 'http://argos.isi.edu/example6#':'Memory', Z = 'http://argos.isi.edu/example6#':'Example6_Instance_13' X = 'http://argos.isi.edu/example6#':'ISI_Office_Computer', Y = 'http://argos.isi.edu/example6#':'OS', Z = 'http://argos.isi.edu/example6#':'Linux%20Redhat%209.0' ... X = 'http://argos.isi.edu/example6#':'Newer_Computer', Y = 'http://argos.isi.edu/example6#':'OS', Z = 'http://argos.isi.edu/example6#':'Windows%20XP%20Pro' X = 'http://argos.isi.edu/example6#':'Newer_Computer', Y = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#':type, Z = 'http://argos.isi.edu/example6#':'Computer' */