Skip to content

Commit

Permalink
Merge pull request #176 from erwinspeybroeck/Develop
Browse files Browse the repository at this point in the history
Feed API's first version. There were review remarks from Anton and Thomas.
I think  I worked through all the review comments.

To do = mandatory fields still have to be marked
To do = list of feed categories in the location.md file needs to be completed
  • Loading branch information
erwinspeybroeck authored Dec 16, 2020
2 parents 37355e5 + aa5d61b commit e84a7c4
Show file tree
Hide file tree
Showing 29 changed files with 864 additions and 1 deletion.
21 changes: 21 additions & 0 deletions collections/icarDailyFeedReportCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of daily feed reports. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarDailyFeedReportResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case daily feed reports."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarFeedCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of feeds. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarFeedResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case feeds."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarFeedIntakeEventCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of feed intakes. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarFeedIntakeEventResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case feed intakes."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarFeedRecommendationCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of feed recommendations. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarFeedRecommendationResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case feed recommendations."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarFeedReportCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of feed reports. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarFeedReportResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case feed reports."
}
}
}
]
}
21 changes: 21 additions & 0 deletions collections/icarRationCollection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"description": "Represents a collection of rations. Based on icarResourceCollection to provide paging etc.",

"allOf": [{
"$ref": "../collections/icarResourceCollection.json"
},
{
"type": "object",

"properties": {
"member": {
"type": "array",
"items": {
"$ref": "../resources/icarRationResource.json"
},
"description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case rations."
}
}
}
]
}
12 changes: 12 additions & 0 deletions enums/icarFeedCategoryType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"description": "Enumeration for feed categories. Each category can have more detail in a type specification.",

"type": "string",

"enum": [
"Concentrate",
"Roughage",
"Additives",
"Other"
]
}
10 changes: 10 additions & 0 deletions enums/icarMethodType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"description": "Enumeration for the method with which a value was determined.",

"type": "string",

"enum": [
"Analyzed",
"Derived"
]
}
64 changes: 63 additions & 1 deletion location-scheme.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ These schemes point to a specific animal.
| id | name | example| region & issuing party | RegEx |
|---|---|---|---|---|
| eu.animalId | LOM | 276000312312345 | EU wide scheme with a country prefix, combining multiple national schemes. Is used by transponders. First 3 positions is country code , e.g. 276=DE, is numeric, 15 digits. | |
| nl-v1 (rename to eu-??) | animal life number |NL 6802 *5082* 9 | EU wide scheme with a countryprefix, but different than the one above? [RVO on levensnummers](http://www.rvo.nl/onderwerpen/agrarisch-ondernemen/dieren/dieren-registreren/runderen/oormerken-voor-runderen) | |
| eu.bovine | European animal life time number |NL 6802 *5082* 9 | EU wide scheme with a countryprefix, but different than the one above? [RVO on levensnummers](http://www.rvo.nl/onderwerpen/agrarisch-ondernemen/dieren/dieren-registreren/runderen/oormerken-voor-runderen) | |
| us.bovine | US animal life time number |US 123456789 | US herdbook number | |


## Legal entities / companies

Expand All @@ -66,6 +68,66 @@ These schemes point to a legal entity. One that can be authenticated and is auth
| nl.kvk | Chamber of commerce number (Kamer van Koophandel nummer) |64039641 | Used in the Netherlands. Issued by the 'Kamer van Koophandel', can be checked at e.g. [OpenKVK](www.openkvk.nl) | |
| be.kbo | Chamber of commerce number (Ondernemersnummer) | | Used in Belgium. Issued by the 'Kruispuntbank voor Ondernemingen', can be checked at e.g. [fgov](https://kbopub.economie.fgov.be/kbopub/zoeknummerform.html?lang=nl) | |

## Feed types

We recommend to use the org.fao scheme for identifying feed types.

FAO also has a list of "feed materials for ruminant species" (see http://www.fao.org/fileadmin/user_upload/gleam/docs/GLEAM_2.0_Model_description.pdf) table 3.2.
There are 30 items:

Category roughages (and cereals)
| Number | Material | Desciption |
|---|---|---|
| 1 | GRASSF | Any type of natural or cultivated fresh grass grazed or fed to the animals. |
| 2 | GRASSH | Hay (grass is cut, dried and stored) or silage (grass is cut and fermented) from any natural or cultivated grass. |
| 3 | GRASSH2 | Hay from adjacent areas. |
| 4 | GRASSLEGF | Fresh mixture of any type of grass and leguminous plants that is fed to the animals. |
| 5 | GRASSLEGH | Hay or silage produced from a mixture of any type of grass and leguminous plants. |
| 6 | ALFALFAH | Hay or silage from alfalfa (Medicago sativa). |
| 7 | GRAINSIL | Silage from whole barley (Hordeum vulgare), oat (Avena sativa), buckwheat (Fagopyrum esculentum) and fonio (Digitaria spp.) plants. |
| 8 | MAIZESIL | Silage from whole maize (Zea mays) plants. |
| 9 | RSTRAW | Fibrous residual plant material such as straw, brans, leaves, etc. from rice (Oryza spp.) cultivation. |
| 10 | WSTRAW | Fibrous residual plant material such as straw, brans, leaves, etc. from wheat (Triticum spp.) cultivation. |
| 11 | BSTRAW | Fibrous residual plant material such as straw, brans, leaves, etc. from barley (Hordeum vulgare), rye (Secale cereale) or oat (Avena sativa) cultivation. |
| 12 | ZSTOVER | Fibrous residual plant material such as straw, brans, leaves, etc. from maize (Zea mays) cultivation. |
| 13 | MSTOVER | Fibrous residual plant material such as straw, brans, leaves, etc. from millet (Pennisetum glaucum, Eleusine coracana, Panicum miliaceum, etc) cultivation. |
| 14 | SSTOVER | Fibrous residual plant material such as straw, brans, leaves, etc. from sorghum (Sorghum spp.) cultivation. |
| 15 | TOPS | Top portion of sugarcane (Saccharum spp.) plants, consisting of green leaves, bundle sheath and variable proportions of immature cane. |
| 16 | LEAVES | Leaves from natural, uncultivated vegetation found in trees, forest, lanes etc. |
| 17 | FDDRBEET | Fodder beet (Beta vulgaris), also known as mangel beet or field beet, used as animal feed. |
| 18 | GRAINS | Grains from barley (Hordeum vulgare), oat (Avena sativa), buckwheat (Fagopyrum esculentum) and fonio (Digitaria spp.). |
| 19 | CORN | Grains from maize (Zea mays) plant. |

Category others (by-products)
| Number | Material | Desciption |
|---|---|---|
| 20 | MLSOY | By-product from soy (Glycine max) oil production, commonly referred to as ‘soy cakes’ or ‘soybean meal’. |
| 21 | MLRAPE | By-product from rape (Brassica napus) oil production, commonly referred to as ‘rape cakes’ or ‘rapeseed meal’. |
| 22 | MLCTTN | By-product from cottonseed (Gossypium spp.) oil production, commonly referred to as ‘cottonseed meal’. |
| 23 | PKEXP | By-products from the production of kernel palm oil (Elaeis guineensis), commonly referred to as 'kernel cake'. |
| 24 | MZGLTM | By-product from maize processing. It is a protein-rich feed, with about 65% crude protein content. |
| 25 | MZGLTF | By-product from maize processing. Unlike the gluten meal, its protein content is lower, of about 25% crude protein content. |
| 26 | BPULP | Also known as ‘beet pulp’, is the remaining material after the juice extraction for sugar production from the sugar beet (Beta vulgaris). |
| 27 | MOLASSES | By-product from the sugarcane sugar extraction. |
| 28 | GRNBYDRY | ‘Dry’ by-products of grain industries such as brans, middlings, etc. |
| 29 | GRNBYWET | ‘Wet’ by-products of grain industries such as biofuels, distilleries, breweries, etc. |

Category concentrate
| Number | Material | Desciption |
|---|---|---|
| 30 | CONC | Concentrate feed from feed mills. |

## Feed properties

We recommend to use the org.icar scheme for identifying feed properties.

As ICAR we propose the following list of possible feed properties:

| Analysis | Material | Desciption | Units |
|---|---|---| ---|
| DM | Dry Matter | The part of food which would remain if all its water content was removed. | % (of feed) |
| CP | Crude protein | Crude protein is the amount of protein of animal feed | % (of DM) |
| CF | Crude fibre | crude fibre is the insoluble residue of an acid hydrolysis followed by an alkaline one. This residue contains true cellulose and insoluble lignin.| % (of DM) |

## Others

Expand Down
33 changes: 33 additions & 0 deletions resources/icarDailyFeedReportResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"description": "Reporting the feed consumed during a certain time period",

"allOf": [{
"$ref": "../resources/icarResource.json"
},
{
"type": "object",

"properties": {
"eventDate": {
"$ref": "../types/icarDateType.json",
"description": "date of the feeding"
},
"feedVisitDuration": {
"$ref": "../types/icarFeedDurationType.json"
},
"consumedFeed": {
"type": "array",
"items": {
"$ref": "../types/icarConsumedFeedType.json"
}
},
"consumedRation": {
"type": "array",
"items": {
"$ref": "../types/icarConsumedRationType.json"
}
}
}
}
]
}
40 changes: 40 additions & 0 deletions resources/icarFeedIntakeEventResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"description": "Event for recording a feed intake",

"allOf": [{
"$ref": "../resources/icarEventCoreResource.json"
},
{
"type": "object",

"required": [
"feedingStartingDateTime",
"feedVisitDuration"
],

"properties": {
"feedingStartingDateTime": {
"$ref": "../types/icarDateTimeType.json",
"description": "The moment the feeding started"
},
"feedVisitDuration": {
"$ref": "../types/icarFeedDurationType.json"
},
"consumedFeed": {
"type": "array",
"items": {
"$ref": "../types/icarConsumedFeedType.json"
}
},
"consumedRation": {
"$ref": "../types/icarConsumedRationType.json",
"description": "The eventual ration that has been consumed"
},
"device": {
"$ref": "../types/icarDeviceReferenceType.json",
"description": "Optional information about the device used for the feeding."
}
}
}
]
}
51 changes: 51 additions & 0 deletions resources/icarFeedRecommendationResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"description": "An overview of the recommended feeding of animals",

"allOf": [{
"$ref": "../resources/icarResource.json"
},
{
"type": "object",

"required": [
"id",
"animal"
],

"properties": {
"id": {
"$ref": "../types/icarFeedRecommendationIdType.json",
"description": "Unique identifier in the source system for this recommendation."
},
"animal": {
"$ref": "../types/icarAnimalIdentifierType.json",
"description": "Unique animal scheme and identifier combination."
},
"recommendationDateTime ": {
"$ref": "../types/icarDateTimeType.json",
"description": "The timestamp of the recommendation."
},
"startDateTime": {
"$ref": "../types/icarDateTimeType.json",
"description": "The date of the beginning of the recommendation."
},
"endDateTime": {
"$ref": "../types/icarDateTimeType.json",
"description": "The end date of the recommendation."
},
"recommendedFeed": {
"type": "array",
"items": {
"$ref": "../types/icarRecommendedFeedType.json"
}
},
"recommendedRation": {
"type": "array",
"items": {
"$ref": "../types/icarRecommendedRationType.json"
}
}
}
}
]
}
Loading

0 comments on commit e84a7c4

Please sign in to comment.