-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from usdot-jpo-ode/v3-relationship-object
Identify both sequential and hierarchical relationships between road events and other entities
- Loading branch information
Showing
7 changed files
with
78 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# relationships | ||
**optional** | ||
|
||
Identify both sequential and hierarchical relationships between road events and other entities. For example, a relationship can be used to link multiple road events to a common "parent", such as a project or phase, or identify a sequence of road events. | ||
|
||
Relationships show up on the feed as as a `relationship` property on the [road_events](https://github.com/usdot-jpo-ode/jpo-wzdx/blob/master/feed-content/data-tables/road_events.md) feature properties. | ||
|
||
## Relationships Table Structure | ||
Data Name | Data Type | Description | Conformance | Notes | ||
--- | --- | --- | --- | --- | ||
**relationship_id** | ID | Identifies the relationship record | Required | Primary key | ||
[road_event_id](/data-tables/road_events.md) | ID | Identifies the road event to which a relationship applies. | Required | Foreign key to [road_events](/feed-content/data-tables/road_events.md) table | ||
**first** | ID; Array | Indicates the first (can be multiple) road event in a sequence of road events by `road_event_id` | Optional | Every value provided should be an ID which relates to a road event by `road_event_id` | ||
**next** | ID; Array | Indicates the next (can be multiple) road event in a sequence by `road_event_id` | Optional | Every value provided should be an ID which relates to a road event by `road_event_id` | ||
**parents** | Text; Array | Indicates entities that the road event with this relationship is a part of, such as a work zone project or phase | Optional | Values can but do not have to correspond to a WZDx entity | ||
**children** | Text; Array | Indicates entities that are part of the road event with this relationship, such as a detour or piece of equipment | Optional | Values can but do not have to correspond to a WZDx entity | ||
|
||
## Notes | ||
- The format of `first`, `next`, `parents`, and `children` should be conducive to serializing into a JSON array for the feed ouput (e.g. "["parent1", "parent2"]") | ||
- The `first` and `next` fields are used to define sequential relationships | ||
- The `parents` and `children` fields define hierarchical relationships |
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