Skip to content

Commit

Permalink
#3304 added real values to DDI export
Browse files Browse the repository at this point in the history
  • Loading branch information
moellerth committed Sep 18, 2024
1 parent 428e589 commit f3eff2e
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.AllArgsConstructor;

Expand All @@ -12,6 +13,7 @@ public class Catgry {
String catValu;

@JacksonXmlProperty(localName = "labl")
@JacksonXmlElementWrapper(useWrapping = false)
List<TextElement> labl;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,43 @@

import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;

/**
* Record defining the mapping of the DDI Codebook standard.
* Defines the mapping of the DDI Codebook standard.
*/
@AllArgsConstructor
@JacksonXmlRootElement(namespace = "ddi:codebook:2_5", localName = "codeBook")
@Getter
@Setter
@JacksonXmlRootElement(localName = "codeBook", namespace = "ddi:codebook:2_5")
public class CodeBook {

public CodeBook(StdyDscr stdyDscr, List<FileDscr> fileDscr, DataDscr dataDscr) {
this.stdyDscr = stdyDscr;
this.fileDscr = fileDscr;
this.dataDscr = dataDscr;
}

// @JacksonXmlProperty(localName = "xmlns", isAttribute = true)
// private String nameSpace = "ddi:codebook:2_5";

// @JacksonXmlProperty(localName = "xmlns:xsi", isAttribute = true)
// private String xsi = "http://www.w3.org/2001/XMLSchema-instance";
//
// @JacksonXmlProperty(localName = "xmlns:xs", isAttribute = true)
// private String xs = "http://www.w3.org/2001/XMLSchema";
//
// @JacksonXmlProperty(localName = "xsi:schemaLocation", isAttribute = true)
// private String schemaLocation = "http://www.ddialliance.org/Specification/DDI-Codebook/2.5/XMLSchema/codebook.xsd";

@JacksonXmlProperty(localName = "stdyDscr")
private StdyDscr stdyDscr;

@JacksonXmlProperty(localName = "fileDscr")
@JacksonXmlElementWrapper(useWrapping = false)
private List<FileDscr> fileDscr;

@JacksonXmlProperty(localName = "dataDscr")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@

import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public class DataDscr {

@JacksonXmlProperty(localName = "var")
@JacksonXmlElementWrapper(useWrapping = false)
List<Var> var;

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.List;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.AllArgsConstructor;

Expand All @@ -15,12 +16,15 @@ public class Var {
String files;

@JacksonXmlProperty(localName = "labl")
@JacksonXmlElementWrapper(useWrapping = false)
List<TextElement> labl;

@JacksonXmlProperty(localName = "qstn")
@JacksonXmlElementWrapper(useWrapping = false)
List<TextElement> qstn;

@JacksonXmlProperty(localName = "catgry")
@JacksonXmlElementWrapper(useWrapping = false)
List<Catgry> catgry;

}
Loading

0 comments on commit f3eff2e

Please sign in to comment.