/** * Export to xml-rdf the ontology of the Class in parameter. * All the ontologies are exported if the class is not set * * @access public * @author Jerome Bogaerts, <*****@*****.**> * @param Class source * @return string */ public function export(core_kernel_classes_Class $source = null) { $rdf = ''; if (is_null($source)) { return core_kernel_api_ModelExporter::exportAll(); } $graph = new EasyRdf_Graph(); if ($source->isClass()) { $this->addClass($graph, $source); } else { $this->addResource($graph, $source); } $format = EasyRdf_Format::getFormat('rdfxml'); return $graph->serialise($format); }