Commit b3166cc7 authored by Matija Obreza's avatar Matija Obreza
Browse files

MCPD definitions

parent 2b388132
......@@ -369,10 +369,18 @@ public class AppWindow {
tblclmnPreferredName.setWidth(100);
tblclmnPreferredName.setText("Preferred name");
TableViewerColumn tableViewerColumn_2 = new TableViewerColumn(tableViewer, SWT.NONE);
TableColumn tblclmnTerm = tableViewerColumn_2.getColumn();
tblclmnTerm.setWidth(100);
tblclmnTerm.setText("Term");
TableViewerColumn tableViewerColumn_1 = new TableViewerColumn(tableViewer, SWT.NONE);
TableColumn tblclmnRdfTerm = tableViewerColumn_1.getColumn();
tblclmnRdfTerm.setWidth(100);
tblclmnRdfTerm.setText("RDF Term");
tblclmnRdfTerm.setText("RDF URL");
table.pack();
dragSource.addDragListener(new DragSourceAdapter() {
@Override
public void dragStart(DragSourceEvent event) {
......@@ -470,7 +478,7 @@ public class AppWindow {
DataBindingContext bindingContext = new DataBindingContext();
//
ObservableListContentProvider listContentProvider = new ObservableListContentProvider();
IObservableMap[] observeMap = BeansObservables.observeMaps(listContentProvider.getKnownElements(), ColumnDef.class, new String[] { "preferredName", "rdfTerm" });
IObservableMap[] observeMap = BeansObservables.observeMaps(listContentProvider.getKnownElements(), ColumnDef.class, new String[] { "preferredName", "title", "rdfTerm" });
tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMap));
tableViewer.setContentProvider(listContentProvider);
//
......
......@@ -11,12 +11,14 @@ public class ColumnDef extends AbstractModelObject {
private boolean unique;
private String rdfTerm;
private Set<ColumnValidator> validators = new HashSet<ColumnValidator>();
private String title;
public ColumnDef() {
}
public ColumnDef(String preferredName, ColumnDataType dataType, boolean unique, String rdfTerm) {
public ColumnDef(String preferredName, String title, ColumnDataType dataType, boolean unique, String rdfTerm) {
this.preferredName = preferredName;
this.title = title;
this.dataType = dataType;
this.unique = unique;
this.rdfTerm = rdfTerm;
......@@ -61,4 +63,12 @@ public class ColumnDef extends AbstractModelObject {
public void setValidators(Set<ColumnValidator> validators) {
this.validators = validators;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
......@@ -30,19 +30,123 @@ public class MCPD {
public MCPD() {
List<ColumnDef> columns = new ArrayList<ColumnDef>();
ColumnDef instCode = new ColumnDef("INSTCODE", ColumnDataType.TEXT, false, RdfMCPD.INSTCODE);
ColumnDef instCode = new ColumnDef("INSTCODE", "Institute code", ColumnDataType.TEXT, false, RdfMCPD.INSTCODE);
instCode.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(instCode);
ColumnDef acceNumb = new ColumnDef("ACCENUMB", ColumnDataType.TEXT, true, RdfMCPD.ACCENUMB);
ColumnDef acceNumb = new ColumnDef("ACCENUMB", "Accession number", ColumnDataType.TEXT, true, RdfMCPD.ACCENUMB);
columns.add(acceNumb);
ColumnDef genus = new ColumnDef("GENUS", ColumnDataType.TEXT, false, RdfMCPD.GENUS);
ColumnDef columnDef = new ColumnDef("COLLNUMB", "Collecting number", ColumnDataType.TEXT, false, RdfMCPD.COLLNUMB);
columns.add(columnDef);
columnDef = new ColumnDef("COLLCODE", "Collecting institute code", ColumnDataType.TEXT, false, RdfMCPD.COLLCODE);
columnDef.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(columnDef);
columnDef = new ColumnDef("COLLNAME", "Collecting institute name", ColumnDataType.TEXT, false, RdfMCPD.COLLNAME);
columns.add(columnDef);
columnDef = new ColumnDef("COLLINSTADDRESS", "Collecting institute address", ColumnDataType.TEXT, false, RdfMCPD.COLLINSTADDRESS);
columns.add(columnDef);
columnDef = new ColumnDef("COLLMISSID", "Collecting mission identifier", ColumnDataType.TEXT, false, RdfMCPD.COLLMISSID);
columns.add(columnDef);
ColumnDef genus = new ColumnDef("GENUS", "Genus", ColumnDataType.TEXT, false, RdfMCPD.GENUS);
columns.add(genus);
ColumnDef species = new ColumnDef("SPECIES", ColumnDataType.TEXT, false, RdfMCPD.SPECIES);
ColumnDef species = new ColumnDef("SPECIES", "Species", ColumnDataType.TEXT, false, RdfMCPD.SPECIES);
columns.add(species);
columnDef = new ColumnDef("SPAUTHOR", "Species authority", ColumnDataType.TEXT, false, RdfMCPD.SPAUTHOR);
columns.add(columnDef);
columnDef = new ColumnDef("SUBTAXA", "Subtaxon", ColumnDataType.TEXT, false, RdfMCPD.SUBTAXA);
columns.add(columnDef);
columnDef = new ColumnDef("SUBTAUTHOR", "Subtaxon authority", ColumnDataType.TEXT, false, RdfMCPD.SUBTAUTHOR);
columns.add(columnDef);
columnDef = new ColumnDef("CROPNAME", "Common crop name", ColumnDataType.TEXT, false, RdfMCPD.CROPNAME);
columns.add(columnDef);
columnDef = new ColumnDef("ACCENAME", "Accession name", ColumnDataType.TEXT, false, RdfMCPD.ACCENAME);
columns.add(columnDef);
columnDef = new ColumnDef("ACQDATE", "Acquisition date", ColumnDataType.TEXT, false, RdfMCPD.ACQDATE);
columns.add(columnDef);
columnDef = new ColumnDef("ORIGCTY", "Country of origin", ColumnDataType.TEXT, false, RdfMCPD.ORIGCTY);
columns.add(columnDef);
columnDef = new ColumnDef("COLLSITE", "Location of collecting site", ColumnDataType.TEXT, false, RdfMCPD.COLLSITE);
columns.add(columnDef);
columnDef = new ColumnDef("DECLATITUDE", "Latitude of collecting site (decimal)", ColumnDataType.DOUBLE, false, RdfMCPD.DECLATITUDE);
columns.add(columnDef);
columnDef = new ColumnDef("DECLONGITUDE", "Longitude of collecting site (decimal)", ColumnDataType.DOUBLE, false, RdfMCPD.DECLONGITUDE);
columns.add(columnDef);
columnDef = new ColumnDef("COORDUNCERT", "Coordinate uncertainty", ColumnDataType.DOUBLE, false, RdfMCPD.COORDUNCERT);
columns.add(columnDef);
columnDef = new ColumnDef("COORDDATUM", "Coordinate datum", ColumnDataType.TEXT, false, RdfMCPD.COORDDATUM);
columns.add(columnDef);
columnDef = new ColumnDef("GEOREFMETH", "Georeferencing method", ColumnDataType.TEXT, false, RdfMCPD.GEOREFMETH);
columns.add(columnDef);
columnDef = new ColumnDef("ELEVATION", "Elevation of collecting site", ColumnDataType.DOUBLE, false, RdfMCPD.ELEVATION);
columns.add(columnDef);
columnDef = new ColumnDef("COLLDATE", "Collecting date of sample", ColumnDataType.TEXT, false, RdfMCPD.COLLDATE);
columns.add(columnDef);
columnDef = new ColumnDef("BREDCODE", "Breeding institute code", ColumnDataType.TEXT, false, RdfMCPD.BREDCODE);
columnDef.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(columnDef);
columnDef = new ColumnDef("SAMPSTAT", "Biological status of accession", ColumnDataType.TEXT, false, RdfMCPD.SAMPSTAT);
columns.add(columnDef);
columnDef = new ColumnDef("ANCEST", "Ancestral data", ColumnDataType.TEXT, false, RdfMCPD.ANCEST);
columns.add(columnDef);
columnDef = new ColumnDef("COLLSRC", "Collecting/acquisition source", ColumnDataType.TEXT, false, RdfMCPD.COLLSRC);
columns.add(columnDef);
columnDef = new ColumnDef("DONORCODE", "Donor institute code", ColumnDataType.TEXT, false, RdfMCPD.DONORCODE);
columnDef.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(columnDef);
columnDef = new ColumnDef("DONORNAME", "Donor institute name", ColumnDataType.TEXT, false, RdfMCPD.DONORNAME);
columns.add(columnDef);
columnDef = new ColumnDef("DONORNUMB", "Donor accession number", ColumnDataType.TEXT, false, RdfMCPD.DONORNUMB);
columns.add(columnDef);
columnDef = new ColumnDef("OTHERNUMB", "Other identifiers associated with the accession", ColumnDataType.TEXT, false, RdfMCPD.OTHERNUMB);
columns.add(columnDef);
columnDef = new ColumnDef("DUPLSITE", "Location of safety duplicates", ColumnDataType.TEXT, false, RdfMCPD.DUPLSITE);
columnDef.getValidators().add(new FaoWiewsInstCodeValidator());
columns.add(columnDef);
columnDef = new ColumnDef("DUPLINSTNAME", "Institute maintaining safety duplicates", ColumnDataType.TEXT, false, RdfMCPD.DUPLINSTNAME);
columns.add(columnDef);
columnDef = new ColumnDef("STORAGE", "Type of germplasm storage", ColumnDataType.TEXT, false, RdfMCPD.STORAGE);
columns.add(columnDef);
columnDef = new ColumnDef("MLSSTAT", "MLS status of the accession", ColumnDataType.TEXT, false, RdfMCPD.MLSSTAT);
columns.add(columnDef);
columnDef = new ColumnDef("REMARKS", "Remarks", ColumnDataType.TEXT, false, RdfMCPD.REMARKS);
columns.add(columnDef);
this.columnDefs = Collections.unmodifiableList(columns);
}
......
......@@ -17,10 +17,45 @@
package org.genesys2.anno.predefined;
public class RdfMCPD {
//http://purl.org/germplasm/germplasmTerm#
public static final String INSTCODE = "http://purl/instCode";
public static final String ACCENUMB = "http://purl/acceNumb";
public static final String GENUS = "http://some.url";
public static final String SPECIES = "http://some.other.url";
public static final String ACCENUMB = "http://purl.org/germplasm/germplasmTerm#germplasmID";
public static final String GENUS = "http://rs.tdwg.org/dwc/terms/genus";
public static final String SPECIES = "http://rs.tdwg.org/dwc/terms/specificEpithet";
public static final String SPAUTHOR = "http://rs.tdwg.org/dwc/terms/infraspecificEpithetAuthorship";
public static final String SUBTAXA = "http://rs.tdwg.org/dwc/terms/infraspecificEpithet";
public static final String SUBTAUTHOR = "http://rs.tdwg.org/dwc/terms/scientificNameAuthorship";
public static final String CROPNAME = "http://rs.tdwg.org/dwc/terms/vernacularName";
public static final String ACCENAME = "http://purl.org/germplasm/germplasmTerm#germplasmIdentifier";
public static final String ACQDATE = "http://purl.org/germplasm/germplasmTerm#acquisitionDate";
public static final String ORIGCTY = "http://rs.tdwg.org/dwc/terms/country";
public static final String COLLCODE = "http://purl.org/germplasm/germplasmTerm#collectingInstituteID";
// made up
public static final String COLLNUMB = "http://purl.org/germplasm/germplasmTerm#collectingNumber";
public static final String COLLNAME = "http://purl.org/germplasm/germplasmTerm#collectingInstitute";
public static final String COLLINSTADDRESS = "http://purl.org/germplasm/germplasmTerm#collectingInstituteAddress";
public static final String COLLMISSID = "http://purl.org/germplasm/germplasmTerm#collectingMissionID";
public static final String COLLDATE = "http://purl.org/germplasm/germplasmTerm#collectingDate";
public static final String GEOREFMETH = "http://purl.org/germplasm/germplasmTerm#georeferencingMethod";
// -- end made up
public static final String COLLSITE = "http://rs.tdwg.org/dwc/terms/verbatimLocality";
public static final String DECLATITUDE = "http://rs.tdwg.org/dwc/terms/decimalLatitude";
public static final String DECLONGITUDE = "http://rs.tdwg.org/dwc/terms/decimalLongitude";
public static final String COORDUNCERT = "http://rs.tdwg.org/dwc/terms/coordinateUncertaintyInMeters";
public static final String COORDDATUM = "http://rs.tdwg.org/dwc/terms/geodeticDatum";
public static final String ELEVATION = "http://www.w3.org/2003/01/geo/wgs84_pos#alt";
public static final String BREDCODE = "http://purl.org/germplasm/germplasmTerm#breedingInstituteID";
public static final String SAMPSTAT = "http://purl.org/germplasm/germplasmTerm#biologicalStatus";
public static final String ANCEST = "http://purl.org/germplasm/germplasmTerm#ancestralData";
public static final String COLLSRC = "http://purl.org/germplasm/germplasmTerm#acquisitionSource";
public static final String DONORCODE = "http://purl.org/germplasm/germplasmTerm#donorInstituteID";
public static final String DONORNAME = "http://purl.org/germplasm/germplasmTerm#donorInstitute";
public static final String DONORNUMB = "http://purl.org/germplasm/germplasmTerm#donorsIdentifier";
public static final String OTHERNUMB = "http://rs.tdwg.org/dwc/terms/otherCatalogNumbers";
public static final String DUPLSITE = "http://purl.org/germplasm/germplasmTerm#safetyDuplicationInstituteID";
public static final String DUPLINSTNAME = "http://purl.org/germplasm/germplasmTerm#safetyDuplicationInstitute";
public static final String STORAGE = "http://purl.org/germplasm/germplasmType#storageCondition";
public static final String MLSSTAT = "http://purl.org/germplasm/germplasmTerm#mlsStatus";
public static final String REMARKS = "http://rs.tdwg.org/dwc/terms/occurrenceRemarks";
}
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