Project

General

Profile

« Previous | Next » 

Revision 46587

implemented use of opt in/out rules for entity fields (#2557).
depending on specific solrj version (thus excluding cdh6.X versions)

View differences:

XsltRowTransformerFactoryTest.java
155 155
		doTest(loadFromTransformationProfile("projects_2_hbase.xsl"), load("projectRecordFCT.xml"));
156 156
	}
157 157

  
158

  
158 159
	@Test
159 160
	public void testParseOaf() throws Exception {
160 161

  
......
272 273
	}
273 274

  
274 275
	@Test
276
	public void testLinkOrganizationAffiliation() throws Exception {
277

  
278
		final List<Row> rows = Lists.newArrayList();
279
		rows.addAll(asRows(loadFromTransformationProfile("organizations_2_hbase.xsl"), load("organization.xml")));
280
		rows.addAll(asRows(loadFromTransformationProfile("resultorganization_2_hbase.xsl"), load("result_organization.xml")));
281
		rows.addAll(asRows(loadFromTransformationProfile("oaf2hbase.xml"), load("record.xml")));
282

  
283
		printAll(mapAll(buildTable(rows)));
284
	}
285

  
286
	@Test
275 287
	public void testUnpackAuthors() throws Exception {
276 288

  
277 289
		final Map<String, Object> xslParams = Maps.newHashMap();
......
415 427

  
416 428
	@Test
417 429
	public void testProjectExtraInfo() throws Exception {
418

  
419 430
		final List<Row> rows = Lists.newArrayList();
420 431
		rows.addAll(asRows(loadFromTransformationProfile("projects_2_hbase.xsl"), load("projectRecordExtraInfo.xml")));
421 432
		printAll(mapAll(buildTable(rows)));
......
730 741
						log.debug(doc.valueOf(xpath));
731 742
					}
732 743
				} else {
733

  
734 744
					log.info(val);
735 745
				}
736 746
			}
......
754 764
	}
755 765

  
756 766
	private XmlRecordFactory newBuilder() throws TransformerConfigurationException, TransformerFactoryConfigurationError, DocumentException {
757
		return new XmlRecordFactory(entityConfigTable, ContextMapper.fromXml(eu.dnetlib.data.mapreduce.hbase.index.config.Context.xml),
758
				RelClasses.fromJSon(RelClassesTest.relClassesJson), XmlRecordFactoryTest.SCHEMA_LOCATION, true, true, false, XmlRecordFactoryTest.specialDatasourceTypes);
767
		return new XmlRecordFactory(entityConfigTable, ContextMapper.fromXml(Context.xml),
768
				RelClasses.fromJSon(RelClassesTest.relClassesJson), XmlRecordFactoryTest.SCHEMA_LOCATION, true, false, false, XmlRecordFactoryTest.specialDatasourceTypes);
759 769
	}
760 770

  
761 771
	private InputStream load(final String fileName) {

Also available in: Unified diff