Skip to content

Commit

Permalink
Merge pull request #24 from cookeac/master
Browse files Browse the repository at this point in the history
Inheritance changes - icarEventCoreResource, icarIdentifierType
  • Loading branch information
alamers authored Jun 21, 2019
2 parents 6db8e7a + 4f78e66 commit 39a53db
Show file tree
Hide file tree
Showing 7 changed files with 136 additions and 155 deletions.
37 changes: 0 additions & 37 deletions Release Candidate Messages/ICARMilkSample.json

This file was deleted.

34 changes: 0 additions & 34 deletions Release Candidate Messages/JoinDataMilkSample.json

This file was deleted.

16 changes: 2 additions & 14 deletions Release Candidate Messages/icarAnimalIdentifierType.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
{
"required": [
"id",
"scheme"
],
"type": "object",
"properties": {
"id": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarAnimalIdType.json"
},
"scheme": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarAnimalIdSchemeCode.json"
}
},
"description": "Identifies an animal"
"$ref": "icarIdentifierType.json",
"description": "Identifies an animal using a scheme and ID."
}
32 changes: 32 additions & 0 deletions Release Candidate Messages/icarEventCoreResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",

"required": [
"id",
"animal",
"eventDateTime"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier in the system for this event."
},
"animal": {
"$ref": "icarAnimalIdentifierType.json",
"description": "Unique animal scheme and identifier combination."
},
"eventDateTime": {
"$ref": "icarDateTimeType.json",
"description": "ISO8601 date and time."
},
"location": {
"$ref": "icarLocationIdentifierType.json",
"description": "Unique location scheme and identifier combination."
},
"meta": {
"$ref": "icarMetaDataResource.json",
"description": "Optional meta-data for the event."
}
}
}
22 changes: 22 additions & 0 deletions Release Candidate Messages/icarIdentifierType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",

"required": [
"id",
"scheme"
],

"type": "object",

"properties": {
"id": {
"type": "string",
"description": "A unique identification for the resource issued under the auspices of the scheme."
},
"scheme": {
"type": "string",
"description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers."
}
},
"description": "Identifies a resource."
}
6 changes: 6 additions & 0 deletions Release Candidate Messages/icarLocationIdentifierType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",

"$ref": "icarIdentifierType.json",
"description": "Location identifier based on a scheme and ID."
}
144 changes: 74 additions & 70 deletions Release Candidate Messages/icarMilkingVisitResource.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,77 @@
{
"required": [
"id",
"animal",
"milkingStartingDateTime",
"milkingMilkWeight"
],
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for this location for the milking visit message"
},
"animal": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarAnimalIdentifierType.json"
},
"milkingStartingDateTime": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarDateTimeType.json"
},
"milkingDuration": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkDurationType.json"
},
"milkingVisitDuration": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkDurationType.json"
},
"milkingType": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingTypeCode.json"
},
"milkingMilkWeight": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingMilkWeightType.json"
},
"milkingSuccess": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingSuccessType.json"
},
"milkingExceptionCode": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingExceptionCode.json"
},
"milkingParlourUnit": {
"type": "string",
"description": "The milking parlour unit where the milking took place."
},
"milkingBoxNumber": {
"type": "string",
"description": "The milking box number where the milking took place."
},
"milkingDeviceId": {
"type": "string",
"description": "The ID of the device where the milking took place"
},
"measureDeviceId": {
"type": "string",
"description": "The ID of the device where the measurement of the milking took place"
},
"quarterMilkings": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarQuarterMilkingType.json"
}
},
"animalMilkingSample": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarAnimalMilkingSampleType.json"
}
},
"icarMilkCharacteristicsTypes": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkCharacteristicsType.json"
}
{
"$schema": "http://json-schema.org/draft-07/schema#",

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

"type": "object",

"allOf": [
{
"$ref": "icarEventCoreResource.json"
},
{
"properties": {
"milkingStartingDateTime": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarDateTimeType.json"
},
"milkingDuration": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkDurationType.json"
},
"milkingVisitDuration": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkDurationType.json"
},
"milkingType": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingTypeCode.json"
},
"milkingMilkWeight": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingMilkWeightType.json"
},
"milkingSuccess": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingSuccessType.json"
},
"milkingExceptionCode": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkingExceptionCode.json"
},
"milkingParlourUnit": {
"type": "string",
"description": "The milking parlour unit where the milking took place."
},
"milkingBoxNumber": {
"type": "string",
"description": "The milking box number where the milking took place."
},
"milkingDeviceId": {
"type": "string",
"description": "The ID of the device where the milking took place"
},
"measureDeviceId": {
"type": "string",
"description": "The ID of the device where the measurement of the milking took place"
},
"quarterMilkings": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarQuarterMilkingType.json"
}
},
"animalMilkingSample": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarAnimalMilkingSampleType.json"
}
},
"icarMilkCharacteristicsTypes": {
"type": "array",
"items": {
"$ref": "https://raw.githubusercontent.com/adewg/ICAR/master/Release%20Candidate%20Messages/icarMilkCharacteristicsType.json"
}
}
}
}
]
}

0 comments on commit 39a53db

Please sign in to comment.