/** * @return string * @throws \Exception */ public function getDatatype() { $nodeFactory = new NodeFactory(); $datatypeUri = self::$xsdString; $datatype = librdf_node_get_literal_value_datatype_uri($this->redlandNode); if ($datatype !== null) { $datatypeUri = librdf_uri_to_string($datatype); } elseif ($this->getLanguage() !== null) { $datatypeUri = self::$rdfLangString; } return $nodeFactory->createNamedNode($datatypeUri); }
public function newNamedNodeInstance($uri) { $factory = new NodeFactory(); return $factory->createNamedNode($uri); }