Commit 16f32482 authored by Jasper Koehorst's avatar Jasper Koehorst
Browse files

sync additional

parent 3e57b3f4
......@@ -9,6 +9,7 @@ defaultTasks("clean", "build")
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = JavaVersion.VERSION_17
repositories {
......
......@@ -66,6 +66,7 @@ public class MetadataParser extends Metadata {
// H requirements are hidden. Useful when working on new standards while using the document
if (metadata.getRequirement().toLowerCase().contains("h")) continue;
// Get value syntax
metadata.setSyntax(row.getCell(index.get("value syntax")).getStringCellValue().trim());
......@@ -104,13 +105,15 @@ public class MetadataParser extends Metadata {
// Check if metadata structured comment name is already used
boolean exists = false;
for (Metadata metadata1 : metadataSet) {
if (metadata.getPackage().equals(metadata1.getPackage()) && metadata.getStructuredCommentName().equals(metadata1.getStructuredCommentName())) {
if (metadata.getPackage().equals(metadata1.getPackage()) && metadata.getStructuredCommentName().equals(metadata1.getStructuredCommentName())) {
exists = true;
logger.warn("A name has already been used, ignoring next entry with name " + metadata1.getStructuredCommentName());
}
}
if (!exists)
if (!exists) {
metadataSet.add(metadata);
}
}
}
return metadataSet;
......@@ -176,11 +179,12 @@ public class MetadataParser extends Metadata {
syntax = syntax.replace("{DOI}", url);
syntax = syntax.replace("{URL}", url);
// Taxonomy
syntax = syntax.replace("{NCBI taxid}", "\\d+");
// syntax = syntax.replace("{NCBI taxid}", "\\d+");
//boolean
syntax = syntax.replace("{boolean}", "[true|false|yes|no]");
// dna
syntax = syntax.replace("{dna}", "[\\[\\]ACGTUWSMKRYBDHVN]+");
if (syntax.matches(".*\\{[a-zA-Z].*")) {
logger.error("Entity with original value of " + value + " with generated regex " + syntax + " with example " + example);
}
......@@ -286,13 +290,13 @@ public class MetadataParser extends Metadata {
sheetObjects.put(name, metadataHashSet);
}
try {
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("metadata.obj"));
oos.writeObject(sheetObjects);
oos.close();
} catch (IOException e) {
e.printStackTrace();
}
// try {
// ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("metadata.obj"));
// oos.writeObject(sheetObjects);
// oos.close();
// } catch (IOException e) {
// e.printStackTrace();
// }
return sheetObjects;
}
......
......@@ -129,7 +129,7 @@ public class ExcelValidator {
setPrefixes();
/**
* The order of creation Project > Investigation > Study > Observation Unit > Assay is flipped around due to cardinality restrictions by the API
* The order of creation Project > Investigation > Study > Observation Unit > Sample > Assay is flipped around due to cardinality restrictions by the API
* An investigation needs to have 1 or more studies
* A study needs to have 1 or more observation units
* etc ...
......@@ -786,7 +786,7 @@ public class ExcelValidator {
throw new DuplicateDataException("Assay with identifier " + assayIdentifier + " already exists!\n" +
"Check for duplicate row entry in your input file");
} else {
// Further testing if it is of the same type
// Further, testing if it is of the same type
// assayType
Iterator<ResultLine> resultLines = domain.getRDFSimpleCon().runQuery("getAssay.txt", true, assayIdentifier).iterator();
while (resultLines.hasNext()) {
......
......@@ -34,7 +34,7 @@ import nl.fairbydesign.backend.data.objects.*;
import nl.fairbydesign.backend.metadata.Metadata;
import nl.fairbydesign.backend.parsers.ExcelGenerator;
import nl.fairbydesign.views.main.MainView;
import org.jboss.logging.Logger;
import org.apache.log4j.Logger;
import org.vaadin.olli.FileDownloadWrapper;
import java.io.File;
......@@ -126,9 +126,6 @@ public class TemplateView extends Div {
}
}
// Finalise accordion and align center
VerticalLayout verticalLayout = new VerticalLayout();
// Generate and "download" button
Button buttonGenerate = new Button("GENERATE EXCEL");
......@@ -220,6 +217,7 @@ public class TemplateView extends Div {
} else {
}
if (message != null) {
// TODO make a proper CSS file
......@@ -255,9 +253,12 @@ public class TemplateView extends Div {
}
});
// Finalise accordion and align center
VerticalLayout verticalLayout = new VerticalLayout();
verticalLayout.add(accordion, buttonGenerate);
verticalLayout.setWidthFull();
verticalLayout.setDefaultHorizontalComponentAlignment(CENTER);
// Set footer
Html footerContent = WebGeneric.getTextFromResource("views/footer.html");
Div footer = new Div();
......@@ -266,7 +267,6 @@ public class TemplateView extends Div {
add(verticalLayout);
// add(buttonDownload);
}
/**
......@@ -305,7 +305,7 @@ public class TemplateView extends Div {
gridSelection.asMultiSelect().addValueChangeListener(event -> {
// Check if the package was selected
gridSelection.asMultiSelect().select(obligatoryList);
logger.info("Selected " + gridSelection.getSelectedItems().size() + " items");
logger.debug("Selected " + gridSelection.getSelectedItems().size() + " items");
});
// Additional fields to be added and enable field
......
......@@ -37,7 +37,7 @@ public class ValidationView extends Div {
Credentials credentials = (Credentials) VaadinSession.getCurrent().getAttribute("credentials");
if (credentials != null && !credentials.isSuccess()) {
Label label = new Label(" If you can login your metadata will be automatically uploaded into the data storage system");
Label label = new Label("If you can login your metadata will be automatically uploaded into the data storage system");
add(label);
}
......
server.port=${PORT:8083}
# Ensure application is run in Vaadin 14/npm mode
vaadin.compatibilityMode = false
logging.level.org.atmosphere = warn
logging.level.okhttp3.OkHttpClient = warn
logging.level.org.irods = warn
# To improve the performance during development.
# For more information https://vaadin.com/docs/v14/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
# vaadin.whitelisted-packages= org/vaadin/example
# add a FileAppender to the logger fout
logging.file.max-history=7
logging.file.name=fairds.log
# logging.pattern.file=
#log4j.appender.fout=org.apache.log4j.FileAppender
# create a log file
#log4j.appender.fout.File=interface.log
#log4j.appender.fout.layout=org.apache.log4j.PatternLayout
# use a more detailed message pattern
#log4j.appender.fout.layout.ConversionPattern=%p\t%d{ISO8601}\t%r\t%c\t[%t]\t%m%n
logging.level.web=OFF
# Debug for NL packages
debug=false
logging.level.nl=OFF
spring.devtools.restart.poll-interval=2s
spring.devtools.restart.quiet-period=1s
# Size issue?
spring.servlet.multipart.max-file-size=128MB
spring.servlet.multipart.max-request-size=128MB
spring.servlet.multipart.enabled=true
......@@ -16,4 +16,4 @@
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix mixs: <https://w3id.org/gensc.org/terms/> .
@prefix MIXS: <https://w3id.org/gensc.org/terms/> .
prefix schema: <http://schema.org/> .
\ No newline at end of file
@prefix schema: <http://schema.org/> .
\ No newline at end of file
Supports Markdown
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