-
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.
AER-2827 animal housing domain, validation and emission calculation (#…
…261) * Deprecated existing farm lodging domain classes These are to be replaced by the farm animal housing classes that will be introduced. * Domain objects for farm animal housing Including json roundtrip with (I think) all of the aspects covered. * Implemented emission calculator and validator for animal housing Also added the necessary methods in EmissionSourceVisitor and such, with a default implementation, so we can go ahead with working on this without having to adjust something in the main branch for calculator.
- Loading branch information
1 parent
5239058
commit 16f2d56
Showing
39 changed files
with
2,011 additions
and
12 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
47 changes: 47 additions & 0 deletions
47
...main/java/nl/overheid/aerius/shared/domain/v2/source/FarmAnimalHousingEmissionSource.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,47 @@ | ||
/* | ||
* Copyright the State of the Netherlands | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see http://www.gnu.org/licenses/. | ||
*/ | ||
package nl.overheid.aerius.shared.domain.v2.source; | ||
|
||
import java.time.LocalDate; | ||
|
||
import nl.overheid.aerius.shared.domain.v2.geojson.IsFeature; | ||
import nl.overheid.aerius.shared.domain.v2.source.farm.FarmAnimalHousing; | ||
import nl.overheid.aerius.shared.exception.AeriusException; | ||
|
||
/** | ||
* Emission source for farm animal housing. | ||
*/ | ||
public class FarmAnimalHousingEmissionSource extends EmissionSourceWithSubSources<FarmAnimalHousing> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
private LocalDate established; | ||
|
||
public LocalDate getEstablished() { | ||
return established; | ||
} | ||
|
||
public void setEstablished(final LocalDate established) { | ||
this.established = established; | ||
} | ||
|
||
@Override | ||
<T> T accept(final EmissionSourceVisitor<T> visitor, final IsFeature feature) throws AeriusException { | ||
return visitor.visit(this, feature); | ||
} | ||
|
||
} |
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
Oops, something went wrong.