-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'moellerth/issue3304-ddi-codebook' into dev-2024-2-2
- Loading branch information
Showing
22 changed files
with
716 additions
and
4 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
26 changes: 26 additions & 0 deletions
26
.../java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/Catgry.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,26 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI catgry element. | ||
*/ | ||
@AllArgsConstructor | ||
public class Catgry { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public Catgry() {} | ||
|
||
@XmlElement(name = "catValu") | ||
String catValu; | ||
|
||
@XmlElement(name = "labl") | ||
List<TextElement> labl; | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...ava/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/Citation.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,21 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI citation element. | ||
*/ | ||
@AllArgsConstructor | ||
public class Citation { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public Citation() {} | ||
|
||
@XmlElement(name = "titlStmt") | ||
TitlStmt titlStmt; | ||
|
||
} |
41 changes: 41 additions & 0 deletions
41
...ava/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/CodeBook.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,41 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
/** | ||
* Class representing the root element codebook of the mapping of the DDI Codebook standard. | ||
*/ | ||
|
||
@XmlRootElement(name = "codeBook") | ||
public class CodeBook { | ||
|
||
/** | ||
* Constructor for codebook. | ||
* @param stdyDscr the data package description in form of the DDI stdyDscr element. | ||
* @param fileDscr the dataset metadata in form of the DDI fileDscr element. | ||
* @param dataDscr the variable metadata in form of the DDI dataDscr element. | ||
*/ | ||
public CodeBook(StdyDscr stdyDscr, List<FileDscr> fileDscr, DataDscr dataDscr) { | ||
this.stdyDscr = stdyDscr; | ||
this.fileDscr = fileDscr; | ||
this.dataDscr = dataDscr; | ||
} | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public CodeBook() {} | ||
|
||
@XmlElement(name = "stdyDscr") | ||
private StdyDscr stdyDscr; | ||
|
||
@XmlElement(name = "fileDscr") | ||
private List<FileDscr> fileDscr; | ||
|
||
@XmlElement(name = "dataDscr") | ||
private DataDscr dataDscr; | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
...ava/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/DataDscr.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,23 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI dataDscr element. | ||
*/ | ||
@AllArgsConstructor | ||
public class DataDscr { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public DataDscr() {} | ||
|
||
@XmlElement(name = "var") | ||
List<Var> var; | ||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...ava/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/FileDscr.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,21 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI Codebook fileDscr element. | ||
*/ | ||
@AllArgsConstructor | ||
public class FileDscr { | ||
|
||
public FileDscr() {} | ||
|
||
@XmlAttribute(name = "ID") | ||
String id; | ||
|
||
@XmlElement(name = "fileTxt") | ||
FileTxt fileTxt; | ||
} |
24 changes: 24 additions & 0 deletions
24
...java/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/FileTxt.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,24 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI fileTxt element. | ||
*/ | ||
@AllArgsConstructor | ||
public class FileTxt { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public FileTxt() {} | ||
|
||
@XmlElement(name = "fileName") | ||
String fileName; | ||
|
||
@XmlElement(name = "fileCont") | ||
TextElement fileCont; | ||
|
||
} |
22 changes: 22 additions & 0 deletions
22
...eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/LanguageEnum.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,22 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
/** | ||
* Enum representing available language abbreviations. | ||
*/ | ||
public enum LanguageEnum { | ||
de("de"), en("en"); | ||
|
||
/** | ||
* The language string. | ||
*/ | ||
public final String languageString; | ||
|
||
/** | ||
* Construct the enum. | ||
* | ||
* @param languageString The language string. | ||
*/ | ||
LanguageEnum(String languageString) { | ||
this.languageString = languageString; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
...ava/eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/StdyDscr.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,21 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import javax.xml.bind.annotation.XmlElement; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* Class representing the DDI stdyDscr element. | ||
*/ | ||
@AllArgsConstructor | ||
public class StdyDscr { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public StdyDscr() {} | ||
|
||
@XmlElement(name = "citation") | ||
Citation citation; | ||
|
||
} |
37 changes: 37 additions & 0 deletions
37
.../eu/dzhw/fdz/metadatamanagement/datapackagemanagement/domain/ddicodebook/TextElement.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,37 @@ | ||
package eu.dzhw.fdz.metadatamanagement.datapackagemanagement.domain.ddicodebook; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
import javax.xml.bind.annotation.XmlValue; | ||
|
||
import lombok.AllArgsConstructor; | ||
|
||
/** | ||
* General element for a language annotated XML element containing a string, | ||
* e.g. labels (labl in DDI standard). | ||
*/ | ||
@AllArgsConstructor | ||
@XmlAccessorType(XmlAccessType.NONE) | ||
public class TextElement { | ||
|
||
/** | ||
* Constructor needed by JAXB. | ||
*/ | ||
public TextElement() {} | ||
|
||
@XmlAttribute(name = "xml:lang") | ||
private LanguageEnum lang; | ||
|
||
@XmlValue | ||
private String value; | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
} |
Oops, something went wrong.