Commit 667219f1 authored by Kjetil Thuen's avatar Kjetil Thuen

Removed solution from Level07. Oops :)

parent 516f52c9
......@@ -43,9 +43,7 @@ public class Level07 {
@Before
public void connectToServer() {
try {
NesstarDB db = NesstarDBFactory.getInstance();
server = db.getServer(new URI("http://nina.nsd.uib.no"));
server.login("eddiTUT","tutEDDI");
} catch (Exception e) {
e.printStackTrace();
}
......@@ -62,23 +60,15 @@ public class Level07 {
* easier to find it in WebView.
*
* You can see the result in in a browser by navigating to http://nina.nsd.uib.no/webview
*
* NOTE: the publishStudy method does not return anything yet, so you will
* have to fetch the study ("demo!gor") using a Bank
*/
@Test
public void publishDataAndMetadata() throws NotAuthorizedException, IOException {
Study study = null;
try {
StudyPublishingBuilder builder = new StudyPublishingBuilder();
InputStream ddiFileEN = Thread.currentThread().getContextClassLoader().getResourceAsStream("com/nesstar/tutorial/demo-gor/DDIEN.xml");
InputStream ddiFileNO = Thread.currentThread().getContextClassLoader().getResourceAsStream("com/nesstar/tutorial/demo-gor/DDINO.xml");
InputStream csvFile = Thread.currentThread().getContextClassLoader().getResourceAsStream("com/nesstar/tutorial/demo-gor/demo!gor_F1.csv");
builder.addDDI(ddiFileNO);
builder.addDDI(ddiFileEN);
builder.addData(csvFile, "demo_gor");
builder.setDefaultLanguage(Locale.ENGLISH);
study = server.publishStudy(builder);
try {
} catch (Exception e) {
e.printStackTrace();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment