Closed VladimirAlexiev closed 11 months ago
Regarding bug 6, I've done some testing. It appears that the namespace mappings for epcis and cbv could indeed by declared once at top-level within the standard context resource for EPCIS/CBV 2.0 and that these would cascade throughout the rest of the context resource. Similarly, it appears that "@protected": true
and "@version": 1.1
only need to be declared at the root level. However I'd ask @jmcanterafonseca-iota to confirm this.
Regarding bug 8, I agree that the enumerated values for cbv:SDT could be moved into the nested context for type
within sourceList
and destinationList
. I re-read your concern about their leakage into custom fields / values, so we should fix this.
I agree that we still need to fix bug 9a.
Regarding bug 26a, we need to declare the mapping for cbvmda even if it expands to a URN
I'll try to work on these tomorrow morning.
to be honest, here, I am not in favour of changing anything at this stage that it is not a real and tangible bug, avoiding changes that are just a matter of taste or subjective. The presence of the declaration of @protected and cbv namespaces in all @context subresoruces is due to the fact they are declared in the individual contexts that are later merged, so I would keep them as they are.
On Tue, May 3, 2022 at 1:23 AM Mark Harrison @.***> wrote:
Regarding bug 6, I've done some testing. It appears that the namespace mappings for epcis and cbv could indeed by declared once at top-level within the standard context resource for EPCIS/CBV 2.0 and that these would cascade throughout the rest of the context resource. Similarly, it appears that @.": true and @.": 1.1 only need to be declared at the root level. However I'd ask @jmcanterafonseca-iota https://github.com/jmcanterafonseca-iota to confirm this.
Regarding bug 8, I agree that the enumerated values for cbv:SDT could be moved into the nested context for type within sourceList and destinationList. I re-read your concern about their leakage into custom fields / values, so we should fix this.
I agree that we still need to fix bug 9a.
Regarding bug 26a, we need to declare the mapping for cbvmda even if it expands to a URN
I'll try to work on these tomorrow morning.
— Reply to this email directly, view it on GitHub https://github.com/gs1/EPCIS/issues/307#issuecomment-1115461653, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQEZJLTE3ZH2CX67SCBDKHDVIBPV5ANCNFSM47FD4VMA . You are receiving this because you were mentioned.Message ID: @.***>
-- IOTA Foundation Pappelallee 78/79 10437 Berlin, Germany
Board of Directors: Dominik Schiener, Navin Ramachandran ID/Foundation No.: 3416/1234/2 (Foundation Register of Berlin)
Hi @jmcanterafonseca-iota , @VladimirAlexiev
At https://github.com/mgh128/EPCIS/tree/main/JSON-LD-Context and in the resulting compiled file at https://mgh128.github.io/EPCIS/epcis-context.jsonld I have attempted to remove the redundant declarations of mappings for cbv, epcis and gs1, as well as removing the apparently redundant repeated declarations of "@protected": true and "@version": 1.1 since these are already declared once in https://github.com/mgh128/EPCIS/blob/main/JSON-LD-Context/epcis-context-root.jsonld only and do appear to cascade to all nested contexts, at least from the testing I did using https://json-ld.org/playground/ when I attempted to redefine CURIE mappings for protected terms "cbv" or "epcis".
Looking at the current https://github.com/gs1/EPCIS/blob/master/epcis-context.jsonld I don't think it is leaking as noted in https://github.com/gs1/EPCIS/issues/307#issuecomment-1114245126 - it appears that for sourceList
, destinationList
and errorDeclaration
, the mappings for enumerated bare string values were already correctly nested. It might just be that my earlier preview did not do this correctly.
My version at https://mgh128.github.io/EPCIS/ also fixes bugs 9a and 26a
@jmcanterafonseca-iota - if you think this is a helpful improvement, I'm happy to make the corresponding changes in the GS1 GitHub repository for EPCIS.
@mgh128 happy to review a PR
Thanks @jmcanterafonseca-iota - here's https://github.com/gs1/EPCIS/pull/431/ for your review
@jmcanterafonseca-iota When can you approve #431 for merging? I don't have time to review it right now, but with the explanations of @mgh128 re what it fixes, I think we can close this (mega-)issue :-)
@jmcanterafonseca-iota I'll report here bugs caused by PR #275 (new JSONLD context) that was accepted yesterday. I hope you can fix them very quickly: this is higher prio than completing the JSON schema task because it blocks downstream tasks (Turtle and Diagrams). cc @CraigRe @mgh128 @mkotoff
Please test your changes:
Turtle/README.md
describes how to installjsonld
andriot
.Bug 1 (fixed)
Tried "make", got error on the first file:
Tried just the first step:
Noticed the result first has triples but then QUADS. EPCIS JSON doesn't use any named graphs, so where did this came from?
We have
epcis:eventList _:b2
, so we should have_:b2 rdf:type epcis:ObjectEvent
. Instead, the subject is a new blank node_:b3
whereas_:b2
is relegated to the named graph position (blank-node named graph).Bug2 (fixed)
Example_9.6.4-TransformationEvent.ttl has
This results in a blank node with a wrong property and wrong value:
That should be resolved to the node's URI (not separate property, and URI not string):
Change this in the context
To this:
Bug 3 (canceled)
"isA":"EPCISMasterDataDocument"
is resolved to a relative URL:The reason is that
@vocab
was removed, so the context now has only"isA": "@type"
.One way to resolve is to add a term shortcut as exists for event types:
But this also applies to other nodes that are allowed to have
isA
:VocabularyElement
Vocabulary
EPCISDocument
epcis:SensorElement
(I think this should be changed toSensorElement
in the example)Address
(Example_9.8.1-MasterData-complying-with-schema.jsonld): this is ok because there's a nested context with@vocab
:9-Dec-2021: MasterData now is not transmitted in JSON, canceled
Bug 4 (fixed)
Move out
EPCIS-JSON-Schema.json, EPCIS-JSON-Schema-single-event.json
fromJSON
toJSON-Schema
(I guess that's done in the PR that's still pending)Bug 5 (fixed)
Wrong prop names. All prop names start with lowercase:
Bug 5a (fixed)
The terms
sensorReport, sensorMetadata
are defined twice, both cases carrying nested context: once insensorElementList
and secondly at a higher level.Don't know whether this will work, but it's certainly confusing (I think prev bug is caused by this confusion). Merge the two definitions.
Bug 5b (fixed)
type
is wrong here because the rdf:type of a node is denotedisA
:Bug 6 (new) duplication
Unnecessary duplication:
"@container": "@set"
is redundant because that's the defaultepcis:
andcbv:
prefixes are repeated many times but better be defined just once at top level"@protected": true, "@version": 1.1
are repeated many times but better be defined just once at top levelBug 7 (fixed)
This is wrong:
Should resolve to
epcis:bizTransactionList
Bug 8 (new) leak
The BTT enumeration is outside of the bizTransactionType field (it is one level higher):
The problem is that these bare word definitions will leak into any custom fields in the enclosing field
bizTransactionList
. Try https://tinyurl.com/73e7c8wj, which shows 3 problems:cbv:BTT-bol
to a custom prop due to wrong nesting (should beex:bol
)cbv:foo
to the cbv: namespace; even the JSON Schema can't prevent this<random default namespace>/foo
, which is no better thancbv:BTT-foo
Bug 8a (new) leak
Same problem as 8:
Bug 8b (new) leak
Same problem as 8 (appears twice):
Bug 9 (fixed)
We don't use
xsd:anyURI
but real URLs, see #206. So these:Should be changed to
"@type":"@id"
Bug 9a (new)
@id
aliasThis is wrong, in particular
"@id": "@id"
doesn't mean anything.Change to
Bug 10 (fixed)
These terms resolve to wrong prop names (copy-paste error)
Bug 11 (fixed)
This doesn't cast eg
Temperature
intogs1:MT-Temperature
but should. I think you need to add"@vocab":"gs1:MT-"
but please check.Bug 12 (fixed)
This doesn't cast eg
X
tocbv:Comp-X
. You also need to declare it to be@id
:Bug 12a (fixed)
epcis-context-simple.jsonld:
component
now resolves tocbv:Comp-
notcbv:COMP-
(WithSensorData/SensorDataExample10.ttl)Bug 13 (fixed)
This lacks a datatype:
Improvement 14 (fixed)
As per latest decision, these two terms should be mapped to the same RDF prop (allowing reuse of
SourceOrDestination
nodes).Change
To:
Bug 15 (fixed)
correctiveEventIDs
produces string not URIBug 16 (canceled)
Example_9.8.1-MasterData.ttl and Example_9.8.1-MasterData-complying-with-schema.ttl produce no useful data:
I think the reason is that you removed the
@vocab
declaration, sovocabularyList
and deeper are not resolved.9-Dec-2021: master data is not carried in JSON
Bug 17 (fixed)
prop
epcis:PersistentDisposition
is wrong (should start with lowerCase)Bug 18 (fixed)
Wrong prop (copy-paste error):
As a result,
epcis:readPoint
is missing in all examplesBug 19 (fixed)
Wrong prop, should be
epcis:bizTransactionList
:Bug 20 (fixed)
This in
sensorReport
is wrong, should beepcis:measurementType
Bug 21 (fixed) enumerate barewords
Bad IRI: <file://C:/Humidity> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
sensorReport.type
:Humidity
should be cast togs1:Humidity
(notgs1:MT-Humidity
) as per latest WG decisionBad IRI: <file://C:/completeness_inferred> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
PersistenDisposition.{set,unset}
should be cast tocbv:Disp-
sensorReport.exception
(egALARM_CONDITION
) should be cast togs1:
as per latest WG decisionBad IRI: <file://C:/incorrect-data> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
ErrorDeclaration.reason
should be cast tocbv:ERT-
(not sure about the exact prefix)Bug 22 (fixed) missing bizStep and disposition values
Bad IRI: <file://C:/sensor_reporting> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
sensor_reporting
is missing from thebizStep
enumeration.WithSensorData/SensorDataExample11.jsonld
Bad IRI: <file://C:/needs_replacement> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
needs_replacement
is missing from thedisposition
enumeration@jmcanterafonseca-iota @CraigRe @RalphTro @mgh128 This is clear proof that the "enumerate all barewords" approach is not only unnecessary, but also brittle and error-prone.
Bug 23 (canceled) Missing Class
"isA":"SensorElement"
(I didn't make this!)Bad IRI: <file://C:/SensorElement> Code: 58/PROHIBITED_COMPONENT_PRESENT in PORT: A component that is prohibited by the scheme is present.
@vocab":"epcis:"
and this particular class is not enumerated (only the Event subclasses are enumerated)9-Dec-2021:
isA
removed from exampleEnhancement 24 (new) SBDH
Example_9.6.1-ObjectEvent-with-pseudo-SBDH-headers.ttl
is misisng the following fields because they are not in context. Maybe they are unofficial/experimental?Bug 25 (fixed) gs1 namespace
ALARM_CONDITION is mapped to
<https://ns.gs1.org/voc/ALARM_CONDITION>
but the correct namespace doesn't have "ns"Bug 26 (new) cbvmda namespace
cbvmda:
is not defined so it results in URLs like<cbvmda:countryOfExport>
(WithFullCombinationOfFields/object_event_all_possible_fields). As decided in discussion about the openepcis tool, we should define that namespace.