Changeset 27
- Timestamp:
- Jul 13, 2011, 1:46:00 AM (14 years ago)
- Location:
- php/trunk
- Files:
-
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
php/trunk/rdfa.php
r2 r27 18 18 */ 19 19 20 // --- load ARC21 if (!defined( 'ARC2'))22 die( 'error: ARC2 not defined !');23 require_once( ARC2.'/ARC2.php');24 25 // --- load and initialize fDebug26 // if not defined, load dummy class27 if (defined( 'fDebug'))28 require_once( fDebug.'/server/php/fdebug.lib.php');29 else30 require_once( RDFINT.'/classes/fdebug.php');31 32 20 // --- load classes of this library 33 if(!defined('RDFINT')) 34 die( 'error: RDFINT not defined !'); 21 if (!defined( 'RDFINT')) 22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 23 if (RDFINT == '') 24 die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !'); 35 25 require_once( RDFINT.'/classes/rdfa_Data.php'); 36 26 require_once( RDFINT.'/classes/rdfa_Projection.php'); … … 38 28 require_once( RDFINT.'/classes/rdfa_SparqlQuery.php'); 39 29 30 // --- load ARC 31 define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2')); 32 if( ARC2 == '') 33 die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !'); 34 require_once( ARC2.'/ARC2.php'); 35 36 // --- load fDebug 37 define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG')); 38 $locationStub = RDFINT.'/classes/fdebug.php'; 39 $locationLib1 = fDebug.'/server/php/fdebug.lib.php'; 40 $locationLib2 = fDebug.'/fdebug.lib.php'; 41 if (fDebug == '') { 42 $location = $locationStub; 43 } else { 44 $location = $locationLib1; 45 if (!file_exists( $location)) 46 $location = locationLib2; 47 if (!file_exists( $location)) 48 $location = $locationStub; 49 } 50 require_once( $location); 51 52 // --- configure fDebug 53 $fdebug = \fDebug::getInstance(); 54 If (isset( $_SERVER[ "SERVER_NAME"])) 55 $fdebug->setSession( $_SERVER[ "SERVER_NAME"]); 56 else { 57 $unittest_name = str_replace( '_', ' ', basename( getcwd())); 58 if (defined( 'SAMPLE_NAME')) 59 $fdebug->setSession( 'localhost', SAMPLE_NAME . ' ' . $unittest_name); 60 } 61 $fdebug->openSocket( '127.0.0.1'); 62 $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>'); 40 63 41 64 ?> -
php/trunk/samples/rdfa_projection_queries/sample.php
r6 r27 20 20 // load library setup 21 21 require_once( '../sample_config.php'); 22 require_once( '../fdebug_setup.php'); 22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 23 require_once( RDFINT.'/rdfa.php'); 23 24 24 25 $debugger = \fDebug::getInstance(); -
php/trunk/samples/rdfa_projections/sample.php
r6 r27 20 20 // load library setup 21 21 require_once( '../sample_config.php'); 22 require_once( '../fdebug_setup.php'); 22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 23 require_once( RDFINT.'/rdfa.php'); 23 24 24 25 $debugger = \fDebug::getInstance(); -
php/trunk/samples/rdfa_simple_api/sample.php
r17 r27 19 19 20 20 // load library setup 21 // load library setup 21 22 require_once( '../sample_config.php'); 22 require_once( '../fdebug_setup.php'); 23 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 24 require_once( RDFINT.'/rdfa.php'); 23 25 24 26 $debugger = \fDebug::getInstance(); 25 27 const debugcontext = "RDFA_SAMPLE"; 28 26 29 27 30 $turtlefile = "sample.ttl"; -
php/trunk/samples/sample_config.php
r6 r27 5 5 * Author: Christian Langanke, Adrian Gschwend 6 6 * 7 * Licensed under the Apache License, Ve rsion 2.0 (the "License");7 * Licensed under the Apache License, Ve on 2.0 (the "License"); 8 8 * you may not use this file except in compliance with the License. 9 9 * You may obtain a copy of the License at … … 18 18 */ 19 19 20 // ------ configure ARC2 - mandantory21 define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2'));22 20 23 // ----- configure fDebug - optional 24 // define locations of required external libraries 25 define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG')); 26 if (fDebug !== '') { 21 // define base name of sample in fDebug 22 define( 'SAMPLE_NAME', 'RDFInt Sample'); 27 23 28 // define base name of sample in fDebug 29 define( 'SAMPLE_NAME', 'RDFInt Sample'); 24 // activate debug output of the library classes 25 // if not set, only the sample code itself generates debug messages 26 define( 'RDFA_DEBUGOUTPUT_CLASSES', true); 30 27 31 // activate debug output of the library classes 32 // if not set, only the sample code itself generates debug messages 33 define( 'RDFA_DEBUGOUTPUT_CLASSES', true); 34 35 // activate debug output for specific RDFaLIB classes in samples and unittests 36 define( 'RDFA_DEBUGOUTPUT_READER', true); 37 define( 'RDFA_DEBUGOUTPUT_PROJECTION', true); 38 define( 'RDFA_DEBUGOUTPUT_SPARQLENDPOINT', true); 39 define( 'RDFA_DEBUGOUTPUT_SPARQLQUERY', true); 40 } 41 42 // define location of rdfint 43 // TODO - replace with autoload code 44 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 45 require_once( RDFINT.'/rdfa.php'); 28 // activate debug output for specific RDFaLIB classes in samples and unittests 29 define( 'RDFA_DEBUGOUTPUT_READER', true); 30 define( 'RDFA_DEBUGOUTPUT_PROJECTION', true); 31 define( 'RDFA_DEBUGOUTPUT_SPARQLENDPOINT', true); 32 define( 'RDFA_DEBUGOUTPUT_SPARQLQUERY', true); 46 33 47 34 ?> -
php/trunk/unittest/rdfa_merge/unittest.php
r7 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_parse_sparql/unittest.php
r7 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_projection_queries/unittest.php
r7 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_projections/unittest.php
r7 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_serialize/unittest.php
r17 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_set/unittest.php
r23 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdfa_simple_api/unittest.php
r17 r27 19 19 20 20 // load library setup 21 require_once( '../unittest_config.php'); 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase -
php/trunk/unittest/rdftestcases/unittest.php
r17 r27 18 18 */ 19 19 20 // load unittest setup 21 require_once( '../unittest_config.php'); 20 // load library setup 21 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT')); 22 require_once( RDFINT.'/rdfa.php'); 22 23 23 24 class UnitTest extends PHPUnit_Framework_TestCase {
Note:
See TracChangeset
for help on using the changeset viewer.