public function setUp()
 {
     $loader = new XMLLoader();
     $ETree = $loader->load(DATA_PATH . 'etree_result.pmml');
     $this->Xpath = new \DOMXPath($ETree);
     $this->ETreeRules = $this->Xpath->evaluate('//ETreeRules')->item(0);
 }
 public function __construct($DDPath)
 {
     $loader = new XMLLoader();
     $this->DD = $loader->load($DDPath);
     // init XPath
     $this->ddXpath = new \DOMXPath($this->DD);
     $this->ddXpath->registerNamespace('data', "http://keg.vse.cz/ns/datadescription0_2");
 }
 protected function setUp()
 {
     $loader = new XMLLoader();
     $DD = $loader->load(DD);
     $DDP = new DataDescriptionParser($DD);
     $data = $DDP->parseData();
     $this->attributes = $data['DD']['transformationDictionary'];
     $FL = $loader->load(FL);
     $FLP = new FeatureListParser($FL, 'en');
     $data = $FLP->parseData();
     $this->coefficients = $data['BBA']['coefficients'];
 }
 protected function setUp()
 {
     $loader = new XMLLoader();
     $this->ER = $loader->load(ERARQUERY);
     $DD = $loader->load(DD);
     $DDP = new DataDescriptionParser($DD);
     $data = $DDP->parseData();
     $this->attributes = $data['DD']['transformationDictionary'];
     $FL = $loader->load(FL);
     $FLP = new FeatureListParser($FL, 'en');
     $data = $FLP->parseData();
     $this->IMs = $data['interestMeasures'];
 }
 protected function setUp()
 {
     $loader = new XMLLoader();
     $this->ER = $loader->load(ERTASKSETTING);
     $this->ERXPath = new DOMXPath($this->ER);
     $CP = new ConnectiveParser($this->ER, $this->ERXPath);
     $DD = $loader->load(DD);
     $DDP = new DataDescriptionParser($DD);
     $data = $DDP->parseData();
     $this->attributes = $data['DD']['transformationDictionary'];
     $FL = $loader->load(FL);
     $FLP = new FeatureListParser($FL, 'en');
     $data = $FLP->parseData();
     $this->IMs = $data['interestMeasures'];
     $this->DBAP = new DBAParser($this->ER, $this->ERXPath, $CP);
     $this->DBAP->parseDBAs();
     $this->BBAP = new BBAParser($this->ER, $this->ERXPath);
     $this->BBAP->parseBBAs();
 }
 protected function setUp()
 {
     $this->ER = new \DOMDocument('1.0', 'UTF-8');
     $this->ER->load(ERARQUERY, LIBXML_NOBLANKS);
     $this->ERXPath = new \DOMXPath($this->ER);
     $CP = new ConnectiveParser($this->ER, $this->ERXPath);
     $loader = new XMLLoader();
     $DD = $loader->load(DD);
     $DDP = new DataDescriptionParser($DD);
     $data = $DDP->parseData();
     $this->attributes = $data['DD']['transformationDictionary'];
     $FL = $loader->load(FL);
     $FLP = new FeatureListParser($FL, 'en');
     $data = $FLP->parseData();
     $this->IMs = $data['interestMeasures'];
     $this->DBAP = new DBAParser($this->ER, $this->ERXPath, $CP);
     $this->DBAP->parseDBAs();
     $this->BBAP = new BBAParser($this->ER, $this->ERXPath);
     $this->BBAP->parseBBAs();
 }
Exemple #7
0
 public function loadData()
 {
     $loader = new XMLLoader();
     $this->DD = $loader->load($this->DDPath);
     foreach ($this->FLPaths as $FLPath) {
         $FL = $loader->load($FLPath);
         array_push($this->FLs, $FL);
     }
     $this->FGC = $loader->load($this->FGCPath);
     $this->ER = $loader->load($this->ERPath);
     $this->ETree = $loader->load($this->ETreePath);
 }
 protected function setUp()
 {
     $loader = new XMLLoader();
     $this->ERAssociationRules = $loader->load(ERASSOCIATIONRULES);
     $this->ERTaskSettingRules = $loader->load(ERTASKSETTING);
     $this->ERARQueryRules = $loader->load(ERARQUERY);
     $DD = $loader->load(DD);
     $DDP = new DataDescriptionParser($DD);
     $data = $DDP->parseData();
     $this->attributes = $data['DD']['transformationDictionary'];
     $FL = $loader->load(FL);
     $FLP = new FeatureListParser($FL, 'en');
     $data = $FLP->parseData();
     $this->IMs = $data['interestMeasures'];
 }
 public function setUp()
 {
     $loader = new XMLLoader();
     $this->ETree = $loader->load(DATA_PATH . 'etree_result.pmml');
 }
 public function setUp()
 {
     $loader = new XMLLoader();
     $FA = $loader->load(FA);
     $this->FAXpath = new \DOMXPath($FA);
 }
 public function __construct($data)
 {
     $loader = new XMLLoader();
     $DOM = $loader->load($data);
     $this->XPath = new \DomXPath($DOM);
 }
 protected function setUp()
 {
     $loader = new XMLLoader();
     $this->DD = $loader->load(DD);
 }
require_once '../Bootstrap.php';
use IZI\Encoder\URLEncoder;
use IZI\FileLoader\XMLLoader;
$encoder = new URLEncoder();
$requestData = array('action' => 'getDocsNames', 'content' => '', 'id' => '');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://nlp.vse.cz:8081/xquery_search/xquery_servlet');
curl_setopt($ch, CURLOPT_POSTFIELDS, $encoder->encode($requestData));
curl_setopt($ch, CURLOPT_VERBOSE, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
$info = curl_getinfo($ch);
curl_close($ch);
$loader = new XMLLoader();
$result = $loader->load($response);
$xPath = new \DOMXPath($result);
$deletedCount = 0;
foreach ($xPath->evaluate('//doc') as $document) {
    $requestData = array('action' => 'deleteDocument', 'content' => '', 'id' => $document->nodeValue);
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, 'http://nlp.vse.cz:8081/xquery_search/xquery_servlet');
    curl_setopt($ch, CURLOPT_POSTFIELDS, $encoder->encode($requestData));
    curl_setopt($ch, CURLOPT_VERBOSE, false);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    $response = curl_exec($ch);
    $info = curl_getinfo($ch);
    curl_close($ch);
    $deletedCount++;