Project

General

Profile

Revision b73cf15d

IDb73cf15d6b9d6b5d5772c6802e2a989b49617723
Parent ce703c36
Child f117e574

Added by Sybille Bürs about 7 years ago

after reverse merge

View differences:

cdmlib-print/src/test/java/eu/etaxonomy/cdm/print/PublisherTest.java
50 50
		
51 51
		configurator = PublishConfigurator.NewRemoteInstance();
52 52
		
53
		configurator.setWebserviceUrl("http://localhost:8080/");
54
		/////configurator.setWebserviceUrl("http://dev.e-taxonomy.eu/cdmserver/flora_central_africa/");//central africa production
53
		//configurator.setWebserviceUrl("http://localhost:8080/");
54
		configurator.setWebserviceUrl("http://dev.e-taxonomy.eu/cdmserver/flora_central_africa/");//central africa production
55 55
		//configurator.setWebserviceUrl("http://dev.e-taxonomy.eu/cdmserver/caryophyllales/");					
56
		//http://160.45.63.201/cdmserver/flora_central_africa
57
		//http://dev.e-taxonomy.eu/cdmserver/flora_central_africa/
56
		//http://160.45.63.201/dataportal/d7/flore-afrique-centrale/
58 57

  
59 58
		factory = configurator.getFactory();
60 59
		
61 60
		//setClassification();
62 61
		setTaxonNode();
63
		
64
		//TODO: How do we get the uuid for the feature tree from the classification or taxonNode without hardcoding it?
62
				
65 63
		//configurator.setFeatureTree(UUID.fromString("ac8d4e58-926d-4f81-ac77-cebdd295df7c"));//caryophyllales		
66 64
		configurator.setFeatureTree(UUID.fromString("051d35ee-22f1-42d8-be07-9e9bfec5bcf7"));//Ericaceae
67 65
		
68 66
//		Element selectedTaxonNodeElement = new Element("TaxonNode");
69 67
//		configurator.addSelectedTaxonNodeElements(selectedTaxonNodeElement);		
70
//		configurator.setExportFolder(new File("/home/sybille/tmp/"));
71
		configurator.setExportFolder(new File("/Users/l.morris/Documents")); //TODO: use a relative path
68
		configurator.setExportFolder(new File("/home/sybille/tmp/"));				
72 69
	}
73 70
	
74 71
	private static void setTaxonNode() {
......
77 74
		//a95f7122-87c9-478b-a1e6-d9199d855356 agarista
78 75
		//taxonNodeUuid a605e87e-113e-4ebd-ad97-f086b734b4da FeatureTree UUID 051d35ee-22f1-42d8-be07-9e9bfec5bcf7
79 76
		//UUID taxonNodeUuid = UUID.fromString("be6566eb-4661-41fe-8ec2-caf885a12cbd");//5168a18b-c0b1-44cc-80aa-7a5572fefe04
80
		//UUID taxonNodeUuid = UUID.fromString("a605e87e-113e-4ebd-ad97-f086b734b4da");//Ericaceae
81
		UUID taxonNodeUuid = UUID.fromString("0044aae4-721b-4726-85ff-752a89cff748");
82
		//restionaceae 0044aae4-721b-4726-85ff-752a89cff748
77
		UUID taxonNodeUuid = UUID.fromString("a605e87e-113e-4ebd-ad97-f086b734b4da");//Ericaceae
83 78
		//UUID taxonNodeUuid = UUID.fromString("9440bd28-b462-4112-8906-a643b7d3f195");//caryophyllales
84 79
		Element taxonNodeElement = factory.getTaxonNode(taxonNodeUuid);
85 80
		configurator.addSelectedTaxonNodeElements(taxonNodeElement);		
......
105 100
			//}
106 101
			// 2. http://dev.e-taxonomy.eu/cdmserver/caryophyllales/portal/classification/9edc58b5-de3b-43aa-9f31-1ede7c009c2b/childNodes
107 102
			// 3. get the taxonNode uuid from the classification
108
			int count = 0;
109
			
110 103
			for(Element child2 : elements){
111 104
				logger.warn("2 The element name is " + child2.getName() + " and value is " + child2.getValue());
112 105
				// 1. get the value where the child2.getName is uuid
113 106

  
114 107
				logger.warn("3 The uuid is " + child2.getChildText("uuid")); 
115 108
				logger.warn("4 The uuid is " + child2.getChild("uuid")); 
116
				logger.warn("5 The count is " + count); 
117
				
118
				//filter out Fabales in FoCE - as it's huge and seems to cause the harvetsing to crash.
119
				if (child2.getChildText("uuid") == "94bb5507-201d-4e34-9aa7-dce58fcd6a25") {
120
					break;
121
				}
122
				//temporarily filter c15e12c1-6118-4929-aed0-b0cc90f5ab22 as it's causing a lazyInitializationException in caryophyllales
123
				if (child2.getChildText("uuid") == "c15e12c1-6118-4929-aed0-b0cc90f5ab22") {
124
					break;
125
				}
126 109

  
127 110
				UUID taxonNodeUuid = UUID.fromString(child2.getChildText("uuid"));
128 111
				Element taxonNodeElement = factory.getTaxonNode(taxonNodeUuid);
129 112
				configurator.addSelectedTaxonNodeElements(taxonNodeElement);
130
				count++;
131 113
			}
132 114
		}
133 115
	}
......
143 125
		Publisher.publish(configurator);
144 126
	}
145 127
	
146
	@Ignore
128
	@Test
147 129
	public void textPublishOdf() {
148 130
		configurator.setOutputModules(Arrays.asList(new IPublishOutputModule[]{new OdfOutputModule()}));
149 131
		

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)