-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#117 added missing metadata form page from prototype project.
- Loading branch information
rinkesj
committed
Jul 2, 2015
1 parent
7764dad
commit 6c2ff0f
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/metadata/MetadataFormPage.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
34 changes: 34 additions & 0 deletions
34
src/main/java/cz/zcu/kiv/eegdatabase/wui/ui/experiments/metadata/MetadataFormPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))); | ||
} | ||
} |