Ejemplo n.º 1
0
        <>  a ldp:DirectContainer, foaf:Document ;
            foaf:primaryTopic :dataset ;
            ldp:membershipResource :dataset ;
            ldp:hasMemberRelation void:dataDump ;
            ldp:insertedContentRelation foaf:primaryTopic ;
            
        .
        :dataset a void:Dataset, prov:Entity ;
            prov:wasGeneratedBy [
                a prov:Activity ;
                prov:used <{queryResource}> ;
                prov:wasAssociatedWith :sparqlServerUser
            ]
        .
        :sparqlServerUser a foaf:Agent;
            foaf:account [
                a foaf:OnlineAccount ;
                foaf:accountServiceHomepage <{endpoint}> ;
                foaf:accountname "{username}" ;
            ]
        .
     ';
}
// fix a bug of Easy RDF
EasyRdf_Format::register('turtle', 'Turtle Terse RDF Triple Language', 'http://www.w3.org/TR/turtle/', array('text/turtle' => 1.0, 'application/turtle' => 0.7, 'application/x-turtle' => 0.7), array('ttl'));
$errorManager = BOTK\Core\ErrorManager::getInstance()->registerErrorHandler();
try {
    echo BOTK\Core\EndPointFactory::make('MyRouter')->run();
} catch (Exception $e) {
    echo $errorManager->render($e);
}
<?php

/**
 * see sample doc in index.html
 */
$loader = (require '../vendor/autoload.php');
$loader->add('mylibrary\\', __DIR__);
// local end-points inclusion by composer autoloder
echo BOTK\Core\EndPointFactory::make('\\mylibrary\\HelloEndPoint\\Router')->run();
<?php

/**
 * see sample doc in index.html
 */
$loader = (require '../vendor/autoload.php');
// autoload dependencies
$loader->add('mylibrary\\', __DIR__);
// local end-points inclusion by composer autoloder
echo BOTK\Core\EndPointFactory::make('\\mylibrary\\SimpleHelloEndPoint')->run();