I apologize for failing to follow William's instructions for a single
thread per question.

I was more questioning the semantic meaning of Document vs.
ContextualCollection rather than advocating a specific answer - whatever
the meaning is, it should be documented.

I agree with William's understanding: "A "ContextualCollection" implies
that the elements in it have shared context, for example, the files in a
package, or the contents of a bill of materials.", with the understanding
that the "shared context" is defined by the collection and is thus shared
by each Element in the collection.

The creation aspect is not part of my definition, it is a derived
requirement.  If File Element X is known to be part of Package Element Y,
that knowledge only becomes knowledge as a result of creating
ContextualCollection Element Z.  Other creators may have created their own
File Elements describing the same File data, but those Elements cannot
contain the "shared context" of Element Z because they were created before
that context existed.  The ability to hash an Element for integrity means
that any Element, once created, is immutable and cannot change as a result
of any knowledge/context defined later.

I hope that makes sense.

As for the meaning of Document, I mistakenly assumed that an SPDXv2
Document did in fact create some shared context (such as files being part
of packages).  If that's not true, then I suppose Document is an acceptable
name for a collection of elements that have no relationships or anything
else in common.  The timestamp comes into play here too - if File Elements
A, B, and C are already defined by one or more creators, their hashes exist
and cannot change.  A Document can contain exact copies of those elements
that can be validated, but those Elements could also be validated before
the Document ever existed.

v/r,
Dave



On Wed, Sep 22, 2021 at 4:24 PM William Bartholomew via lists.spdx.org
<[email protected]> wrote:

> David's definition didn't (at least at the surface) match my
> understanding. My understanding is that "Document" is a collection of
> elements with no presumption of shared context, it's just a transport
> mechanism. A "ContextualCollection" implies that the elements in it have
> shared context, for example, the files in a package, or the contents of a
> bill of materials.
>
> "Document" wasn't the preferred term from 3T-SBOM members, but as part of
> combining efforts it was deemed an acceptable name given SPDX's past usage
> of it. In SPDX 2.2 documents don't require any shared context for elements
> in the document, there may be assumed shared context but it's not a
> requirement of the specification.
>
> On Wed, Sep 22, 2021 at 1:03 PM Nisha Kumar <[email protected]> wrote:
>
>> This discussion thread is for Question 1 of the list of questions William
>> started:
>> * Adding an abstract Collection class as the superclass of Document and
>> ContextualCollection simplified the model, are we comfortable keeping that?
>>
>> As I understand it, a "collection" is a set of unrelated elements and a
>> "ContextualCollection" is a set of related elements. But it looks like
>> David had a different understanding:
>> * Contextual is a set of related elements - the collection is created as
>> a unit and elements contained in the collection are always part of the
>> collection even when referenced by individual IRI. The collection Element
>> and its contained Elements are created at the same instant by the same
>> creator, regardless of whether any creation properties are serialized in
>> the Elements.
>> * Non-contextual is a collection that does not define any Elements. The
>> Elements were created before the collection, are copied into the
>> collection, and are unchanged whether the collection exists or not.
>>
>> From the above definition it seems to me that the difference between
>> "contextual" and "not contextual" has to do with the timestamp of the
>> collection. Did I understand this correctly?
>>
>> If yes, the concept sounds a lot like an instance of an object vs a
>> collection of (still related) objects a la OOP.
>>
>> I'm personally for including both concepts of "instant collection" and
>> "assembled collection" as long as the concepts are clearly defined, as
>> David mentioned here: https://lists.spdx.org/g/Spdx-tech/message/4201
>>
>>
>


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#4204): https://lists.spdx.org/g/Spdx-tech/message/4204
Mute This Topic: https://lists.spdx.org/mt/85799075/21656
Group Owner: [email protected]
Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to