当前位置: 首页>>代码示例>>PHP>>正文


PHP ARC2::getStoreEndpoint方法代码示例

本文整理汇总了PHP中ARC2::getStoreEndpoint方法的典型用法代码示例。如果您正苦于以下问题:PHP ARC2::getStoreEndpoint方法的具体用法?PHP ARC2::getStoreEndpoint怎么用?PHP ARC2::getStoreEndpoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ARC2的用法示例。


在下文中一共展示了ARC2::getStoreEndpoint方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: synchro_rdf

 function synchro_rdf($session_id = 0, $activateEndpoint = false, $altBaseUri = '')
 {
     global $charset;
     //Pour créer des tables temporaires
     if ($session_id) {
         $this->config['store_name'] = $session_id . $this->config['store_name'];
     }
     //endpoint pour connecteurs
     if ($activateEndpoint) {
         $this->store = ARC2::getStoreEndpoint($this->config);
         $this->store->go();
     } else {
         //on initialise les tables mysql
         $this->initStore();
         if ($charset == 'utf-8') {
             mysql_query("SET NAMES 'utf8'");
         }
         //on initialise les uri
         if (trim($altBaseUri)) {
             $this->baseURI = $altBaseUri;
         }
         $this->prefix .= "\n\t\t\tPREFIX pmb: <" . $this->baseURI . ">\n\n";
         $this->baseUriConcept = $this->baseURI . "concept#";
         $this->baseUriThesaurus = $this->baseURI . "thesaurus#";
         $this->baseUriManifestation = $this->baseURI . "manifestation#";
         $this->baseUriExpression = $this->baseURI . "expression#";
         $this->baseUriOeuvre = $this->baseURI . "oeuvre#";
         $this->baseUriOeuvreBulletin = $this->baseURI . "oeuvre#fromBulletin";
         $this->baseUriAuteur = $this->baseURI . "auteur#";
         //on charge les correspondances rdf
         $this->loadMapping();
     }
     return;
 }
开发者ID:bouchra012,项目名称:PMB,代码行数:34,代码来源:synchro_rdf.class.php

示例2: executeEndpoint

 /**
  * Executes endpoint action
  *
  */
 public function executeEndpoint()
 {
     require_once SF_ROOT_DIR . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . SF_APP . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'arc_config.php';
     /* instantiation */
     $ep = ARC2::getStoreEndpoint($arc_config);
     /* request handling */
     $ep->go();
     $this->ep = $ep;
     return sfView::NONE;
 }
开发者ID:jonphipps,项目名称:Metadata-Registry,代码行数:14,代码来源:actions.class.php

示例3: __construct

 function __construct()
 {
     parent::__construct('SPARQLEndpoint');
     # Set up some stuff
     $this->sparqlendpointconfig = $this->getSPARQLEndpointConfig();
     $this->sparqlendpoint = ARC2::getStoreEndpoint($this->sparqlendpointconfig);
     $this->sparqlparser = ARC2::getSPARQLPlusParser();
     $this->store = new RDFIOARC2StoreWrapper();
     $this->user = new RDFIOUser();
     $this->requestdata = null;
 }
开发者ID:rdfio,项目名称:RDFIO,代码行数:11,代码来源:SpecialSPARQLEndpoint_body.php

示例4: process

 public function process()
 {
     /* MySQL and endpoint configuration */
     $config = array_merge_recursive($this->storeService->getConfig(), array('endpoint_features' => array('select', 'construct', 'ask', 'describe', 'load', 'insert', 'delete', 'dump'), 'endpoint_timeout' => 60, 'endpoint_read_key' => '', 'endpoint_write_key' => 'REPLACE_THIS_WITH_SOME_KEY', 'endpoint_max_limit' => 250));
     /* instantiation */
     $ep = ARC2::getStoreEndpoint($config);
     if (!$ep->isSetUp()) {
         $ep->setUp();
         /* create MySQL tables */
     }
     /* request handling */
     $ep->go();
 }
开发者ID:gitter-badger,项目名称:wordlift-plugin,代码行数:13,代码来源:SparqlEndPointAjaxService.php

示例5: __construct

    function __construct() {
        global $wgUser, $rdfiogQueryByOrigURI;

        parent::__construct( 'SPARQLEndpoint' );
        $this->m_sparqlendpointconfig = $this->getSPARQLEndpointConfig();
        $this->m_sparqlendpoint = ARC2::getStoreEndpoint( $this->m_sparqlendpointconfig );
        $this->m_sparqlparser = ARC2::getSPARQLPlusParser();
        $this->m_store = new RDFIOStore();

        $userrights = $wgUser->getRights();
        if ( in_array( 'edit', $userrights ) && in_array( 'createpage', $userrights ) ) {
            $this->m_haswriteaccess = true;
        } else {
            $this->m_haswriteaccess = false;
        }
        if ( in_array( 'edit', $userrights ) && in_array( 'delete', $userrights ) ) {
            $this->m_hasdeleteaccess = true;
        } else {
            $this->m_hasdeleteaccess = false;
        }
    }
开发者ID:realsoc,项目名称:mediawiki-extensions,代码行数:21,代码来源:SpecialSPARQLEndpoint_body.php

示例6: extractLinkedData

<?php

// Zeige keine NOTICE Meldungen an
//error_reporting (E_ALL ^ E_NOTICE);
/* ARC2 static class inclusion */
include_once 'arc2/ARC2.php';
include_once 'response.php';
require_once './config/config.php';
/* instantiation */
$ep = ARC2::getStoreEndpoint($config);
if (!$ep->isSetUp()) {
    $ep->setUp();
    /* create MySQL tables */
}
if (!empty($_GET['url'])) {
    $origin = $_GET['url'];
    $url = str_replace("/page/", "/data/", $origin);
    $url .= ".ntriples";
    $res = extractLinkedData($url, $origin);
    print_r($res);
}
function extractLinkedData($link, $origin)
{
    global $ep;
    // Wenn es die URL im Graph schon gibt, nichts machen, TODO besser updaten?
    if (graphContainsUrl($link)) {
        $res = new Response(null, "URL {$link} already visited, skip indexing");
        return res;
    } else {
        $parser = ARC2::getTurtleParser();
        //$data = $_POST['turtle'];
开发者ID:neumann89,项目名称:FUB-xml-project6-2013,代码行数:31,代码来源:linkeddataendpoint.php

示例7: error_log

         error_log("DEBUG: initial RSS file does not exists", 0);
         SMOBTools::initial_rss_file();
     }
     $rssfile = fopen(FEED_FILE_PATH, 'r');
     $rss = fread($rssfile, filesize(FEED_FILE_PATH));
     fclose($rssfile);
     echo $rss;
 } elseif ($t == 'rssrdf_owner') {
     header("Content-type: text/xml");
     $tweet = new SMOBFeed();
     $tweet->rssrdf();
 } elseif ($t == 'sparql') {
     if ($_POST) {
         SMOBTools::checkAccess($_POST);
     }
     $ep = ARC2::getStoreEndpoint(SMOBTools::arc_config());
     $ep->go();
     // callback script to process the incoming hub POSTs
 } elseif ($t == 'callback') {
     if (array_key_exists('REMOTE_HOST', $_SERVER)) {
         //&& ($_SERVER['REMOTE_HOST'] == HUB_URL_SUBSCRIBE)) {
         error_log("DEBUG: request from host: " . $_SERVER['REMOTE_HOST']);
     }
     if (array_key_exists('HTTP_USER_AGENT', $_SERVER)) {
         error_log("DEBUG: request from user_agent: " . $_SERVER['REMOTE_HOST']);
     }
     // Getting hub_challenge from hub after sending it post subscription
     if (isset($_GET["hub_challenge"])) {
         // send confirmation to the hub
         echo $_GET["hub_challenge"];
         error_log("DEBUG: received and sent back hub challenge:" . $_GET["hub_challenge"], 0);
开发者ID:anukat2015,项目名称:smob,代码行数:31,代码来源:index.php

示例8: doSparqlEndpoint

function doSparqlEndpoint()
{
    global $DBCFG;
    /* Include ARC2 classes. */
    require_once T3_ABSPATH . 'common/arc2/ARC2.php';
    /* ARC2 static class inclusion */
    /* MySQL and endpoint configuration */
    $config = array('db_host' => $DBCFG["Server"], 'db_name' => $DBCFG["DBName"], 'db_user' => $DBCFG["DBLogin"], 'db_pwd' => $DBCFG["DBPass"], 'store_name' => $DBCFG["DBprefix"], 'endpoint_features' => array('select', 'construct', 'ask', 'describe', 'load'), 'endpoint_timeout' => 60, 'endpoint_read_key' => '', 'endpoint_write_key' => '', 'endpoint_max_limit' => 250);
    /* instantiation */
    $ep = ARC2::getStoreEndpoint($config);
    if (!$ep->isSetUp()) {
        $ep->setUp();
        /* create MySQL tables */
    }
    // reset the endpoint
    $ep->reset();
    // ask terms
    $sql = SQLIdTerminosValidos();
    //fetch main metadata
    $sparql_command = 'LOAD <' . $_SESSION["CFGURL"] . 'xml.php?skosMeta=1> into <' . $_SESSION["CFGURL"] . '>';
    $ep->query($sparql_command);
    while ($array = $sql->FetchRow()) {
        $i == ++$i;
        #Mantener vivo el navegador
        $time_now = time();
        if ($time_start >= $time_now + 10) {
            $time_start = $time_now;
            header('X-pmaPing: Pong');
        }
        $sparql_command = 'LOAD <' . $_SESSION["CFGURL"] . 'xml.php?skosNode=' . $array[id] . '> into <' . $_SESSION["CFGURL"] . '>';
        $ep->query($sparql_command);
    }
    //Update data about las endpoint
    $ARRAYlastUpdateEndpoint = fetchlastUpdateEndpoint();
    if ($ARRAYlastUpdateEndpoint["value"]) {
        $sql = SQL("update", " {$DBCFG['DBprefix']}values set value=now() where  value_type='DATESTAMP' and value_code='ENDPOINT_CHANGE'");
    } else {
        $sql = SQL("insert", "into {$DBCFG['DBprefix']}values (`value_type`, `value`, `value_order`, `value_code`) VALUES\r\n\t\t\t\t\t('DATESTAMP', now(), NULL, 'ENDPOINT_CHANGE')");
    }
    return array("count_nodes" => $i);
}
开发者ID:kodizant,项目名称:TemaTres-Vocabulary-Server,代码行数:41,代码来源:fun.admin.php

示例9: get_onto_endpoint

 public function get_onto_endpoint()
 {
     foreach ($this->namespaces as $key => $uri) {
         $prefix .= "PREFIX " . $key . ": <" . $uri . ">";
     }
     if (isset($_POST['query'])) {
         $_POST['query'] = $prefix . "\n\t\t\t" . $_POST['query'];
     }
     $onto_store_config = $this->ontostore_params;
     $onto_store_config['endpoint_features'] = array('select');
     $store = ARC2::getStoreEndpoint($onto_store_config);
     $store->go();
 }
开发者ID:noble82,项目名称:proyectos-ULS,代码行数:13,代码来源:ontology.class.php


注:本文中的ARC2::getStoreEndpoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。