$model->add(new Statement($myhomepage, $creation_date, $August16)); $model2->add(new Statement($myhomepage, $creation_date, $August16)); $language = new Resource("http://www.example.org/terms/language"); $deutsch = new Literal("Deutsch", "de"); $model->add(new Statement($myhomepage, $language, $deutsch)); $name = new Resource("http://www.example.org/terms/Name"); $chrisbizer = new Literal("Chris Bizer"); $model2->add(new Statement($me, $name, $chrisbizer)); // Output as Table echo "<h5>Model 1</h5>"; $model->writeAsHtmlTable(); echo "<h5>Model 2</h5>"; $model2->writeAsHtmlTable(); echo "<P>"; echo "<h3>2. Make some tests</h3>"; echo "Test: Model 2 contains any statements from model 1 :" . $model2->containsAny($model) . "<p>"; echo "Test: Model 1 contains any statements from model 2 :" . $model->containsAny($model2) . "<p>"; echo "Test: Model 2 contains all statements from model 1 :" . $model2->containsAll($model) . "<p>"; echo "Test: Model 1 contains all statements from model 2 :" . $model->containsAll($model2) . "<p>"; echo "Test: Model 1 equals model 2 :" . $model->equals($model2) . "<p>"; echo "<h3>3. Unite model 1 and model 2</h3>"; $model3 =& $model->unite($model2); $model3->writeAsHtmlTable(); echo "<h3>4. Intersect model 1 and model 2</h3>"; $model4 =& $model->intersect($model2); $model4->writeAsHtmlTable(); echo "<h3>5. Substract model 2 from model 1</h3>"; $model5 =& $model->subtract($model2); $model5->writeAsHtmlTable(); echo "<h3>6. Reify model 1</h3>"; $model6 =& $model->reify();