Project

General

Profile

« Previous | Next » 

Revision 57066

x3ml-engine 1.9.1 does not help, so let's go back to 1.9.3

View differences:

modules/dnet-msro-service/branches/saxonHE/src/test/java/eu/dnetlib/x3m/X3MLEngineTest.java
9 9
import java.util.function.Function;
10 10
import java.util.function.IntFunction;
11 11

  
12
import eu.delving.x3ml.X3MLEngineFactory;
12
import gr.forth.ics.isl.x3ml.X3MLEngineFactory;
13
import gr.forth.ics.isl.x3ml.X3MLEngineFactory.OutputFormat;
13 14
import org.apache.commons.logging.Log;
14 15
import org.apache.commons.logging.LogFactory;
15 16
import org.junit.Ignore;
......
41 42
				.withMappings(getInputStreamFromClasspath(forthMappingPath))
42 43
				.withVerboseLogging()
43 44
				.withInput(getInputStreamFromClasspath(forthInputPath))
44
				.withOutput(System.out, X3MLEngineFactory.OutputFormat.RDF_XML);
45
				.withOutput(System.out, OutputFormat.RDF_XML);
45 46
		x3mEngine.execute();
46 47
	}
47 48

  
......
52 53
				.withGeneratorPolicy(getInputStreamFromClasspath("/eu/dnetlib/x3m/parthenos_policy_uri_shortener.xml"))
53 54
				.withVerboseLogging()
54 55
				.withInput(getInputStreamFromClasspath("/eu/dnetlib/x3m/record_shortener.xml"))
55
				.withOutput(System.out, X3MLEngineFactory.OutputFormat.RDF_XML);
56
				.withOutput(System.out, OutputFormat.RDF_XML);
56 57
		x3mEngine.execute();
57 58
	}
58 59

  
......
65 66
				.withMappings(getInputStreamFromClasspath(mappingPath))
66 67
				.withVerboseLogging()
67 68
				.withInput(getInputStreamFromClasspath(recordPath))
68
				.withOutput(ps, X3MLEngineFactory.OutputFormat.RDF_XML);
69
				.withOutput(ps, OutputFormat.RDF_XML);
69 70
		x3mEngine.execute();
70 71

  
71 72
		logStream(os);
......
81 82
				.withMappings(getInputStreamFromClasspath(mappingPath))
82 83
				.withVerboseLogging()
83 84
				.withInput(getInputStreamFromClasspath(recordPath))
84
				.withOutput(ps, X3MLEngineFactory.OutputFormat.RDF_XML_PLAIN);
85
				.withOutput(ps, OutputFormat.RDF_XML_PLAIN);
85 86
		x3mEngine.execute();
86 87

  
87 88
		logStream(os);
......
97 98
				.withMappings(getInputStreamFromClasspath(mappingPath))
98 99
				.withVerboseLogging()
99 100
				.withInput(convertArray(allInputFiles, X3MLEngineTest::getInputStreamFromClasspath, InputStream[]::new))
100
				.withOutput(ps, X3MLEngineFactory.OutputFormat.RDF_XML);
101
				.withOutput(ps, OutputFormat.RDF_XML);
101 102
		x3mEngine.execute();
102 103
		logStream(os);
103 104
	}
......
120 121
			final ByteArrayOutputStream os = new ByteArrayOutputStream();
121 122
			final PrintStream ps = new PrintStream(os);
122 123
			InputStream s = it.next();
123
			x3mEngine.withInput(s).withOutput(ps, X3MLEngineFactory.OutputFormat.RDF_XML);
124
			x3mEngine.withInput(s).withOutput(ps, OutputFormat.RDF_XML);
124 125
			x3mEngine.execute();
125 126
			logStream(os);
126 127
			os.close();
......
141 142
					.withMappings(getInputStreamFromClasspath(mappingPath))
142 143
					.withVerboseLogging();
143 144
			InputStream s = it.next();
144
			x3mEngine.withInput(s).withOutput(ps, X3MLEngineFactory.OutputFormat.RDF_XML).execute();
145
			x3mEngine.withInput(s).withOutput(ps, OutputFormat.RDF_XML).execute();
145 146
			logStream(os);
146 147
			os.close();
147 148
		}
modules/dnet-msro-service/branches/saxonHE/src/main/java/eu/dnetlib/msro/workflows/nodes/transform/ApplyX3Mapping.java
5 5
import java.io.InputStream;
6 6
import java.util.function.Function;
7 7

  
8
import eu.delving.x3ml.X3MLEngineFactory;
8
import gr.forth.ics.isl.x3ml.X3MLEngineFactory;
9
import gr.forth.ics.isl.x3ml.X3MLEngineFactory.OutputFormat;
9 10
import org.apache.commons.io.IOUtils;
10 11
import org.apache.commons.lang3.StringUtils;
11 12
import org.apache.commons.logging.Log;
......
43 44
				InputStream metadataStream = getStream(metadata);
44 45
				final ByteArrayOutputStream os = new ByteArrayOutputStream()){
45 46
			X3MLEngineFactory x3mEngineFactory = getConfiguredX3MEngineFactory(mappingStreams, policyStream);
46
			x3mEngineFactory.withInput(metadataStream).withOutput(os, X3MLEngineFactory.OutputFormat.RDF_XML_PLAIN);
47
			x3mEngineFactory.withInput(metadataStream).withOutput(os, OutputFormat.RDF_XML_PLAIN);
47 48
			x3mEngineFactory.execute();
48 49
			return new String(os.toByteArray());
49 50
		} catch (Exception e) {
modules/dnet-msro-service/branches/saxonHE/pom.xml
51 51
		<dependency>
52 52
			<groupId>gr.forth.ics.isl</groupId>
53 53
			<artifactId>x3ml-engine</artifactId>
54
			<version>[1.9.1]</version>
54
			<version>[1.9.3]</version>
55 55
			<exclusions>
56 56
					<exclusion>
57 57
						<groupId>org.slf4j</groupId>

Also available in: Unified diff