Changeset 17


Ignore:
Timestamp:
Jul 12, 2011, 10:56:58 AM (14 years ago)
Author:
cla
Message:

rdfint

  • prefix non-standard methods of rdfa::Data and rdfa::Projection with underscore
  • add note to description of rdfa::SparlEndpoint and rdfa::SparlQuery that they are no-standard as well
Location:
php/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • php/trunk/classes/rdfa_Data.php

    r3 r17  
    2222/**
    2323 *  \class  Data
    24  *  \brief  This class implements a RDF data class as specified in the
    25  *          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.
    2626 *  \author Christian Langanke
    2727 *  \author Adrian Gschwend
     
    141141    $uriObject    = $this->resolve( $object);
    142142
    143     // resolve may return NULL, then use original value
     143    // resolve method may return NULL, then use original value
    144144    $uriSubject   = ($uriSubject   === NULL) ? $subject   : $uriSubject;
    145145    $uriPredicate = ($uriPredicate === NULL) ? $predicate : $uriPredicate;
     
    360360   * If the prefix is not known then this method will return null.
    361361   *
    362    * \param curie            URI to be mapped to a CURIE
     362   * \param curie            CURIE to be resolved to a URI
    363363   *
    364364   * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong>
     
    610610   * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong>
    611611   */
    612   public function getUniqueProperties( $subject = Null) {
     612  public function _getUniqueProperties( $subject = Null) {
    613613
    614614    $aTriplesResult = $this->_filterTriples( $subject, Null, Null,
     
    653653
    654654
    655   } // public function getUniqueProperties
     655  } // public function _getUniqueProperties
    656656
    657657  // --------------------------------------------------------
     
    718718   * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong>
    719719   */
    720   public function getFirstValue( $subject = Null, $property = Null) {
     720  public function _getFirstValue( $subject = Null, $property = Null) {
    721721
    722722    $predicate = $property;
     
    755755    return $result;
    756756
    757   } // public function getFirstValue
     757  } // public function _getFirstValue
    758758
    759759  /**@} */ /***************** DOXYGEN GROUP ENDS - Basic APIs */
     
    975975   * <strong>NOTE: This method is a library specific extension to the RDF API and RDFa API.</strong>
    976976   */
    977   public function serialize( $type ) {
     977  public function _serialize( $type ) {
    978978    // set the supported types and shortcut them to the ones we use in there
    979979    $validTypes = array( 'application/rdf+xml' => 'rdfxml' ,
     
    10161016    return $ser->getSerializedTriples( $this->aTriples);
    10171017
    1018   } // public function serialize
     1018  } // public function _serialize
    10191019
    10201020} // class Data
  • php/trunk/classes/rdfa_Projection.php

    r3 r17  
    2222/**
    2323 *  \class   Projection
    24  *  \brief   This class implements a projection as specified in the RDF API and RDFa specs of W3C.
     24 *  \brief   This class implements a projection as described  in the RDF API and RDFa API specs of W3C.
    2525 *  \details A projection relates to a specific subject of RDF data parsed by an instance of
    2626 *           the rdfa::Data class and is to be created by the projection API methods this class only.
     
    114114   *
    115115   */
    116   public function getUniqueProperties() {
    117     return $this->rdfaData->getUniqueProperties( $this->subject);
    118   } // public function getUniqueProperties
     116  public function _getUniqueProperties() {
     117    return $this->rdfaData->_getUniqueProperties( $this->subject);
     118  } // public function _getUniqueProperties
    119119
    120120  // --------------------------------------------------------
     
    136136
    137137  public function get( $property) {
    138     return $this->rdfaData->getFirstValue( $this->subject, $property);
     138    return $this->rdfaData->_getFirstValue( $this->subject, $property);
    139139  } // public function get
    140140
  • php/trunk/classes/rdfa_SparqlEndpoint.php

    r3 r17  
    2323 *  \class  SparqlEndpoint
    2424 *  \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.
    2627 *  \author Christian Langanke
    2728 *  \author Adrian Gschwend
     
    4748  /**
    4849   * Creates an endpoint configuration class instance.
     50   *
     51   * \param aconfig    associative list of configuration data
    4952   */
    5053  public function __construct( $aconfig) {
     
    7477
    7578  /**
    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
    7783   */
    7884  public function setConfigurationValue( $name, $value) {
     
    8591
    8692  /**
    87    * Gets an endpoint configuration values
     93   * Gets a single configuration value
     94   *
     95   * \param name   name of the configurarion value
    8896   */
    8997  public function getConfigurationValue( $name) {
     
    97105
    98106  /**
    99    * Queries the list of all endpoint configuration values
     107   * Queries an associative list of the configuration values
    100108   */
    101109  public function getConfigurationValues( ) {
  • php/trunk/classes/rdfa_SparqlQuery.php

    r3 r17  
    2424 *  \brief  This class implements a class for executing SPARQL queries agains an endpoint
    2525 *          by the Data::parse method.
     26 *          <br>This is a library specific extension to the RDF API and RDFa API.
    2627 *  \author Christian Langanke
    2728 *  \author Adrian Gschwend
  • php/trunk/samples/rdfa_simple_api/sample.php

    r6 r17  
    5555
    5656  $debugger->sendMessage( "Retrieving name of person", debugcontext);
    57   $litName = $rdfaData->getFirstValue( $uriPerson, 'foaf:name');
     57  $litName = $rdfaData->_getFirstValue( $uriPerson, 'foaf:name');
    5858
    5959  // get triples of work blank node
     
    6262
    6363  $debugger->sendMessage( "Retrieving city of work", debugcontext);
    64   $litCity =  $rdfaData->getFirstValue( $aUriWork[ 0], 'foaf:city');
     64  $litCity =  $rdfaData->_getFirstValue( $aUriWork[ 0], 'foaf:city');
    6565
    6666  $debugger->sendMessage( "Data for person complete: $uriPerson\n".
  • php/trunk/unittest/makefile

    r9 r17  
    7171ifeq ($(TESTCASE),)
    7272ifeq ($(OS), Windows_NT)
    73         -@for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c changedir
     73        @for /d %%c in (*) do @make -s TESTCASE=%%c SUBDIR=%%c changedir
    7474else
    75         -@for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c changedir; done
     75        @for c in `find . -maxdepth 1 -type d -path "./*_*"`; do make -s TESTCASE=$$c SUBDIR=$$c changedir; done
    7676endif
    7777else
    78         -@make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) changedir
     78        @make -s TESTCASE=$(TESTCASE) SUBDIR=$(TESTCASE) changedir
    7979endif
    8080
  • php/trunk/unittest/rdfa_serialize/unittest.php

    r7 r17  
    6767
    6868    // this call must fail , returning false
    69     $doc = $this->rdfaData->serialize( 'dummy');
     69    $doc = $this->rdfaData->_serialize( 'dummy');
    7070    $this->assertEquals( ($doc === false), true);
    7171
    7272    // these call must return a proper serialization
    7373    foreach ( $validTypes as $type) {
    74       $doc = $this->rdfaData->serialize( $type);
     74      $doc = $this->rdfaData->_serialize( $type);
    7575      $this->assertEquals( ($doc !== false), true);
    7676      $this->assertEquals( (strlen($doc) > 0), true);
  • php/trunk/unittest/rdfa_simple_api/unittest.php

    r7 r17  
    7777
    7878    // retrieve name
    79     $litName = $this->rdfaData->getFirstValue( $uriPerson, 'foaf:name');
     79    $litName = $this->rdfaData->_getFirstValue( $uriPerson, 'foaf:name');
    8080    $this->assertInternalType( 'string', $litName);
    8181    $this->assertGreaterThan( 0, strlen( $litName));
     
    8787
    8888    // retrieve city name
    89     $litCity =  $this->rdfaData->getFirstValue( $aUriWork[ 0], 'foaf:city');
     89    $litCity =  $this->rdfaData->_getFirstValue( $aUriWork[ 0], 'foaf:city');
    9090    $this->assertInternalType( 'string', $litCity);
    9191    $this->assertGreaterThan( 0, strlen( $litCity));
  • php/trunk/unittest/rdftestcases/unittest.php

    r7 r17  
    4646    $this->assertInstanceOf( '\rdfa\Data', $rdfaData);
    4747    $rdfaData->parse( $uri);
    48     return  $rdfaData->serialize( 'n3');
     48    return  $rdfaData->_serialize( 'n3');
    4949
    5050  } // private function _getSerializedData
Note: See TracChangeset for help on using the changeset viewer.