source: php/trunk/rdfa.php

Last change on this file was 72, checked in by cla, 14 years ago

rdfint

  • implemented core wrapper class for external libraries (current support: only ARC)
  • modified classes to adapt to new core class
    • SparqlQuery::run
    • Data:parse
    • Data:_serialize
  • added samples rdfa_serialize and rdfa_serialize
  • Property svn:eol-style set to native
File size: 2.1 KB
Line 
1<?php
2
3/* RDFInt - RDF Interfaces for PHP
4 * Copyright 2011 netlabs.org
5 * Author: Christian Langanke, Adrian Gschwend
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20// --- load classes of this library
21if (!defined( 'RDFINT'))
22 define( 'RDFINT', getenv( 'PHP_LIBROOT_RDFINT'));
23if (RDFINT == '')
24 die( 'error: environment variable PHP_LIBROOT_RDFINT not defined !');
25require_once( RDFINT.'/classes/rdfa_Data.php');
26require_once( RDFINT.'/classes/rdfa_Projection.php');
27require_once( RDFINT.'/classes/rdfa_SparqlEndpoint.php');
28require_once( RDFINT.'/classes/rdfa_SparqlQuery.php');
29require_once( RDFINT.'/classes/Core.php');
30
31// --- load ARC
32define( 'ARC2', getenv( 'PHP_LIBROOT_ARC2'));
33if( ARC2 == '')
34 die( 'error:environment variable PHP_LIBROOT_ARC2 not defined !');
35require_once( ARC2.'/ARC2.php');
36
37// --- load fDebug
38define( 'fDebug', getenv( 'PHP_LIBROOT_FDEBUG'));
39$locationStub = RDFINT.'/classes/fdebug.php';
40$locationLib1 = fDebug.'/server/php/fdebug.lib.php';
41$locationLib2 = fDebug.'/fdebug.lib.php';
42if (fDebug == '') {
43 $location = $locationStub;
44} else {
45 $location = $locationLib1;
46 if (!file_exists( $location))
47 $location = locationLib2;
48 if (!file_exists( $location))
49 $location = $locationStub;
50}
51require_once( $location);
52
53// --- configure fDebug
54if (defined( 'FDEBUG_SESSION_NAME') != '') {
55 $fdebug = \fDebug::getInstance();
56 If (isset( $_SERVER[ "SERVER_NAME"]))
57 $fdebug->setSession( $_SERVER[ "SERVER_NAME"]);
58 else
59 $fdebug->setSession( 'localhost', FDEBUG_SESSION_NAME);
60 $fdebug->openSocket( '127.0.0.1');
61 $fdebug->sendSource( '<?xml version="1.0" ?><emptysource/>');
62}
63
64?>
Note: See TracBrowser for help on using the repository browser.