VisualBinder.php
Go to the documentation of this file.
00001 <?php 00002 00003 00004 include_once("Resource.php"); 00005 include_once("WebServiceQuerier.php"); 00006 include_once("ClassHierarchy.php"); 00007 include_once("PropertyHierarchy.php"); 00008 include_once("Namespaces.php"); 00009 if (is_file(dirname(__FILE__) . "/smarty/Smarty.class.php")) 00010 { 00011 include_once("smarty/Smarty.class.php"); 00012 } 00013 if (is_file(dirname(__FILE__) . "/smarty/libs/Smarty.class.php")) 00014 { 00015 include_once("smarty/libs/Smarty.class.php"); 00016 } 00017 00018 00021 00038 class VisualBinder 00039 { 00041 public $uri = ""; 00042 00044 public $dataset = ""; 00045 00047 public $resource; 00048 00050 public $type = ""; 00051 00053 public $templateFile = ""; 00054 00056 public $templates = array(); 00057 00059 private $classHierarchy; 00060 00062 private $propertyHierarchy; 00063 00065 private $smarty; 00066 00068 private $linksTo = FALSE; 00069 00072 private $setAttributeIgnoreResourceLabel = FALSE; 00073 00088 function __construct($uri, $dataset, $linksTo = FALSE, &$classHierarchy, &$propertyHierarchy) 00089 { 00090 $this->uri = $uri; 00091 $this->dataset = $dataset; 00092 00093 $this->linksTo = $linksTo; 00094 $this->classHierarchy = $classHierarchy; 00095 $this->propertyHierarchy = $propertyHierarchy; 00096 00097 $this->smarty = new Smarty(); 00098 00099 $this->smarty->template_dir = realpath(".") . "/" . drupal_get_path("module", "conStruct") . "/templates/"; 00100 $this->smarty->compile_dir = 00101 realpath(".") . "/" . drupal_get_path("module", "conStruct") . "/templates/templates_c/"; 00102 $this->smarty->config_dir = realpath(".") . "/" . drupal_get_path("module", "conStruct") . "/templates/configs/"; 00103 00104 $this->smarty->debugging = true; 00105 $this->smarty->error_reporting = true; 00106 00107 // Step 1: getting triples describing the resource. 00108 $this->resource = new Resource($this->uri, $dataset, TRUE); 00109 00110 // Step 2: getting the list of available templates. 00111 $this->getTemplates(); 00112 00113 // Step 3: binding the type(s) to the proper template. 00114 $this->bindTemplate($this->resource->getTypes()); 00115 00116 $fhandle = fopen($this->smarty->template_dir . $this->templateFile, "r"); 00117 $templateContent = fread($fhandle, filesize($this->smarty->template_dir . $this->templateFile)); 00118 fclose($fhandle); 00119 00120 // Step 4.0: check for the "setting->setAttributeIgnoreResourceLabel" template setting 00121 preg_match("/.*setting->setAttributeIgnoreResourceLabel=[\s]*true.*/Uim", $templateContent, $matches); 00122 00123 if(count($matches) > 0) 00124 { 00125 $this->setAttributeIgnoreResourceLabel = TRUE; 00126 } 00127 00128 // Step 4.1: check for "linksto" templates settings 00129 preg_match("/.*setting->LinksTo=[\s]*false.*/Uim", $templateContent, $matches); 00130 00131 00132 // Step 5: binding of properties to their visual cluster. 00133 $this->bindClusters((count($matches) > 0 ? FALSE : TRUE)); 00134 } 00135 00136 function __destruct(){} 00137 00148 public function getResourceCss() 00149 { 00150 global $base_url; 00151 00152 $cssLinks = array(); 00153 00154 $templateHtml = $this->smarty->fetch($this->templateFile); 00155 00156 $posHeadStart = stripos($templateHtml, "<head"); 00157 $posHeadEnd = stripos($templateHtml, "</head"); 00158 00159 if($posHeadStart !== FALSE) 00160 { 00161 $posLinkStart = $posHeadStart; 00162 00163 while(($posLinkStart = stripos($templateHtml, "<link", $posLinkStart)) !== FALSE) 00164 { 00165 // Make sure the link is defined in the header of the HTML file 00166 if($posLinkStart >= $posHeadEnd) 00167 { 00168 break; 00169 } 00170 00171 $posLinkEnd = stripos($templateHtml, ">", $posLinkStart); 00172 00173 $link = substr($templateHtml, $posLinkStart, $posHeadEnd - $posLinkStart); 00174 00175 $posLinkStart = $posLinkEnd; 00176 00177 array_push($cssLinks, $link); 00178 } 00179 } 00180 00181 return($cssLinks); 00182 } 00183 00194 public function getResourceHtml() 00195 { 00196 global $base_url; 00197 00198 $templateHtml = $this->smarty->fetch($this->templateFile); 00199 00200 // Get templated title. 00201 $pos = stripos($templateHtml, "<title>") + 7; 00202 $posEnd = stripos($templateHtml, "</title>", $pos); 00203 $htmlPageTitle = substr($templateHtml, $pos, $posEnd - $pos); 00204 00205 $pos = stripos($templateHtml, "<body>") + 6; 00206 $posEnd = stripos($templateHtml, "</body>", $pos - 6); 00207 $templateHtml = substr($templateHtml, $pos, $posEnd - $pos); 00208 00209 00210 // Add administrator pannel 00211 if (user_access('administer conStruct')) 00212 { 00213 $templateHtml = "<span class=\"item-admin-toolbox\" style=\"width: 100%; position: static; margin-top:10px; " . 00214 "margin-bottom:10px; font-size:small;\">Administration panel: <a href=\"" . $base_url 00215 . "/conStruct/update/?dataset=" 00216 . urlencode(($this->dataset == "" ? getDatasetFromUri($this->uri) : $this->dataset)) . "&uri=" 00217 . urlencode($this->uri) . "\" alt=\"Update item\" title=\"Update item\"><img src=\"" . $base_url . "/" 00218 . drupal_get_path("module", "structView") . "/imgs/overlays.png\" border=\"0\" " . 00219 "style=\"padding-right:5px;\" /></a> <a href=\"" . $base_url . 00220 "/conStruct/delete/?dataset=" 00221 . urlencode(($this->dataset == "" ? getDatasetFromUri($this->uri) : $this->dataset)) . "&uri=" 00222 . urlencode($this->uri) . "\" alt=\"Delete item\" title=\"Delete item\"><img src=\"" . $base_url . "/" 00223 . drupal_get_path("module", "structView") . "/imgs/cancel.png\" border=\"0\" " . 00224 "style=\"\" /></a></span>" . $templateHtml; 00225 } 00226 00227 $templateHtml = "<title>$htmlPageTitle</title>" . $templateHtml; 00228 /* 00229 $templateHtml = str_replace(array( 00230 "\n", 00231 "\r" 00232 ), "", $templateHtml); 00233 */ 00234 // Removing layout table boxes. 00235 if (!isset($_GET["showLayoutBoxes"])) 00236 { 00237 $templateHtml = preg_replace("/<!\-\-[\s]*layout box start[\s]*\-\->(.*)<!\-\-[\s]*layout box stop[\s]*\-\->/Ui", 00238 "", $templateHtml); 00239 } 00240 00241 // Fix the URI references to reflect the current URI schema used by the user. 00242 $fixedDomain = str_replace(get_domain(getResourceBaseURI()), get_domain($base_url), getResourceBaseURI()); 00243 $fixedDomain = str_replace("resource", "view", $fixedDomain); 00244 00245 $templateHtml = str_replace(getResourceBaseURI(), $fixedDomain, $templateHtml); 00246 00247 return ($templateHtml); 00248 } 00249 00258 private function bindClusters($getLinksTo = TRUE) 00259 { 00260 $properties = $this->resource->getSubjectProperties(); 00261 00262 $attribute = new SmartyAttribute($this->uri, $this->resource->getDataset(), $this->resource->getRawSerialization()); 00263 00264 foreach ($properties as $property) 00265 { 00266 $values = $this->resource->getPropertyValues($property); 00267 00268 // Check if the property is defined in the property hierarchy structure. 00269 if (isset($this->propertyHierarchy->properties[$property])) 00270 { 00271 foreach ($values as $value) 00272 { 00273 $attribute->setAttribute($this->propertyHierarchy->properties[$property]->name, 00274 $this->propertyHierarchy->properties[$property]->label, $value[0], $value[1], $this->resource->getDataset(), 00275 $this->classHierarchy, (isset($this->resource->reificationTriples[$property][$value[0]]) !== FALSE 00276 ? $this->resource->reificationTriples[$property][$value[0]] : FALSE), (isset($this->resource-> 00277 reificationTriples[$property][$value[0]]["http://www.w3.org/2000/01/rdf-schema#label"]) !== FALSE 00278 ? $this->resource-> 00279 reificationTriples[$property][$value[0]]["http://www.w3.org/2000/01/rdf-schema#label"][0] : FALSE), 00280 $this->setAttributeIgnoreResourceLabel); 00281 } 00282 } 00283 else 00284 { 00285 $pos = strripos($property, "#"); 00286 00287 if ($pos === FALSE) 00288 { 00289 $pos = strripos($property, "/"); 00290 } 00291 00292 if ($pos !== FALSE) 00293 { 00294 $pos++; 00295 } 00296 00297 $name = substr($property, $pos, strlen($property) - $pos); 00298 00299 foreach ($values as $value) 00300 { 00301 $attribute->setAttribute($property, $name, $value[0], $value[1], $this->resource->getDataset(), 00302 $this->classHierarchy, (isset($this->resource->reificationTriples[$property][$value[0]]) !== FALSE 00303 ? $this->resource->reificationTriples[$property][$value[0]] : FALSE), (isset($this->resource-> 00304 reificationTriples[$property][$value[0]]["http://www.w3.org/2000/01/rdf-schema#label"]) !== FALSE 00305 ? $this->resource-> 00306 reificationTriples[$property][$value[0]]["http://www.w3.org/2000/01/rdf-schema#label"][0] : FALSE), 00307 $this->setAttributeIgnoreResourceLabel); 00308 } 00309 } 00310 } 00311 00312 00313 // Links-to Links 00314 if ($getLinksTo) 00315 { 00316 $properties = $this->resource->getObjectProperties(); 00317 00318 foreach ($properties as $property) 00319 { 00320 $values = $this->resource->getPropertyValues($property); 00321 00322 // Check if the property is defined in the property hierarchy structure. 00323 if (isset($this->propertyHierarchy->properties[$property])) 00324 { 00325 foreach ($values as $value) 00326 { 00327 $attribute->setAttributeLinksTo($this->propertyHierarchy->properties[$property]->name, 00328 $this->propertyHierarchy->properties[$property]->label, $value, "", $this->resource->getDataset(), 00329 $this->classHierarchy); 00330 } 00331 } 00332 else 00333 { 00334 $pos = strripos($property, "#"); 00335 00336 if ($pos === FALSE) 00337 { 00338 $pos = strripos($property, "/"); 00339 } 00340 00341 if ($pos !== FALSE) 00342 { 00343 $pos++; 00344 } 00345 00346 // Save the URI of the class or property passed in parameter 00347 $name = substr($property, $pos, strlen($property) - $pos); 00348 00349 foreach ($values as $value) 00350 { 00351 $attribute->setAttributeLinksTo($property, $name, $value, "", $this->resource->getDataset(), 00352 $this->classHierarchy); 00353 } 00354 } 00355 } 00356 } 00357 00358 $this->smarty->register_object("attribute", $attribute); 00359 } 00360 00371 private function getTemplates() 00372 { 00373 if (is_dir(realpath(".") . "/" . drupal_get_path("module", "conStruct") . "/templates/")) 00374 { 00375 if ($handle = opendir(realpath(".") . "/" . drupal_get_path("module", "conStruct") . "/templates/")) 00376 { 00377 while (($file = readdir($handle)) !== FALSE) 00378 { 00379 if ($file != "." && $file != ".." && (stripos($file, ".html") !== FALSE || stripos($file, ".htm") !== FALSE 00380 || stripos($file, ".xhtml") !== FALSE)) 00381 { 00382 $this->templates[$file] = 1; 00383 } 00384 } 00385 } 00386 } 00387 } 00388 00399 private function bindTemplate($types) 00400 { 00401 // Here is the procedure to bind a resource to a display template 00402 // 1: check the first type. If it has a templated binded to it, use this one. (it always uses the first one found) 00403 // 2: iterates for all types until you get one that has a related template. 00404 // 3: if none have a binded template, then we check their super-classes 00405 // 4: if none have a binded template, then we bind to the "generic" template. 00406 00407 // Step 1 & 2 00408 $found = FALSE; 00409 foreach ($types as $type) 00410 { 00411 foreach ($type as $t) 00412 { 00413 $this->getTypeTemplate($t); 00414 00415 if ($this->templateFile != "") 00416 { 00417 $this->type = $t; 00418 00419 if($this->templateFile != "owl_thing.html") 00420 { 00421 $found = TRUE; 00422 } 00423 00424 break; 00425 } 00426 } 00427 00428 if($found == TRUE) 00429 { 00430 break; 00431 } 00432 } 00433 00434 // Step 3 00435 if ($this->templateFile == "") 00436 { 00437 foreach ($types as $type) 00438 { 00439 foreach ($type as $t) 00440 { 00441 if (isset($this->classHierarchy)) 00442 { 00443 $superClasses = $this->classHierarchy->getSuperClasses($t); 00444 00445 foreach ($superClasses as $sc) 00446 { 00447 $this->getTypeTemplate($sc->name); 00448 00449 if ($this->templateFile != "") 00450 { 00451 $this->type = $t; 00452 break; 00453 } 00454 } 00455 00456 if ($this->templateFile != "") 00457 { 00458 break; 00459 } 00460 } 00461 } 00462 } 00463 } 00464 00465 // Step 4 00466 if ($this->templateFile == "") 00467 { 00468 if(count($types) <= 0) 00469 { 00470 $this->type = "http://www.w3.org/2002/07/owl#Thing"; 00471 } 00472 else 00473 { 00474 $this->type = $types[0][0]; 00475 } 00476 00477 $this->templateFile = "owl_thing.html"; 00478 } 00479 } 00480 00481 private function getTypeTemplate($type) 00482 { 00483 $templateName = strtolower(str_replace(":", "_", get_uri_label($type))) . ".html"; 00484 00485 if (isset($this->classHierarchy->classes[$type]) && $templateName != "" && isset($this->templates[$templateName])) 00486 { 00487 $this->templateFile = $templateName; 00488 } 00489 } 00490 } 00491 00501 class SmartyAttribute 00502 { 00504 private $attributes; 00505 00507 private $unassignedAttributes = array(); 00508 00510 private $attributesLinksTo = array(); 00511 00513 private $uri; 00514 00516 private $dataset; 00517 00519 private $rawSerialization; 00520 00532 function __construct($uri, $dataset = "", $rawSerialization) 00533 { 00534 $this->uri = $uri; 00535 $this->dataset = $dataset; 00536 $this->rawSerialization = $rawSerialization; 00537 } 00538 00552 public function getURI($params, &$smarty_obj) 00553 { 00554 return ($this->uri); 00555 } 00556 00570 public function getResourcePropertyValues($params, &$smarty_obj) 00571 { 00572 $resource = new Resource($params["resource"], $params["dataset"], FALSE); 00573 00574 $value = $resource->getPropertyValues(get_label_uri($params["property"])); 00575 00576 return (array(array( 00577 "value" => $value[0][0], 00578 "valueType" => $value[0][1], 00579 "valueLiteral" => $value[0][0], 00580 "attribute" => $params["property"], 00581 "attributeLabel" => "" 00582 ))); 00583 } 00584 00585 00599 public function getLabel($params, &$smarty_obj) 00600 { 00601 if (isset($this->attributes[$params["attribute"]])) 00602 { 00603 $this->unassignedAttributes[$params["attribute"]] = 0; 00604 return ($this->attributes[$params["attribute"]][0]["attributeLabel"]); 00605 } 00606 else 00607 { 00608 return (""); 00609 } 00610 } 00611 00625 public function getValues($params, &$smarty_obj) 00626 { 00627 $values = array(); 00628 00629 /* if the attribute exists, we make sure it is not get assigned to the "unassibned" attributes list */ 00630 if (isset($this->attributes[$params["attribute"]])) 00631 { 00632 $this->unassignedAttributes[$params["attribute"]] = 0; 00633 } 00634 00635 /* populate the array of values for this attribute to return to the template */ 00636 foreach ($this->attributes[$params["attribute"]] as $value) 00637 { 00638 array_push($values, array( 00639 "value" => $value["value"], 00640 "valueType" => $value["valueType"], 00641 "valueLiteral" => $value["valueLiteral"], 00642 "reify" => $value["reify"] 00643 )); 00644 } 00645 00646 return ($values); 00647 } 00648 00662 public function getUnasigned($params, &$smarty_obj) 00663 { 00664 $values = array(); 00665 00666 foreach ($this->unassignedAttributes as $attribute => $assignation) 00667 { 00668 if ($assignation == 1) 00669 { 00670 foreach ($this->attributes[$attribute] as $value) 00671 { 00672 array_push($values, array( 00673 "value" => $value["value"], 00674 "valueType" => $value["valueType"], 00675 "valueLiteral" => $value["valueLiteral"], 00676 "attribute" => $value["attribute"], 00677 "attributeLabel" => $value["attributeLabel"], 00678 "reify" => $value["reify"] 00679 )); 00680 } 00681 } 00682 } 00683 00684 return ($values); 00685 } 00686 00700 public function getLinksTo($params, &$smarty_obj) 00701 { 00702 $values = array(); 00703 00704 foreach ($this->attributesLinksTo as $attribute) 00705 { 00706 foreach ($attribute as $value) 00707 { 00708 array_push($values, array( 00709 "referrer" => $value["value"], 00710 "referrerLabel" => $value["valueLiteral"], 00711 "attribute" => $value["attribute"], 00712 "attributeLabel" => $value["attributeLabel"] 00713 )); 00714 } 00715 } 00716 00717 return ($values); 00718 } 00719 00733 public function getInstanceRecordLabel($params, &$smarty_obj) 00734 { 00735 $labelProperties = array( 00736 Namespaces::$iron . "prefLabel", 00737 Namespaces::$iron . "altLabel", 00738 Namespaces::$asn . "statementLabel", 00739 Namespaces::$dc . "title", 00740 Namespaces::$dcterms . "title", 00741 Namespaces::$foaf . "name", 00742 Namespaces::$foaf . "givenname", 00743 Namespaces::$foaf . "family_name", 00744 Namespaces::$rdfs . "label", 00745 Namespaces::$skos_2004 . "prefLabel", 00746 Namespaces::$skos_2004 . "altLabel", 00747 Namespaces::$skos_2008 . "prefLabel", 00748 Namespaces::$skos_2008 . "altLabel", 00749 Namespaces::$doap . "name", 00750 Namespaces::$geoname."name" 00751 00752 ); 00753 00754 foreach ($labelProperties as $property) 00755 { 00756 if (isset($this->attributes[$property])) 00757 { 00758 $this->unassignedAttributes[$property] = 0; 00759 00760 return ($this->attributes[$property][0]["valueLiteral"]); 00761 } 00762 } 00763 00764 return (""); 00765 } 00766 00780 public function getInstanceRecordType($params, &$smarty_obj) 00781 { 00782 if (isset($this->attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"])) 00783 { 00784 $this->unassignedAttributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"] = 0; 00785 00786 return ($this->attributes["http://www.w3.org/1999/02/22-rdf-syntax-ns#type"][0]["valueLiteral"]); 00787 } 00788 else 00789 { 00790 00791 return (""); 00792 } 00793 } 00794 00808 public function getInstanceRecordDataset($params, &$smarty_obj) 00809 { 00810 return ($this->dataset); 00811 } 00812 00826 public function getInstanceRecordDescription($params, &$smarty_obj) 00827 { 00828 $descriptionProperties = array( 00829 Namespaces::$iron . "description", 00830 Namespaces::$dcterms . "description", 00831 Namespaces::$skos_2004 . "definition", 00832 Namespaces::$skos_2008 . "definition", 00833 Namespaces::$bio . "olb", 00834 Namespaces::$bibo . "abstract", 00835 Namespaces::$doap . "description", 00836 Namespaces::$geoname."name" 00837 ); 00838 00839 foreach ($descriptionProperties as $property) 00840 { 00841 if (isset($this->attributes[$property])) 00842 { 00843 $this->unassignedAttributes[$property] = 0; 00844 00845 return ($this->attributes[$property][0]["valueLiteral"]); 00846 } 00847 } 00848 00849 return (""); 00850 } 00851 00869 public function setAttribute($attribute, $attributeLabel, $value, $valueType, $valueDataset, &$classHierarchy, 00870 $reifiedStatements, $reifiedObjectLabel, $setAttributeIgnoreResourceLabel) 00871 { 00872 $attributeKey = $attribute; 00873 $valueLabel = $value; 00874 00875 if ($valueType == "") 00876 { 00877 $valueType = "resource"; 00878 00879 // If it is a resource, we try to get its label. 00880 00881 // First check if it is a class 00882 if (isset($classHierarchy->classes[$value])) 00883 { 00884 $valueLabel = $classHierarchy->classes[$value]->label; 00885 } 00886 elseif ($attribute == "http://www.w3.org/1999/02/22-rdf-syntax-ns#type") 00887 { 00888 // If the attribute is rdf:Type, then we try to find the label of the type within the classHierarchy, if not available 00889 // we use the end of the URI of the type as the label. 00890 00893 if (FALSE /* check if it is in the classHierarchy */){} 00894 else 00895 { 00896 $pos = strrpos($value, "/"); 00897 00898 $valueLabel = substr($value, $pos + 1, strlen($value) - $pos); 00899 } 00900 } 00901 elseif ($reifiedObjectLabel !== FALSE) 00902 { 00903 // Check if there is a UI "label" reification statement for this resource. If there is one, then we use it 00904 // instead of anything else. This mean that even if the label of the resource is "A", and if there is a "B" reification 00905 // statement, the user want its data being displayed with "B" label. 00906 00907 $valueLabel = $reifiedObjectLabel; 00908 } 00909 else 00910 { 00911 // Get the label from the triple store. 00912 if($setAttributeIgnoreResourceLabel === FALSE) 00913 { 00914 $resource = new Resource($value, $valueDataset, FALSE); 00915 00916 $valueLabel = $resource->getLabel(); 00917 $valueLabel = $valueLabel[0]; 00918 } 00919 } 00920 } 00921 else 00922 { 00923 $valueType = "literal"; 00924 } 00925 00926 if (!isset($this->attributes[$attributeKey])) 00927 { 00928 $this->attributes[$attributeKey] = array(array( 00929 "attribute" => $attribute, 00930 "attributeLabel" => $attributeLabel, 00931 "value" => $value, 00932 "valueType" => $valueType, 00933 "valueLiteral" => $valueLabel, 00934 "reify" => $reifiedStatements 00935 )); 00936 } 00937 else 00938 { 00939 array_push($this->attributes[$attributeKey], array( 00940 "attribute" => $attribute, 00941 "attributeLabel" => $attributeLabel, 00942 "value" => $value, 00943 "valueType" => $valueType, 00944 "valueLiteral" => $valueLabel, 00945 "reify" => $reifiedStatements 00946 )); 00947 } 00948 00949 $this->unassignedAttributes[$attribute] = 1; 00950 } 00951 00967 public function setAttributeLinksTo($attribute, $attributeLabel, $value, $valueType, $valueDataset, &$classHierarchy) 00968 { 00969 $attributeKey = $attribute; 00970 $valueLabel = $value; 00971 00972 if ($valueType == "") 00973 { 00974 $valueType = "resource"; 00975 00976 // If it is a resource, we try to get its label. 00977 00978 // First check if it is a class 00979 if (isset($classHierarchy->classes[$value])) 00980 { 00981 $valueLabel = $classHierarchy->classes[$value]->label; 00982 } 00983 else 00984 { 00985 // Get the label from the triple store. 00986 $resource = new Resource($value, $valueDataset, FALSE); 00987 00988 $valueLabel = $resource->getLabel(); 00989 $valueLabel = $valueLabel[0]; 00990 } 00991 } 00992 else 00993 { 00994 $valueType = "literal"; 00995 } 00996 00997 if (!isset($this->attributesLinksTo[$attributeKey])) 00998 { 00999 $this->attributesLinksTo[$attributeKey] = array(array( 01000 "attribute" => $attribute, 01001 "attributeLabel" => $attributeLabel, 01002 "value" => $value, 01003 "valueType" => $valueType, 01004 "valueLiteral" => $valueLabel 01005 )); 01006 } 01007 else 01008 { 01009 array_push($this->attributesLinksTo[$attributeKey], array( 01010 "attribute" => $attribute, 01011 "attributeLabel" => $attributeLabel, 01012 "value" => $value, 01013 "valueType" => $valueType, 01014 "valueLiteral" => $valueLabel 01015 )); 01016 } 01017 } 01018 01019 01026 public function getAttributes() 01027 { 01028 return ($this->attributes); 01029 } 01030 01042 public function getResourceRawSerialization() 01043 { 01044 return ($this->rawSerialization); 01045 } 01046 } 01047 01049 01050 ?>
