equal
deleted
inserted
replaced
167 $this->error("\nError processing $identifier ($docRdfUrl) : $docType unknown mapper"); |
167 $this->error("\nError processing $identifier ($docRdfUrl) : $docType unknown mapper"); |
168 Log::error("Error processing $identifier ($docRdfUrl) : $docType unknown mapper"); |
168 Log::error("Error processing $identifier ($docRdfUrl) : $docType unknown mapper"); |
169 $documentCounts['unknown'] += 1; |
169 $documentCounts['unknown'] += 1; |
170 continue; |
170 continue; |
171 } |
171 } |
|
172 |
|
173 $mapperClass = ImportCocoonRDF::MAPPER_CLASS_MAP[$docType]; |
|
174 $mapper = new $mapperClass($doc, $docUri); |
|
175 |
|
176 try { |
|
177 $mapper->mapGraph(); |
|
178 } catch (\Exception $e) { |
|
179 Log::error("Error processing $identifier ($docRdfUrl) : error mapping graph : $e"); |
|
180 $documentCounts['error'] += 1; |
|
181 } |
172 $documentCounts['all'] += 1; |
182 $documentCounts['all'] += 1; |
173 $documentCounts[$docType] = isset($documentCounts[$docType])?$documentCounts[$docType]+1:1; |
183 $documentCounts[$docType] = isset($documentCounts[$docType])?$documentCounts[$docType]+1:1; |
174 |
184 |
175 $mapperClass = ImportCocoonRDF::MAPPER_CLASS_MAP[$docType]; |
|
176 $mapper = new $mapperClass($doc, $docUri); |
|
177 |
|
178 $mapper->mapGraph(); |
|
179 $mappedGraphes = $mapper->getOutputGraphes(); |
185 $mappedGraphes = $mapper->getOutputGraphes(); |
180 |
186 |
181 foreach ($mapper->getOutputGraphes() as $mappedGraphKey => $mappedGraph) { |
187 foreach ($mapper->getOutputGraphes() as $mappedGraphKey => $mappedGraph) { |
182 |
188 |
183 $mappedGraphUri = $mappedGraph->getUri(); |
189 $mappedGraphUri = $mappedGraph->getUri(); |