Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to harmonize definitions of PremisesAffected and LinkedPremises #59

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions proposals/2018/Harmonize_PremisesAffected_and_LinkedPremises.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Harmonize Definitions of `PremisesAffected` and `LinkedPremises` Elements

## Overview

The BuildingSync XML (BSXML) schema provides more than one way to relate a concept to other elements, including `Site`, `Facility` and `Subsection` elements: the `PremisesAffected` and `LinkedPremises` elements.

The duplication of functionality is confusing for end-users and downstream software developers.

## Justification

An example of the usage of the `PremisesAffected` element (within the context of a `Measure` element) is:

```xml
<Measure>
<!-- ... before ... -->
<PremisesAffected>
<PremiseAffected IDref="Site1">
<MeasureCoverage>10</MeasureCoverage>
</PremiseAffected>
<PremiseAffected IDref="Facility1">
<MeasureCoverage>20</MeasureCoverage>
</PremiseAffected>
<PremiseAffected IDref="Subsection1">
<MeasureCoverage>40</MeasureCoverage>
</PremiseAffected>
</PremisesAffected>
<!-- ... after ... -->
</Measure>
```

A corresponding example of the usage of the `LinkedPremises` element is:

```xml
<LinkedPremises>
<Site>
<LinkedSiteID IDref="Site1"/>
</Site>
<Facility>
<LinkedFacilityID IDref="Facility1"/>
</Facility>
<Subsection>
<LinkedSubsectionID IDref="Subsection1"/>
</Subsection>
</LinkedPremises>
```

Note that:

* The `PremisesAffected` element is a child of the `Measure` element. Within each `PremiseAffected` element, there may be a child `MeasureCoverage` element.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you suggest moving MeasureCoverage to another level, or adding MeasureCoverage to LinkedPremises?

Copy link
Contributor

@jasondegraw jasondegraw Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this context, adding a MeasureCoverage element is redundant. We can edit the documentation of the LinkedPremises so that it is no longer so system-centric, which should be enough to use the element without structural additions.

* Unlike the `LinkedPremises` element and its child elements, the `PremiseAffected` element does not indicate the type of the referenced element (the target of the `IDref` attribute).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a big issue.


## Implementation

This proposal is to harmonize the definition of the `PremisesAffected` element with that of the `LinkedPremises` element. For example:

```xml
<Measure>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nice. I like that we can reuse LinkedPremises and remove the Premise word which is a made up word for this context.

Tagging @jasondegraw

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nllong It makes the most sense to me to just reuse LinkedPremises without modification and remove the PremisesAffected element entirely.

<!-- ... before ... -->
<LinkedPremises>
<Site>
<LinkedSiteID IDref="Site1">
<MeasureCoverage>10</MeasureCoverage>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer that we use the currently implemented floor area element instead of adding an additional element here.

</LinkedSiteID>
</Site>
<Facility>
<LinkedFacilityID IDref="Facility1">
<MeasureCoverage>20</MeasureCoverage>
</LinkedFacilityID>
</Facility>
<Subsection>
<LinkedSubsectionID IDref="Subsection1">
<MeasureCoverage>40</MeasureCoverage>
</LinkedSubsectionID>
</Subsection>
</LinkedPremises>
<!-- ... after ... -->
</Measure>
```

Note that:
* Using XSD, the `LinkedPremises` element can be defined as a child element of the `Measure` element (with optional `MeasureCoverage` elements).
* The `LinkedPremises` structure indicates the type of the referenced element.

## References

n/a