Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
wow-such-code committed Sep 24, 2019
2 parents 82b7da7 + aca842d commit fc33b4a
Show file tree
Hide file tree
Showing 10 changed files with 609 additions and 17 deletions.
63 changes: 53 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>life.qbic</groupId>
<artifactId>parent-pom</artifactId>
<version>1.3.0</version>
<version>1.5.0</version>
</parent>
<groupId>life.qbic</groupId>
<artifactId>data-model-lib</artifactId>
<packaging>jar</packaging>
<version>1.4.0</version>
<version>1.5.0</version>
<name>Data Model Library</name>
<url>http://github.com/qbicsoftware/data-model-lib</url>
<description>A collection of QBiC data models.</description>
Expand Down Expand Up @@ -49,30 +47,75 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>life.qbic</groupId>
<artifactId>xml-manager-lib</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>2.5.7</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.9.9</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version><!-- 3.6.2 is the minimum -->
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<compilerArguments>
<indy /><!-- optional; supported by batch 2.4.12-04+ -->
<configScript>config.groovy</configScript><!-- optional; supported
by batch 2.4.13-02+ -->
</compilerArguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>3.3.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.5.6-01</version>
</dependency>
</dependencies>
</plugin>
<!--plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version> <executions> <execution> <goals> <goal>set-system-properties</goal>
</goals> <configuration> <properties> <property> <name>groovy.target.directory</name>
<value>${project.build.directory}/classes</value> </property> <property>
<name>groovy.parameters</name> <value>true</value> </property> </properties>
</configuration> </execution> </executions> </plugin -->
</plugins>
</build>
</project>
133 changes: 133 additions & 0 deletions src/main/groovy/life/qbic/datamodel/services/Address.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
package life.qbic.datamodel.services

import com.fasterxml.jackson.annotation.JsonProperty

class Address {

private String affiliation
private String street
private Integer zipCode
private String country

/**
* Get affiliation
* @return affiliation
**/
@JsonProperty("affiliation")
public String getAffiliation() {
return affiliation;
}

public void setAffiliation(String affiliation) {
this.affiliation = affiliation;
}

public Address affiliation(String affiliation) {
this.affiliation = affiliation;
return this;
}

/**
* Get street
* @return street
**/
@JsonProperty("street")
public String getStreet() {
return street;
}

public void setStreet(String street) {
this.street = street;
}

public Address street(String street) {
this.street = street;
return this;
}
//
// /**
// * Get number
// * @return number
// **/
// @JsonProperty("number")
// public Integer getNumber() {
// return number;
// }
//
// public void setNumber(Integer number) {
// this.number = number;
// }
//
// public Address number(Integer number) {
// this.number = number;
// return this;
// }

/**
* Get zipCode
* @return zipCode
**/
@JsonProperty("zip_code")
public Integer getZipCode() {
return zipCode;
}

public void setZipCode(Integer zipCode) {
this.zipCode = zipCode;
}

public Address zipCode(Integer zipCode) {
this.zipCode = zipCode;
return this;
}

/**
* Get country
* @return country
**/
@JsonProperty("country")
public String getCountry() {
return country;
}

public void setCountry(String country) {
this.country = country;
}

public Address country(String country) {
this.country = country;
return this;
}

@Override
public boolean equals(Object a) {
Address ad = (Address) a
return ad.affiliation.equals(this.affiliation) && ad.country.equals(this.country) && ad.street.equals(this.street) && ad.zipCode == this.zipCode
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Address {\n");

sb.append(" affiliation: ").append(toIndentedString(affiliation)).append("\n");
sb.append(" street: ").append(toIndentedString(street)).append("\n");
// sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" zipCode: ").append(toIndentedString(zipCode)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

91 changes: 91 additions & 0 deletions src/main/groovy/life/qbic/datamodel/services/Contact.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
package life.qbic.datamodel.services;

import javax.validation.Valid;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Contact {

private String fullName = null;

@Valid
private Address address = null;

private String email = null;
/**
* Get fullName
* @return fullName
**/
@JsonProperty("full_name")
public String getFullName() {
return fullName;
}

public void setFullName(String fullName) {
this.fullName = fullName;
}

public Contact fullName(String fullName) {
this.fullName = fullName;
return this;
}

/**
* Get address
* @return address
**/
@JsonProperty("address")
public Address getAddress() {
return address;
}

public void setAddress(Address address) {
this.address = address;
}

public Contact address(Address address) {
this.address = address;
return this;
}

/**
* Get email
* @return email
**/
@JsonProperty("email")
public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public Contact email(String email) {
this.email = email;
return this;
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Contact {\n");
sb.append(" full_name: ").append(toIndentedString(fullName)).append("\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private static String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

Loading

0 comments on commit fc33b4a

Please sign in to comment.