protected function flatImport($content, core_kernel_classes_Class $class)
    {
        $report = common_report_Report::createSuccess(__('Data imported successfully'));

        $graph = new EasyRdf_Graph();
        $graph->parse($content);

        // keep type property
        $map = [
            OntologyRdf::RDF_PROPERTY => OntologyRdf::RDF_PROPERTY
        ];

        foreach ($graph->resources() as $resource) {
            $map[$resource->getUri()] = common_Utils::getNewUri();
        }

        $format = EasyRdf_Format::getFormat('php');
        $data = $graph->serialise($format);

        foreach ($data as $subjectUri => $propertiesValues) {
            $resource = new core_kernel_classes_Resource($map[$subjectUri]);
            $subreport = $this->importProperties($resource, $propertiesValues, $map, $class);
            $report->add($subreport);
        }

        return $report;
    }
protected function flatImport($content, core_kernel_classes_Class $class)
    {
        $report = common_report_Report::createSuccess(__('Data imported successfully'));

        $graph = new EasyRdf_Graph();
        $graph->parse($content);

        // keep type property
        $map = [
            OntologyRdf::RDF_PROPERTY => OntologyRdf::RDF_PROPERTY
        ];

        foreach ($graph->resources() as $resource) {
            $map[$resource->getUri()] = common_Utils::getNewUri();
        }

        $format = EasyRdf_Format::getFormat('php');
        $data = $graph->serialise($format);

        foreach ($data as $subjectUri => $propertiesValues) {
            $resource = new core_kernel_classes_Resource($map[$subjectUri]);
            $subreport = $this->importProperties($resource, $propertiesValues, $map, $class);
            $report->add($subreport);
        }

        return $report;
    }
protected function flatImport ( $ content , core_kernel_classes_Class $ class ) { $ report = common_report_Report :: createSuccess ( __ ( 'Data imported successfully' ) ) ; $ graph = new EasyRdf_Graph ( ) ; $ graph -> parse ( $ content ) ; // keep type property $ map = [ OntologyRdf :: RDF_PROPERTY => OntologyRdf :: RDF_PROPERTY ] ; foreach ( $ graph -> resources ( ) as $ resource ) { $ map [ $ resource -> getUri ( ) ] = common_Utils :: getNewUri ( ) ; } $ format = EasyRdf_Format :: getFormat ( 'php' ) ; $ data = $ graph -> serialise ( $ format ) ; foreach ( $ data as $ subjectUri => $ propertiesValues ) { $ resource = new core_kernel_classes_Resource ( $ map [ $ subjectUri ] ) ; $ subreport = $ this -> importProperties ( $ resource , $ propertiesValues , $ map , $ class ) ; $ report -> add ( $ subreport ) ; } return $ report ; }
Imports the rdf file into the selected class

@param string                    $content
@param core_kernel_classes_Class $class
@return common_report_Report
Imports the rdf file into the selected class