Ejemplo n.º 1
0
<p> <?php 
            echo $numOfRecords;
            ?>
 terms(s) returned. <?php 
            if (sizeof($results) == 10000) {
                ?>
  <span class="darkred">There are still more terms in this ontology.</span>
  <?php 
            }
            ?>
 Please click a term for detail information. </p>
<table border="0">
  <tr>
    <td bgcolor="#F5FAF7" class="tdData" style="padding-left:20px; padding-right:20px ">
<strong>Term Type:</strong> <?php 
            print getShortTerm($iri);
            ?>
    </td>
    <td bgcolor="#F5FAF7" class="tdData" style="padding-left:20px; padding-right:20px ">
<strong>Record:</strong> <?php 
            echo ($currPage - 1) * $recordsPerPage + 1;
            ?>
 to <?php 
            echo $currPage * $recordsPerPage < $numOfRecords ? $currPage * $recordsPerPage : $numOfRecords;
            ?>
 of <?php 
            echo $numOfRecords;
            ?>
 Records.	</td>
    <td bgcolor="#F5FAF7" class="tdData" style="padding-left:20px; padding-right:20px ">
<strong>Page:</strong>
Ejemplo n.º 2
0
function getRDFjsonDetail($results, $term_iri, $tmp_iri, $a_label, $link = false)
{
    global $o, $settings;
    $array_return = array();
    $result_main = $results[$term_iri];
    if (isset($result_main[$tmp_iri])) {
        foreach ($result_main[$tmp_iri] as $result) {
            if ($link && $result['type'] == 'uri') {
                $array_return[] = "<a oncontextmenu=\"return false;\" href=\"/browser/rdf.php?o={$o}&amp;iri=" . myUrlEncode($result['value']) . "\">" . $a_label[$result['value']] . "</a>";
            } elseif ($result['type'] == 'uri') {
                if ($tmp_iri == 'http://xmlns.com/foaf/0.1/depicted_by') {
                    $array_return[] = $result['value'];
                } elseif (isset($a_label[$result['value']])) {
                    $array_return[] = $a_label[$result['value']];
                } else {
                    $array_return[] = getShortTerm($result['value']);
                }
            } elseif ($result['type'] == 'bnode') {
                $tmp_result = $results[$result['value']];
                foreach ($tmp_result['http://www.w3.org/2000/01/rdf-schema#label'] as $tmp_result) {
                    if (preg_match('/\\w+/', $tmp_result['value'])) {
                        $array_return[] = UTF_to_Unicode($tmp_result['value']);
                    }
                }
            } else {
                if (preg_match('/\\w+/', $result['value'])) {
                    $array_return[] = UTF_to_Unicode($result['value']);
                }
            }
        }
    }
    return join(', ', array_unique($array_return));
}
Ejemplo n.º 3
0
<table cellpadding="4" cellspacing="1" bgcolor="#888888">
  <tr>
    <td bgcolor="#EAF1F2" style="font-weight:bold">Ontology listed in Ontobee</td>
    <td bgcolor="#EAF1F2" style="font-weight:bold">Ontology OWL file</td>
    <td bgcolor="#EAF1F2" style="font-weight:bold">View instance in context</td>
    <td bgcolor="#EAF1F2" style="font-weight:bold">Project home page</td>
    </tr>
<?php 
        foreach ($other_ontologies_results as $other_ontology) {
            $other_ontology = $array_ontology[$other_ontology['g']];
            if ($other_ontology['ontology_abbrv'] != $original_o) {
                $owl_file_url = $other_ontology['ontology_url'];
                if ($other_ontology['download'] != '') {
                    $owl_file_url = $other_ontology['download'];
                }
                $owl_file_name = getShortTerm($owl_file_url);
                ?>
  <tr>
    <td bgcolor="#EAF1F2"><a href="/browser/index.php?o=<?php 
                print $other_ontology['ontology_abbrv'];
                ?>
"><?php 
                print $other_ontology['ontology_fullname'];
                ?>
</a></td>
    <td bgcolor="#EAF1F2"><a href="<?php 
                echo $owl_file_url;
                ?>
"><?php 
                echo $owl_file_name;
                ?>
Ejemplo n.º 4
0
                }
                ?>
</ul>
</div>
<?php 
                $querystring = "\n\t\t\tSELECT distinct *\n\t\t\tFROM <{$settings['ns_main']}>\n\t\t\tWHERE { <{$settings['ns_main_original']}> ?p ?o}\n\t\t\t";
                //		print("<!--$querystring-->");
                $results = json_query($querystring);
                $num_queries++;
                //		print("<!--");
                //		print_r($results);
                //		print("-->");
                //var_dump($results);
                $a_annotation = array();
                foreach ($results as $annotation) {
                    $a_annotation[getShortTerm($annotation['p'])][] = $annotation['o'];
                }
                ksort($a_annotation);
                if (!empty($results)) {
                    ?>
<div style="font-weight:bold">Annotations</div>
<div style="background-color:#EAF1F2; border:#99CCFF 1px solid; margin-top:4px; margin-bottom:12px">
	<ul>
<?php 
                    $a_main_annotation_type = array('versionIRI', 'title', 'description', 'subject', 'creator', 'format', 'versionInfo', 'date', 'comment');
                    foreach ($a_main_annotation_type as $main_annotation_type) {
                        if (isset($a_annotation[$main_annotation_type])) {
                            if ($main_annotation_type == 'creator') {
                                ?>
		<li><span style="color:#333333">
			<?php 
Ejemplo n.º 5
0
                    print $o;
                    ?>
&amp;iri=<?php 
                    print myUrlEncode($subClass_url);
                    ?>
"><?php 
                    print UTF_to_Unicode($subClass_label);
                    ?>
</a></li>
<?php 
                }
            }
            $term_count = 0;
            foreach ($subClasses as $subClass_url => $subClass_label) {
                if ($subClass_label == '') {
                    $subClass_label = getShortTerm($subClass_url);
                }
                if (!isset($hasC[$subClass_url])) {
                    $term_count++;
                    ?>
<li>-<a oncontextmenu="return false;" href="/browser/rdf.php?o=<?php 
                    print $o;
                    ?>
&amp;iri=<?php 
                    print myUrlEncode($subClass_url);
                    ?>
"><?php 
                    print UTF_to_Unicode($subClass_label);
                    ?>
</a></li>
<?php