Skip to content

Commit

Permalink
HarvesterUtil / Use conversions from schema (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxprunayre authored Oct 10, 2024
1 parent 6f60856 commit cd11471
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@

package org.fao.geonet.kernel.harvest.harvester;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;
import org.fao.geonet.ApplicationContextHolder;
import org.fao.geonet.constants.Geonet;
import org.fao.geonet.domain.Pair;
import org.fao.geonet.kernel.GeonetworkDataDirectory;
import org.fao.geonet.kernel.schema.MetadataSchema;
import org.fao.geonet.utils.Xml;
import org.jdom.Element;
import org.slf4j.LoggerFactory;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.HashMap;
import java.util.Map;

/**
* Created by francois on 3/7/14.
*/
Expand Down Expand Up @@ -74,8 +75,7 @@ public static Element processMetadata(MetadataSchema metadataSchema,
Element md,
String processName,
Map<String, Object> processParams) {

Path filePath = metadataSchema.getSchemaDir().resolve("process").resolve(processName + ".xsl");
Path filePath = ApplicationContextHolder.get().getBean(GeonetworkDataDirectory.class).getXsltConversion(processName);
if (!Files.exists(filePath)) {
LOGGER.info(" processing instruction not found for {} schema. metadata not filtered.", metadataSchema.getName());
} else {
Expand Down

0 comments on commit cd11471

Please sign in to comment.