Permalink
Browse files

Completed getAllURIs() method

  • Loading branch information...
1 parent c5c1e39 commit c2adf3a13fb4cdd0a554ca1f89ac6b292c753301 Samuel Lampa committed Nov 7, 2011
Showing with 11 additions and 1 deletion.
  1. +11 −1 classes/data/RDFIO_DataAggregate.php
View
12 classes/data/RDFIO_DataAggregate.php
@@ -39,7 +39,17 @@ public function getSubjectDataFromURI( $uriStr ) {
}
public function getAllURIs() {
- // TODO: Implement
+ $allURIs = array();
+ foreach( $this->getSubjectDatas() as $subjectData ) {
+ $allURIs[] = $subjectData->getSubject();
+ foreach( $subjectData->getFacts() as $fact ) {
+ $allURIs[] = $fact->getPredicate();
+ $object = $fact->getObject();
+ if ( has_class($object) == 'RDFIOURI' )
+ $allURIs[] = $object;
+ }
+ }
+ return $allURIs;
}
# Factory methods, from RDF text formats

0 comments on commit c2adf3a

Please sign in to comment.