Skip to content

Commit

Permalink
#117 added missing metadata form page from prototype project.
Browse files Browse the repository at this point in the history
  • Loading branch information
rinkesj committed Jul 2, 2015
1 parent 7764dad commit 6c2ff0f
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!DOCTYPE html>
<html xmlns:wicket="http://wicket.apache.org">
<body>
<div wicket:id="metadata-form"></div>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package cz.zcu.kiv.eegdatabase.wui.ui.experiments.metadata;

import java.io.InputStream;

import odml.core.Reader;
import odml.core.Section;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.Model;
import org.apache.wicket.request.mapper.parameter.PageParameters;

import cz.zcu.kiv.eegdatabase.wui.app.EEGDataBaseApplication;

public class MetadataFormPage extends WebPage {
private static final long serialVersionUID = 1L;

public MetadataFormPage(final PageParameters parameters) {
super(parameters);

InputStream template = EEGDataBaseApplication.get().getServletContext().getResourceAsStream("/files/odML/testtemplate.xml");

Section section = null;
Reader reader = new Reader();
try {
section = reader.load(template);

} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

add(new MetadataForm("metadata-form", new Model<Section>(section)));
}
}

0 comments on commit 6c2ff0f

Please sign in to comment.