Namespaces.php
Go to the documentation of this file.
00001 <?php 00002 00005 00026 class Namespaces 00027 { 00028 public static $address = "http://schemas.talis.com/2005/address/schema#"; 00029 public static $asn = "http://purl.org/ASN/schema/core/"; 00030 public static $bibo = "http://purl.org/ontology/bibo/"; 00031 public static $bio = "http://purl.org/vocab/bio/0.1/"; 00032 public static $bkn = "http://purl.org/ontology/bkn#"; 00033 public static $bkn_temp = "http://purl.org/ontology/bkn/temp#"; 00034 public static $bkn_base = "http://purl.org/ontology/bkn/base/"; 00035 public static $cc = "http://creativecommons.org/ns#"; 00036 public static $cyc = "http://sw.cyc.com/2006/07/27/cyc/"; 00037 public static $dc = "http://purl.org/dc/elements/1.1/"; 00038 public static $dcam = "http://purl.org/dc/dcam/"; 00039 public static $dcterms = "http://purl.org/dc/terms/"; 00040 public static $dctype = "http://purl.org/dc/dcmitype/"; 00041 public static $doap = "http://usefulinc.com/ns/doap#"; 00042 public static $eor = "http://dublincore.org/2000/03/13/eor#"; 00043 public static $event = "http://purl.org/NET/c4dm/event.owl#"; 00044 public static $foaf = "http://xmlns.com/foaf/0.1/"; 00045 public static $frbr = "http://purl.org/vocab/frbr/core#"; 00046 public static $geo = "http://www.w3.org/2003/01/geo/wgs84_pos#"; 00047 public static $geonames = "http://www.geonames.org/ontology#"; 00048 public static $gem = "http://purl.org/gem/elements/"; 00049 public static $gemq = "http://purl.org/gem/qualifiers/"; 00050 public static $iron = "http://purl.org/ontology/iron#"; 00051 public static $loc = "http://www.loc.gov/loc.terms/relators/"; 00052 public static $mo = "http://purl.org/ontology/mo/"; 00053 public static $owl = "http://www.w3.org/2002/07/owl#"; 00054 public static $po = "http://purl.org/ontology/po/"; 00055 public static $rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; 00056 public static $rdfs = "http://www.w3.org/2000/01/rdf-schema#"; 00057 public static $rss = "http://purl.org/rss/1.0/"; 00058 public static $sioc = "http://rdfs.org/sioc/ns#"; 00059 public static $skos_2004 = "http://www.w3.org/2004/02/skos/core#"; 00060 public static $skos_2008 = "http://www.w3.org/2008/05/skos#"; 00061 public static $umbel = "http://umbel.org/umbel#"; 00062 public static $umbel_ac = "http://umbel.org/umbel/ac/"; 00063 public static $umbel_sc = "http://umbel.org/umbel/sc/"; 00064 public static $umbel_rc = "http://umbel.org/umbel/rc/"; 00065 public static $geoname = "http://www.geonames.org/ontology#"; 00066 public static $peg = "http://purl.org/ontology/peg#"; 00067 public static $muni = "http://purl.org/ontology/muni#"; 00068 public static $dbpedia_ont = "http://dbpedia.org/ontology/"; 00069 public static $sco = "http://purl.org/ontology/sco#"; 00070 00071 public static function getPrefixedUri($uri) 00072 { 00073 // Find the base URI of the ontology 00074 $pos = strripos($uri, "#"); 00075 00076 if ($pos === FALSE) 00077 { 00078 $pos = strripos($uri, "/"); 00079 } 00080 00081 if ($pos !== FALSE) 00082 { 00083 $pos++; 00084 } 00085 00086 // Save the URI of the ontology 00087 $onto = substr($uri, 0, $pos); 00088 00089 // Save the URI of the class or property passed in parameter 00090 $resource = substr($uri, $pos, strlen($uri) - $pos); 00091 00092 foreach(get_class_vars("Namespaces") as $prefix => $u) 00093 { 00094 if($onto == Namespaces::$$prefix) 00095 { 00096 return($prefix.":".$resource); 00097 } 00098 } 00099 00100 return($uri); 00101 } 00102 } 00103 00105 00106 ?>
