Skip to content

Commit

Permalink
Merge pull request #224 from Breeding-Insight/feature/BI-2208
Browse files Browse the repository at this point in the history
BI-2208 - Create Factory for making instances of Deltabreed entitties
  • Loading branch information
mlm483 authored Jul 17, 2024
2 parents 5ddffdd + aac6c7c commit aa3f43b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.brapi.v2.model.germ;

import java.util.Objects;

public class BrAPIGermplasmStorageTypes {
private BrAPIGermplasmStorageTypesEnum code;
private String description;
Expand All @@ -25,4 +27,29 @@ public String getDescription() {
return description;
}

public boolean equals(Object o) {
if (this == o) {
return true;
} else if (o != null && this.getClass() == o.getClass()) {
BrAPIGermplasmStorageTypes germplasmStorageType = (BrAPIGermplasmStorageTypes)o;
return Objects.equals(this.code, germplasmStorageType.code) && Objects.equals(this.description, germplasmStorageType.description);
} else {
return false;
}
}

public int hashCode() {
return Objects.hash(this.code, this.description);
}

public String toString() {
return "class BrAPIGermplasmStorageTypes {\n" +
" code: " + this.toIndentedString(this.code) + "\n" +
" description: " + this.toIndentedString(this.description) + "\n" +
"}";
}

private String toIndentedString(Object o) {
return o == null ? "null" : o.toString().replace("\n", "\n ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,21 @@ public void setExternalReferences(List<BrAPIExternalReference> externalReference
this.externalReferences = externalReferences;
}

public BrAPIObservation geoCoordinates(BrApiGeoJSON geoCoordinates) {
this.geoCoordinates = geoCoordinates;
return this;
}

/**
* Get geoJson
* @return geoJson
*/
public BrApiGeoJSON getGeoCoordinates() { return geoCoordinates; }

public void setGeoCoordinates(BrApiGeoJSON geoCoordinates) {
this.geoCoordinates = geoCoordinates;
}

public BrAPIObservation germplasmDbId(String germplasmDbId) {
this.germplasmDbId = germplasmDbId;
return this;
Expand Down

0 comments on commit aa3f43b

Please sign in to comment.