require_once '../config.php'; //Getting parameters $conceptIDToShow = $_GET['concept']; $tag = $_GET['tag']; //to avoid setting tag to map if the caller function is navigationConcept $isOnlyNavigation = $_GET['noTag']; //Creating classes $res = new ReasoningManager($TAGONTOLIB_MAPPING_ENDPOINT); $Ontology = new Ontology($ONTOLOGYID); //Retrieving the mapped concept by ID $mappedConcept = $Ontology->getConceptById($conceptIDToShow); //Adding support for reinforcement mapping $logman = new LoginManager(); //if the user is logged if ($logman->isLoggedin()) { $user = $logman->getLoggedUserDetails(); if (!$isOnlyNavigation) { $res->mapTagOnConcept(new Tag($tag), $mappedConcept, $user['id'], $user['significance'], $ONTOLOGYID); } } //Error handling if ($mappedConcept == null) { die('Mapped concept is null!'); } ?> <div id="ontologyResults"> <p id="ontologyMappedConcept"> <span id="concept"><?php echo $mappedConcept->getName();
<?php /** * This translator will OUTPUT a div containing all the code needed to let the user * discriminate between different mappings */ require_once '../config.php'; $tagtomap = $_GET['tag']; $tag = new Tag($tagtomap); $res = new ReasoningManager($TAGONTOLIB_MAPPING_ENDPOINT); $log = new LoginManager(); if ($log->isLoggedin()) { $usinfo = $log->getLoggedUserDetails(); $usid = $usinfo['id']; } else { $usid = 1; } $mappingresults = $res->getConceptsByTag($ONTOLOGYID, $tag, $usid); ?> <div id="disambiContainer"> <?php if ($mappingresults) { ?> <p>Choose the concept where to map the searched tag:</p> <ul> <?php foreach ($mappingresults as $Concept) { ?> <li class="disambiConcept"> <a onclick="choosedConcept('<?php echo $Concept->getId();