Changeset 17
- Timestamp:
- Jul 12, 2011, 10:56:58 AM (14 years ago)
- Location:
- php/trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
php/trunk/classes/rdfa_Data.php
r3 r17 22 22 /** 23 23 * \class Data 24 * \brief This class implements a RDF data class as specified in the25 * RDF API and RDFa specs of W3C.24 * \brief This class implements a RDF data class as described in the 25 * RDF API and RDFa API specs of W3C. 26 26 * \author Christian Langanke 27 27 * \author Adrian Gschwend … … 141 141 $uriObject = $this->resolve( $object); 142 142 143 // resolve m ay return NULL, then use original value143 // resolve method may return NULL, then use original value 144 144 $uriSubject = ($uriSubject === NULL) ? $subject : $uriSubject; 145 145 $uriPredicate = ($uriPredicate === NULL) ? $predicate : $uriPredicate; … … 360 360 * If the prefix is not known then this method will return null. 361 361 * 362 * \param curie URI to be mapped to a CURIE362 * \param curie CURIE to be resolved to a URI 363 363 * 364 364 * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong> … … 610 610 * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong> 611 611 */ 612 public function getUniqueProperties( $subject = Null) {612 public function _getUniqueProperties( $subject = Null) { 613 613 614 614 $aTriplesResult = $this->_filterTriples( $subject, Null, Null, … … 653 653 654 654 655 } // public function getUniqueProperties655 } // public function _getUniqueProperties 656 656 657 657 // -------------------------------------------------------- … … 718 718 * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong> 719 719 */ 720 public function getFirstValue( $subject = Null, $property = Null) {720 public function _getFirstValue( $subject = Null, $property = Null) { 721 721 722 722 $predicate = $property; … … 755 755 return $result; 756 756 757 } // public function getFirstValue757 } // public function _getFirstValue 758 758 759 759 /**@} */ /***************** DOXYGEN GROUP ENDS - Basic APIs */ … … 975 975 * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong> 976 976 */ 977 public function serialize( $type ) {977 public function _serialize( $type ) { 978 978 // set the supported types and shortcut them to the ones we use in there 979 979 $validTypes = array( 'application/rdf+xml' => 'rdfxml' , … … 1016 1016 return $ser->getSerializedTriples( $this->aTriples); 1017 1017 1018 } // public function serialize1018 } // public function _serialize 1019 1019 1020 1020 } // class Data -
php/trunk/classes/rdfa_Projection.php
r3 r17 22 22 /** 23 23 * \class Projection 24 * \brief This class implements a projection as specified in the RDF API and RDFaspecs of W3C.24 * \brief This class implements a projection as described in the RDF API and RDFa API specs of W3C. 25 25 * \details A projection relates to a specific subject of RDF data parsed by an instance of 26 26 * the rdfa::Data class and is to be created by the projection API methods this class only. … … 114 114 * 115 115 */ 116 public function getUniqueProperties() {117 return $this->rdfaData-> getUniqueProperties( $this->subject);118 } // public function getUniqueProperties116 public function _getUniqueProperties() { 117 return $this->rdfaData->_getUniqueProperties( $this->subject); 118 } // public function _getUniqueProperties 119 119 120 120 // -------------------------------------------------------- … … 136 136 137 137 public function get( $property) { 138 return $this->rdfaData-> getFirstValue( $this->subject, $property);138 return $this->rdfaData->_getFirstValue( $this->subject, $property); 139 139 } // public function get 140 140 -
php/trunk/classes/rdfa_SparqlEndpoint.php
r3 r17 23 23 * \class SparqlEndpoint 24 24 * \brief This class implements the configuration class for SPARQL endpoints, used 25 * for creation of rdfa::SparqlQuery objects. 25 * for creation of rdfa::SparqlQuery objects. 26 * <br>This is a library specific extension to the RDF API and RDFa API. 26 27 * \author Christian Langanke 27 28 * \author Adrian Gschwend … … 47 48 /** 48 49 * Creates an endpoint configuration class instance. 50 * 51 * \param aconfig associative list of configuration data 49 52 */ 50 53 public function __construct( $aconfig) { … … 74 77 75 78 /** 76 * Sets an endpoint configuration values 79 * Sets a single configuration value 80 * 81 * \param name name of the configurarion value 82 * \param value new value to be set 77 83 */ 78 84 public function setConfigurationValue( $name, $value) { … … 85 91 86 92 /** 87 * Gets an endpoint configuration values 93 * Gets a single configuration value 94 * 95 * \param name name of the configurarion value 88 96 */ 89 97 public function getConfigurationValue( $name) { … … 97 105 98 106 /** 99 * Queries the list of all endpointconfiguration values107 * Queries an associative list of the configuration values 100 108 */ 101 109 public function getConfigurationValues( ) { -
php/trunk/classes/rdfa_SparqlQuery.php
r3 r17 24 24 * \brief This class implements a class for executing SPARQL queries agains an endpoint 25 25 * by the Data::parse method. 26 * <br>This is a library specific extension to the RDF API and RDFa API. 26 27 * \author Christian Langanke 27 28 * \author Adrian Gschwend -
php/trunk/samples/rdfa_simple_api/sample.php
r6 r17 55 55 56 56 $debugger->sendMessage( "Retrieving name of person", debugcontext); 57 $litName = $rdfaData-> getFirstValue( $uriPerson, 'foaf:name');57 $litName = $rdfaData->_getFirstValue( $uriPerson, 'foaf:name'); 58 58 59 59 // get triples of work blank node … … 62 62 63 63 $debugger->sendMessage( "Retrieving city of work", debugcontext); 64 $litCity = $rdfaData-> getFirstValue( $aUriWork[ 0], 'foaf:city');64 $litCity = $rdfaData->_getFirstValue( $aUriWork[ 0], 'foaf:city'); 65 65 66 66 $debugger->sendMessage( "Data for person complete: $uriPerson\n". -
php/trunk/unittest/makefile
r9 r17 71 71 ifeq ($(TESTCASE),) 72 72 ifeq ($(OS), Windows_NT) 73 -@for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c changedir73 @for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c changedir 74 74 else 75 -@for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c changedir; done75 @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c changedir; done 76 76 endif 77 77 else 78 -@make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) changedir78 @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) changedir 79 79 endif 80 80 -
php/trunk/unittest/rdfa_serialize/unittest.php
r7 r17 67 67 68 68 // this call must fail , returning false 69 $doc = $this->rdfaData-> serialize( 'dummy');69 $doc = $this->rdfaData->_serialize( 'dummy'); 70 70 $this->assertEquals( ($doc === false), true); 71 71 72 72 // these call must return a proper serialization 73 73 foreach ( $validTypes as $type) { 74 $doc = $this->rdfaData-> serialize( $type);74 $doc = $this->rdfaData->_serialize( $type); 75 75 $this->assertEquals( ($doc !== false), true); 76 76 $this->assertEquals( (strlen($doc) > 0), true); -
php/trunk/unittest/rdfa_simple_api/unittest.php
r7 r17 77 77 78 78 // retrieve name 79 $litName = $this->rdfaData-> getFirstValue( $uriPerson, 'foaf:name');79 $litName = $this->rdfaData->_getFirstValue( $uriPerson, 'foaf:name'); 80 80 $this->assertInternalType( 'string', $litName); 81 81 $this->assertGreaterThan( 0, strlen( $litName)); … … 87 87 88 88 // retrieve city name 89 $litCity = $this->rdfaData-> getFirstValue( $aUriWork[ 0], 'foaf:city');89 $litCity = $this->rdfaData->_getFirstValue( $aUriWork[ 0], 'foaf:city'); 90 90 $this->assertInternalType( 'string', $litCity); 91 91 $this->assertGreaterThan( 0, strlen( $litCity)); -
php/trunk/unittest/rdftestcases/unittest.php
r7 r17 46 46 $this->assertInstanceOf( '\rdfa\Data', $rdfaData); 47 47 $rdfaData->parse( $uri); 48 return $rdfaData-> serialize( 'n3');48 return $rdfaData->_serialize( 'n3'); 49 49 50 50 } // private function _getSerializedData
Note:
See TracChangeset
for help on using the changeset viewer.