Revision: 37434
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at December 10, 2010 04:07 by murkanovic
Initial Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Trial</title> </head> <body> <?php define ( "RDFAPI_INCLUDE_DIR", "" ); include (RDFAPI_INCLUDE_DIR . "RdfAPI.php"); $someDoc = new Resource ( "http://www.example.org/someDocument.html" ); $creator = new Resource ( "http://www.purl.org/dc/elements/1.1/creator" ); $statement1 = new Statement ( $someDoc, $creator, new Literal ( "Radoslaw Oldakowski" ) ); $model1 = ModelFactory::getDefaultModel(); $model1->add ( $statement1 ); $model2 = ModelFactory::getDefaultModel(); $model2->add( new Statement ( $someDoc, new Resource ( "http://www.example.org/myVocabulary/title" ), new Literal ( "RAP tutorial" ) ) ); $model2->add( new Statement ( $someDoc, new Resource ( "http://www.example.org/myVocabulary/language" ), new Literal ( "English" ) ) ); $model1->addModel ( $model2 ); echo "\$model1 contains " . $model1->size () . " statements"; echo "<b>Output the MemModel as HTML table: </b><p>"; $model1->writeAsHtmlTable (); echo "<b>Output the plain text serialization of the MemModel: </b><p>"; echo $model1->toStringIncludingTriples (); echo "<b>Output the RDF/XML serialization of the MemModel: </b><p>"; echo $model1->writeAsHtml (); ?> </body>
Initial URL
https://sourceforge.net/projects/rdfapi-php/forums/forum/213511/topic/4005682/index/page/1
Initial Description
Initial Title
php rap example
Initial Tags
Initial Language
PHP