Index: trunk/WikiWord/WikiWordIntegrator/.classpath |
— | — | @@ -15,5 +15,10 @@ |
16 | 16 | <attribute name="javadoc_location" value="http://www.beanshell.org/javadoc/"/> |
17 | 17 | </attributes> |
18 | 18 | </classpathentry> |
| 19 | + <classpathentry kind="var" path="M2_REPO/org/dbunit/dbunit/2.4.4/dbunit-2.4.4.jar"> |
| 20 | + <attributes> |
| 21 | + <attribute name="javadoc_location" value="http://www.dbunit.org/apidocs/"/> |
| 22 | + </attributes> |
| 23 | + </classpathentry> |
19 | 24 | <classpathentry kind="output" path="bin"/> |
20 | 25 | </classpath> |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/LoadForeignPropertiesTest.java |
— | — | @@ -0,0 +1,38 @@ |
| 2 | +package de.brightbyte.wikiword.integrator; |
| 3 | + |
| 4 | +import java.net.URL; |
| 5 | + |
| 6 | +import de.brightbyte.db.testing.DatabaseTestBase; |
| 7 | + |
| 8 | +public class LoadForeignPropertiesTest extends IntegratorAppTestBase<LoadForeignProperties> { |
| 9 | + |
| 10 | + public LoadForeignPropertiesTest() { |
| 11 | + super("LoadForeignPropertiesTest"); |
| 12 | + } |
| 13 | + |
| 14 | + /* |
| 15 | + protected String[] getSetUpStatements() { |
| 16 | + return new String[] { "CREATE TABLE QUUXBASE ( foo INT NOT NULL, bar VARCHAR(32) )", |
| 17 | + "CREATE TABLE QUUX ( foo INT NOT NULL, bar VARCHAR(32) )" }; |
| 18 | + } |
| 19 | + |
| 20 | + protected String[] getTearDownStatements() { |
| 21 | + return new String[] { "DROP TABLE QUUXBASE", "DROP TABLE QUUX" }; |
| 22 | + } |
| 23 | + */ |
| 24 | + |
| 25 | + //----------------------------------------------------------------------------------------------------- |
| 26 | + public void testTableImport() throws Exception { |
| 27 | + runApp("tableImport"); |
| 28 | + } |
| 29 | + |
| 30 | + public void testTripleImport() throws Exception { |
| 31 | + runApp("tripleImport"); |
| 32 | + } |
| 33 | + |
| 34 | + @Override |
| 35 | + protected LoadForeignProperties createApp() { |
| 36 | + return new LoadForeignProperties(); |
| 37 | + } |
| 38 | + |
| 39 | +} |
Index: trunk/WikiWord/WikiWordIntegrator/src/test/java/de/brightbyte/wikiword/integrator/IntegratorAppTestBase.java |
— | — | @@ -0,0 +1,50 @@ |
| 2 | +package de.brightbyte.wikiword.integrator; |
| 3 | + |
| 4 | +import java.io.IOException; |
| 5 | +import java.net.URL; |
| 6 | + |
| 7 | +import de.brightbyte.db.testing.DatabaseTestBase; |
| 8 | +import de.brightbyte.wikiword.DatasetIdentifier; |
| 9 | +import de.brightbyte.wikiword.TweakSet; |
| 10 | + |
| 11 | +public abstract class IntegratorAppTestBase<T extends AbstractIntegratorApp> extends DatabaseTestBase { |
| 12 | + |
| 13 | + public IntegratorAppTestBase(String name) { |
| 14 | + super(name); |
| 15 | + } |
| 16 | + |
| 17 | + public TweakSet loadTweakSet() throws IOException { |
| 18 | + URL url = requireAuxilliaryFileURL(getBaseName()+".tweaks.properties"); |
| 19 | + TweakSet tweaks = new TweakSet(); |
| 20 | + tweaks.loadTweaks(url); |
| 21 | + return tweaks; |
| 22 | + } |
| 23 | + |
| 24 | + public FeatureSetSourceDescriptor loadSourceDescriptor(String testName) throws IOException { |
| 25 | + URL url = requireAuxilliaryFileURL(getBaseName()+"."+testName+".properties"); |
| 26 | + FeatureSetSourceDescriptor descriptor = new FeatureSetSourceDescriptor(); |
| 27 | + descriptor.loadTweaks(url); |
| 28 | + return descriptor; |
| 29 | + } |
| 30 | + |
| 31 | + protected abstract T createApp(); |
| 32 | + |
| 33 | + protected T prepareApp(FeatureSetSourceDescriptor sourceDescriptor) throws IOException { |
| 34 | + TweakSet tweaks = loadTweakSet(); |
| 35 | + T app = createApp(); |
| 36 | + |
| 37 | + app.testInit(testDataSource, DatasetIdentifier.forName("TEST", "xx"), tweaks, sourceDescriptor); |
| 38 | + return app; |
| 39 | + } |
| 40 | + |
| 41 | + protected void runApp(String testName) throws Exception { |
| 42 | + FeatureSetSourceDescriptor source = loadSourceDescriptor(testName); |
| 43 | + runApp(source); |
| 44 | + } |
| 45 | + |
| 46 | + protected void runApp(FeatureSetSourceDescriptor sourceDescriptor) throws Exception { |
| 47 | + T app = prepareApp(sourceDescriptor); |
| 48 | + app.testLaunch(); |
| 49 | + } |
| 50 | + |
| 51 | +} |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/AbstractIntegratorApp.java |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | package de.brightbyte.wikiword.integrator; |
3 | 3 | |
4 | 4 | import java.beans.IntrospectionException; |
| 5 | +import java.io.File; |
5 | 6 | import java.io.IOException; |
6 | 7 | import java.io.InputStream; |
7 | 8 | import java.lang.reflect.InvocationTargetException; |
— | — | @@ -12,17 +13,23 @@ |
13 | 14 | import java.util.Map; |
14 | 15 | import java.util.regex.Pattern; |
15 | 16 | |
| 17 | +import javax.sql.DataSource; |
| 18 | + |
16 | 19 | import de.brightbyte.data.Functor; |
17 | 20 | import de.brightbyte.data.cursor.DataCursor; |
| 21 | +import de.brightbyte.db.DatabaseConnectionInfo; |
18 | 22 | import de.brightbyte.db.SqlScriptRunner; |
19 | 23 | import de.brightbyte.io.IOUtil; |
20 | 24 | import de.brightbyte.text.Chunker; |
21 | 25 | import de.brightbyte.util.BeanUtils; |
22 | 26 | import de.brightbyte.util.PersistenceException; |
| 27 | +import de.brightbyte.wikiword.DatasetIdentifier; |
23 | 28 | import de.brightbyte.wikiword.StoreBackedApp; |
24 | 29 | import de.brightbyte.wikiword.TweakSet; |
25 | 30 | import de.brightbyte.wikiword.builder.InputFileHelper; |
26 | 31 | import de.brightbyte.wikiword.integrator.data.AssemblingFeatureSetCursor; |
| 32 | +import de.brightbyte.wikiword.integrator.data.Association; |
| 33 | +import de.brightbyte.wikiword.integrator.data.AssociationCursor; |
27 | 34 | import de.brightbyte.wikiword.integrator.data.FeatureSet; |
28 | 35 | import de.brightbyte.wikiword.integrator.data.FeatureSetValueSplitter; |
29 | 36 | import de.brightbyte.wikiword.integrator.data.MangelingFeatureSetCursor; |
— | — | @@ -42,11 +49,40 @@ |
43 | 50 | protected InputFileHelper inputHelper; |
44 | 51 | protected P propertyProcessor; |
45 | 52 | protected FeatureSetSourceDescriptor sourceDescriptor; |
| 53 | + private DataSource configuredDataSource; |
| 54 | + private DatasetIdentifier configuredDataset; |
46 | 55 | |
47 | 56 | public AbstractIntegratorApp() { |
48 | 57 | super(true, true); |
49 | 58 | } |
50 | 59 | |
| 60 | + @Override |
| 61 | + protected DataSource getConfiguredDataSource() throws IOException, PersistenceException { |
| 62 | + if (configuredDataSource!=null) return configuredDataSource; |
| 63 | + configuredDataSource = super.getConfiguredDataSource(); |
| 64 | + return configuredDataSource; |
| 65 | + } |
| 66 | + |
| 67 | + @Override |
| 68 | + public DatasetIdentifier getConfiguredDataset() { |
| 69 | + if (configuredDataset!=null) return configuredDataset; |
| 70 | + configuredDataset = super.getConfiguredDataset(); |
| 71 | + return configuredDataset; |
| 72 | + } |
| 73 | + |
| 74 | + public void testInit(DataSource dataSource, DatasetIdentifier dataset, TweakSet tweaks, FeatureSetSourceDescriptor sourceDescriptor) { |
| 75 | + if (this.tweaks!=null || this.sourceDescriptor!=null) throw new IllegalStateException("application already initialized"); |
| 76 | + |
| 77 | + this.configuredDataSource = dataSource; |
| 78 | + this.configuredDataset = dataset; |
| 79 | + this.tweaks = tweaks; |
| 80 | + this.sourceDescriptor = sourceDescriptor; |
| 81 | + } |
| 82 | + |
| 83 | + public void testLaunch() throws Exception { |
| 84 | + launchExecute(); |
| 85 | + } |
| 86 | + |
51 | 87 | protected InputFileHelper getInputHelper() { |
52 | 88 | if (inputHelper==null) { |
53 | 89 | inputHelper = new InputFileHelper(tweaks); |
— | — | @@ -77,6 +113,43 @@ |
78 | 114 | args.declare("dataset", null, true, String.class, "sets the wiki name (overrides the <wiki-or-dump> parameter)"); |
79 | 115 | } |
80 | 116 | |
| 117 | + protected DataCursor<Association> openAssociationCursor() throws IOException, SQLException, PersistenceException { |
| 118 | + Iterable<String> foreignFields = sourceDescriptor.getTweak("foreign-fields", (Iterable<String>)null); |
| 119 | + Iterable<String> conceptFields = sourceDescriptor.getTweak("concept-fields", (Iterable<String>)null); |
| 120 | + Iterable<String> propertyFields = sourceDescriptor.getTweak("property-fields", (Iterable<String>)null); |
| 121 | + |
| 122 | + if (foreignFields==null) { |
| 123 | + foreignFields = Arrays.asList(new String[] { |
| 124 | + sourceDescriptor.getTweak("foreign-id-field", (String)null), |
| 125 | + sourceDescriptor.getTweak("foreign-name-field", (String)null) |
| 126 | + }); |
| 127 | + } |
| 128 | + |
| 129 | + if (conceptFields==null) { |
| 130 | + conceptFields = Arrays.asList(new String[] { |
| 131 | + sourceDescriptor.getTweak("concept-id-field", (String)null), |
| 132 | + sourceDescriptor.getTweak("concept-name-field", (String)null) |
| 133 | + }); |
| 134 | + } |
| 135 | + |
| 136 | + if (propertyFields==null) { |
| 137 | + propertyFields = Arrays.asList(new String[] { |
| 138 | + sourceDescriptor.getTweak("association-via-field", (String)null), |
| 139 | + sourceDescriptor.getTweak("association-weight-field", (String)null) |
| 140 | + }); |
| 141 | + } |
| 142 | + |
| 143 | + DataCursor<FeatureSet> fsc = openFeatureSetCursor(); |
| 144 | + |
| 145 | + DataCursor<Association> cursor = |
| 146 | + new AssociationCursor(fsc, |
| 147 | + foreignFields, |
| 148 | + conceptFields, |
| 149 | + propertyFields ); |
| 150 | + |
| 151 | + return cursor; |
| 152 | + } |
| 153 | + |
81 | 154 | protected DataCursor<FeatureSet> openFeatureSetCursor() throws IOException, SQLException, PersistenceException { |
82 | 155 | FeatureSetSourceDescriptor sourceDescriptor = getSourceDescriptor(); |
83 | 156 | |
— | — | @@ -173,6 +246,7 @@ |
174 | 247 | } |
175 | 248 | } |
176 | 249 | |
177 | | - |
| 250 | + protected abstract P createProcessor(S conceptStore) throws InstantiationException; |
178 | 251 | |
| 252 | + |
179 | 253 | } |
\ No newline at end of file |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/LoadForeignProperties.java |
— | — | @@ -1,7 +1,6 @@ |
2 | 2 | package de.brightbyte.wikiword.integrator; |
3 | 3 | |
4 | 4 | import java.io.IOException; |
5 | | -import java.util.Arrays; |
6 | 5 | |
7 | 6 | import de.brightbyte.data.cursor.DataCursor; |
8 | 7 | import de.brightbyte.util.PersistenceException; |
— | — | @@ -43,7 +42,9 @@ |
44 | 43 | this.conceptStore.finalizeImport(); |
45 | 44 | } |
46 | 45 | |
| 46 | + @Override |
47 | 47 | protected ForeignPropertyProcessor createProcessor(ForeignPropertyStoreBuilder conceptStore) throws InstantiationException { |
| 48 | + // FIXME: parameter list is restrictive, pass descriptor |
48 | 49 | return instantiate(sourceDescriptor, "foreignPropertyProcessorClass", ForeignPropertyPassThrough.class, conceptStore); |
49 | 50 | } |
50 | 51 | |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/FeatureSetSourceDescriptor.java |
— | — | @@ -1,6 +1,7 @@ |
2 | 2 | package de.brightbyte.wikiword.integrator; |
3 | 3 | |
4 | 4 | import java.io.File; |
| 5 | +import java.io.IOException; |
5 | 6 | import java.net.MalformedURLException; |
6 | 7 | import java.net.URL; |
7 | 8 | import java.util.List; |
— | — | @@ -23,6 +24,10 @@ |
24 | 25 | super(prefix, parent); |
25 | 26 | } |
26 | 27 | |
| 28 | + public void loadTweaks(URL u) throws IOException { |
| 29 | + super.loadTweaks(u); |
| 30 | + if (getBaseURL()==null) setBaseURL(u); |
| 31 | + } |
27 | 32 | |
28 | 33 | public String getAuthorityName() { |
29 | 34 | String name = getTweak("authority", null); |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/data/CollapsingMatchesCursor.java |
— | — | @@ -11,17 +11,17 @@ |
12 | 12 | protected DataCursor<Association> cursor; |
13 | 13 | protected Association prev; |
14 | 14 | |
15 | | - protected String sourceKeyField; |
16 | | - protected String targetKeyField; |
| 15 | + protected String foreignKeyField; |
| 16 | + protected String conceptKeyField; |
17 | 17 | |
18 | | - public CollapsingMatchesCursor(DataCursor<Association> cursor, String sourceKeyField, String targetKeyField) { |
| 18 | + public CollapsingMatchesCursor(DataCursor<Association> cursor, String foreignKeyField, String conceptKeyField) { |
19 | 19 | if (cursor==null) throw new NullPointerException(); |
20 | | - if (sourceKeyField==null) throw new NullPointerException(); |
21 | | - if (targetKeyField==null) throw new NullPointerException(); |
| 20 | + if (foreignKeyField==null) throw new NullPointerException(); |
| 21 | + if (conceptKeyField==null) throw new NullPointerException(); |
22 | 22 | |
23 | 23 | this.cursor = cursor; |
24 | | - this.sourceKeyField = sourceKeyField; |
25 | | - this.targetKeyField = targetKeyField; |
| 24 | + this.foreignKeyField = foreignKeyField; |
| 25 | + this.conceptKeyField = conceptKeyField; |
26 | 26 | } |
27 | 27 | |
28 | 28 | public void close() { |
— | — | @@ -42,15 +42,15 @@ |
43 | 43 | prev = cursor.next(); |
44 | 44 | if (prev==null) break; |
45 | 45 | |
46 | | - if (!prev.getSourceItem().overlaps(s, sourceKeyField)) break; |
47 | | - if (!prev.getTargetItem().overlaps(t, targetKeyField)) break; |
| 46 | + if (!prev.getSourceItem().overlaps(s, foreignKeyField)) break; |
| 47 | + if (!prev.getTargetItem().overlaps(t, conceptKeyField)) break; |
48 | 48 | |
49 | 49 | t = FeatureSets.merge(t, prev.getTargetItem(), prev.getProperties()); |
50 | 50 | } |
51 | 51 | |
52 | 52 | candidates.add(t); |
53 | 53 | |
54 | | - if (prev==null || !prev.getSourceItem().overlaps(s, sourceKeyField)) break; |
| 54 | + if (prev==null || !prev.getSourceItem().overlaps(s, foreignKeyField)) break; |
55 | 55 | |
56 | 56 | s = FeatureSets.merge(s, prev.getSourceItem()); |
57 | 57 | } |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/BuildConceptMappings.java |
— | — | @@ -0,0 +1,80 @@ |
| 2 | +package de.brightbyte.wikiword.integrator; |
| 3 | + |
| 4 | +import java.io.IOException; |
| 5 | +import java.util.Collection; |
| 6 | + |
| 7 | +import de.brightbyte.data.Functor; |
| 8 | +import de.brightbyte.data.Functors; |
| 9 | +import de.brightbyte.data.cursor.DataCursor; |
| 10 | +import de.brightbyte.util.PersistenceException; |
| 11 | +import de.brightbyte.wikiword.integrator.data.Association; |
| 12 | +import de.brightbyte.wikiword.integrator.data.CollapsingMatchesCursor; |
| 13 | +import de.brightbyte.wikiword.integrator.data.MappingCandidates; |
| 14 | +import de.brightbyte.wikiword.integrator.processor.ConceptMappingProcessor; |
| 15 | +import de.brightbyte.wikiword.integrator.processor.OptimalMappingSelector; |
| 16 | +import de.brightbyte.wikiword.integrator.store.ConceptMappingStoreBuilder; |
| 17 | +import de.brightbyte.wikiword.integrator.store.DatabaseConceptMappingStoreBuilder; |
| 18 | +import de.brightbyte.wikiword.store.WikiWordStoreFactory; |
| 19 | + |
| 20 | +/** |
| 21 | + * This is the primary entry point to the first phase of a WikiWord analysis. |
| 22 | + * ImportDump can be invoked as a standalone program, use --help as a |
| 23 | + * command line parameter for usage information. |
| 24 | + */ |
| 25 | +public class BuildConceptMappings extends AbstractIntegratorApp<ConceptMappingStoreBuilder, ConceptMappingProcessor, MappingCandidates> { |
| 26 | + |
| 27 | + @Override |
| 28 | + protected WikiWordStoreFactory<? extends ConceptMappingStoreBuilder> createConceptStoreFactory() throws IOException, PersistenceException { |
| 29 | + return new DatabaseConceptMappingStoreBuilder.Factory( |
| 30 | + getTargetTableName(), |
| 31 | + getConfiguredDataset(), |
| 32 | + getConfiguredDataSource(), |
| 33 | + tweaks); |
| 34 | + } |
| 35 | + |
| 36 | + @Override |
| 37 | + protected void run() throws Exception { |
| 38 | + Functor<Number, ? extends Collection<? extends Number>> aggregator = sourceDescriptor.getTweak("optiomization-aggregator", null); |
| 39 | + |
| 40 | + if (aggregator==null) { |
| 41 | + String f = sourceDescriptor.getTweak("optiomization-function", "sum"); |
| 42 | + if (f.equals("sum")) aggregator = Functors.Double.sum; |
| 43 | + else if (f.equals("max")) aggregator = Functors.Double.max; |
| 44 | + else throw new IllegalArgumentException("unknwon aggregator function: "+f); |
| 45 | + } |
| 46 | + |
| 47 | + this.propertyProcessor = createProcessor(conceptStore, sourceDescriptor.getTweak("optiomization-field", "freq"), aggregator); |
| 48 | + |
| 49 | + section("-- fetching properties --------------------------------------------------"); |
| 50 | + DataCursor<Association> asc = openAssociationCursor(); |
| 51 | + |
| 52 | + DataCursor<MappingCandidates> cursor = |
| 53 | + new CollapsingMatchesCursor(asc, |
| 54 | + sourceDescriptor.getTweak("foreign-id-field", (String)null), |
| 55 | + sourceDescriptor.getTweak("concept-id-field", (String)null) ); |
| 56 | + |
| 57 | + section("-- process properties --------------------------------------------------"); |
| 58 | + this.conceptStore.prepareImport(); |
| 59 | + |
| 60 | + this.propertyProcessor.processMappings(cursor); |
| 61 | + cursor.close(); |
| 62 | + |
| 63 | + this.conceptStore.finalizeImport(); |
| 64 | + } |
| 65 | + |
| 66 | + @Override |
| 67 | + protected ConceptMappingProcessor createProcessor(ConceptMappingStoreBuilder conceptStore) throws InstantiationException { |
| 68 | + //FIXME: parameter list is specific to OptimalMappingSelector |
| 69 | + throw new UnsupportedOperationException("not supported"); |
| 70 | + } |
| 71 | + |
| 72 | + protected ConceptMappingProcessor createProcessor(ConceptMappingStoreBuilder conceptStore, String property, Functor<Number, ? extends Collection<? extends Number>> aggregator) throws InstantiationException { |
| 73 | + //FIXME: parameter list is specific to OptimalMappingSelector |
| 74 | + return instantiate(sourceDescriptor, "conceptMappingProcessorClass", OptimalMappingSelector.class, conceptStore, property, aggregator); |
| 75 | + } |
| 76 | + |
| 77 | + public static void main(String[] argv) throws Exception { |
| 78 | + BuildConceptMappings app = new BuildConceptMappings(); |
| 79 | + app.launch(argv); |
| 80 | + } |
| 81 | +} |
\ No newline at end of file |
Index: trunk/WikiWord/WikiWordIntegrator/src/main/java/de/brightbyte/wikiword/integrator/BuildConceptAssociations.java |
— | — | @@ -1,13 +1,10 @@ |
2 | 2 | package de.brightbyte.wikiword.integrator; |
3 | 3 | |
4 | 4 | import java.io.IOException; |
5 | | -import java.util.Arrays; |
6 | 5 | |
7 | 6 | import de.brightbyte.data.cursor.DataCursor; |
8 | 7 | import de.brightbyte.util.PersistenceException; |
9 | 8 | import de.brightbyte.wikiword.integrator.data.Association; |
10 | | -import de.brightbyte.wikiword.integrator.data.AssociationCursor; |
11 | | -import de.brightbyte.wikiword.integrator.data.FeatureSet; |
12 | 9 | import de.brightbyte.wikiword.integrator.processor.ConceptAssociationPassThrough; |
13 | 10 | import de.brightbyte.wikiword.integrator.processor.ConceptAssociationProcessor; |
14 | 11 | import de.brightbyte.wikiword.integrator.store.AssociationAsMappingStoreBuilder; |
— | — | @@ -50,39 +47,8 @@ |
51 | 48 | this.propertyProcessor = createProcessor(conceptStore); |
52 | 49 | |
53 | 50 | section("-- fetching properties --------------------------------------------------"); |
54 | | - DataCursor<FeatureSet> fsc = openFeatureSetCursor(); |
| 51 | + DataCursor<Association> cursor = openAssociationCursor(); |
55 | 52 | |
56 | | - Iterable<String> foreignFields = sourceDescriptor.getTweak("foreign-fields", (Iterable<String>)null); |
57 | | - Iterable<String> conceptFields = sourceDescriptor.getTweak("concept-fields", (Iterable<String>)null); |
58 | | - Iterable<String> propertyFields = sourceDescriptor.getTweak("property-fields", (Iterable<String>)null); |
59 | | - |
60 | | - if (foreignFields==null) { |
61 | | - foreignFields = Arrays.asList(new String[] { |
62 | | - sourceDescriptor.getTweak("foreign-id-field", (String)null), |
63 | | - sourceDescriptor.getTweak("foreign-name-field", (String)null) |
64 | | - }); |
65 | | - } |
66 | | - |
67 | | - if (conceptFields==null) { |
68 | | - conceptFields = Arrays.asList(new String[] { |
69 | | - sourceDescriptor.getTweak("concept-id-field", (String)null), |
70 | | - sourceDescriptor.getTweak("concept-name-field", (String)null) |
71 | | - }); |
72 | | - } |
73 | | - |
74 | | - if (propertyFields==null) { |
75 | | - propertyFields = Arrays.asList(new String[] { |
76 | | - sourceDescriptor.getTweak("association-via-field", (String)null), |
77 | | - sourceDescriptor.getTweak("association-weight-field", (String)null) |
78 | | - }); |
79 | | - } |
80 | | - |
81 | | - DataCursor<Association> cursor = |
82 | | - new AssociationCursor(fsc, |
83 | | - sourceDescriptor.getTweak("foreign-fields", (Iterable<String>)null), |
84 | | - sourceDescriptor.getTweak("concept-fields", (Iterable<String>)null), |
85 | | - sourceDescriptor.getTweak("property-fields", (Iterable<String>)null) ); |
86 | | - |
87 | 53 | section("-- process properties --------------------------------------------------"); |
88 | 54 | this.conceptStore.prepareImport(); |
89 | 55 | |
— | — | @@ -92,7 +58,9 @@ |
93 | 59 | this.conceptStore.finalizeImport(); |
94 | 60 | } |
95 | 61 | |
| 62 | + @Override |
96 | 63 | protected ConceptAssociationProcessor createProcessor(AssociationFeatureStoreBuilder conceptStore) throws InstantiationException { |
| 64 | + // FIXME: parameter list is restrictive, pass descriptor |
97 | 65 | return instantiate(sourceDescriptor, "conceptAssociationProcessorClass", ConceptAssociationPassThrough.class, conceptStore); |
98 | 66 | } |
99 | 67 | |