function makeHTML($endpoint_stats, $endpoint_desc) { //create one html file per endpoint foreach ($endpoint_stats as $endpoint => $d) { if (count($d) > 2) { $desc = @$endpoint_desc[$endpoint]; //create an output file $fo = fopen($endpoint . ".html", "w") or die("Could not create file!"); if ($fo) { $html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html>'; $html .= addHeader($endpoint); //add Bio2RDF logo //add Endpoint description //add link back to the statistics page $html .= "<body>"; //add the logo $html .= addBio2RDFLogo(); $html .= "<h1> Summary data metrics for the Bio2RDF " . $endpoint . " endpoint</h1>"; $html .= "<div id='container'> <div id='items'></div>"; $html .= addDatasetDescription($desc); $html .= addBio2RDFDetails($d['endpoint_url'], $desc['namespace']); $html .= addBasicStatsTable($d['endpoint_url'], $d['triples'], $d['unique_subjects'], $d['unique_predicates'], $d['unique_objects']); $html .= addUniqueTypesTable($d['endpoint_url'], $d['unique_types']); $html .= addPredicateObjLinks($d['endpoint_url'], $d['predicate_object_links']); $html .= addPredicateLiteralLinks($d['endpoint_url'], $d['predicate_literals']); $html .= addSubjectCountPredicateObjectCount($d['endpoint_url'], $d['subject_count_predicate_object_count']); $html .= addSubjectPredicateUniqueLits($d['endpoint_url'], $d['subject_count_predicate_literal_count']); $html .= addSubjectTypePredType($d['endpoint_url'], $d['subject_type_predicate_object_type']); $html .= addNSNSCounts($d['endpoint_url'], $d['nsnscounts']); $html .= "</div></body></html>"; fwrite($fo, $html); } fclose($fo); } } }
function makeHTML($endpoint_stats) { //create one html file per endpoint foreach ($endpoint_stats as $endpoint => $d) { if (count($d) > 2) { //create an output file $fo = fopen($endpoint . ".html", "w") or die("Could not create file!"); if ($fo) { $html = "<html>"; $html .= addHeader($endpoint); $html .= "<h1>" . $endpoint . "</h1>"; $html .= addBasicStatsTable($d['endpoint_url'], $d['triples'], $d['unique_subjects'], $d['unique_predicates'], $d['unique_objects']); $html .= "</html>"; fwrite($fo, $html); } fclose($fo); } } }