Ejemplo n.º 1
0
 public function testGetUriWithGraph()
 {
     $graph = new EasyRdf_Graph();
     $res = new EasyRdf_Resource('http://example.com/testGetUriWithGraph', $graph);
     $this->assertSame('http://example.com/testGetUriWithGraph', $res->getUri());
 }
Ejemplo n.º 2
0
 public static function createFromRDF(EasyRdf_Resource $annoResource)
 {
     $textAnno = new TextAnnotation($annoResource->getUri(), $annoResource->getLiteral("stanbol:start")->getValue(), $annoResource->getLiteral("stanbol:end")->getValue(), $annoResource->getLiteral("stanbol:confidence")->getValue());
     $textAnno->setSelectedText($annoResource->getLiteral("stanbol:selected-text")->getValue());
     return $textAnno;
 }