Example #1
0
 public function toRdfArray()
 {
     $bnodeId = RdfArray::getNewBnodeId();
     $retval = RdfArray::createArray($bnodeId, "rdf:type", "owl:Restriction");
     $retval[] = RdfArray::createArray($bnodeId, "owl:onProperty", $this->getObjectPropertyExpression());
     $retval[] = RdfArray::createArray($bnodeId, $this->getPredicateString(), $this->getClassExpression());
     return $retval;
 }
 public function toRdfArray()
 {
     $bnodeId = RdfArray::getNewBnodeId();
     $retval = RdfArray::createArray($bnodeId, "rdf:type", "owl:Restriction");
     $retval[] = RdfArray::createArray($bnodeId, "owl:qualifiedCardinality", new TypedLiteral($this->cardinality, "xsd:nonNegativeInteger"));
     $retval[] = RdfArray::createArray($bnodeId, "owl:onProperty", $this->getObjectPropertyExpression());
     $retval[] = RdfArray::createArray($bnodeId, "owl:onClass", $this->getClassExpression());
     return $retval;
 }
Example #3
0
 public function toRdfArray()
 {
     $bNodeId = RdfArray::getNewBnodeId();
     $nextBNodeId = null;
     $retval = array();
     $elements = $this->getElements();
     foreach ($elements as $element) {
         $retval[] = RdfArray::createArray($bNodeId, "rdf:first", $element->getValue(), $element instanceof StringLiteral ? $element->getLang() : null, method_exists($element, "getDatatype") ? $element->getDatatype() : null);
         $nextBNodeId = RdfArray::getNewBnodeId();
         $retval[] = RdfArray::createArray($bNodeId, "rdf:rest", $element != end($elements) ? $nextBNodeId : "rdf:nil");
         $bNodeId = $nextBNodeId;
     }
     return $retval;
 }
Example #4
0
 public function toRdfArray()
 {
     return RdfArray::createArray(implode(" ", $this->getElements()), "rdf:type", "" . $this->classExpression);
 }
Example #5
0
 public function toRdfArray()
 {
     $retval = RdfArray::createArray("bnode", "rdf:type", "owl:AllDisjointClasses");
     $retval[] = RdfArray::createArray("bnode", "owl:members", implode(" ", $this->getElements()));
     return $retval;
 }