Platform integration contracts

Pre-release. This site describes standard version 0.1.0-dev, which is in development and may change before version 1.0.0.

NWSS uses its own namespace for waste-service concepts and for contracts that need a platform binding. This guide lists the terms NWSS mints provisionally because every standard needs them. Once the Independent Impact platform vocabulary (iiplat:, https://independentimpact.org/ns/vocab/) has a binding for one of them, NWSS will switch to it. The predicate names match those of NCGS, so tooling ported from NCGS needs only a prefix swap.

Provisional platform candidates

Term NWSS use Integration requirement
nwss:correspondsToActivityType Links each nwss:WasteServiceActivity subclass to its activity-type concept in nwss-cs:ActivityTypes Enforce agreement between an activity’s class and its declared activity type
nwss:activityType, nwss:forActivityType An activity declares its type; indicators and methodologies declare the type they serve Drive the activity type, indicator and methodology cascade
nwss:approvalStatus, nwss-cs:ApprovalStatus Approved, provisional or withdrawn register entries and concepts Bind to the platform’s approval vocabulary
nwss:provisionalFor A project-proposed concept usable only by that project until approved (ADR-0011) Restrict a provisional concept to its project when validating records
nwss:observer, nwss:observerRole, nwss:observedAt Observer provenance on every record and observation (ADR-0004) Keep the observer distinct from the artifact submitter; grade evidence by role
aiao:AgentActivityRelation with aiao:hasAgent, aiao:hasActivity and aiao:isGovernedBy a role that is an aiao:Role (ADR-0004, ADR-0015) An agent appears only as an IRI in a role Keep personal data in the people register; accept no literal on the relation. AIAO publishes aiao:Role in the http://w3id.org/aiao# form; NWSS uses the platform’s https://w3id.org/aiao/ form
nwss:TagAssignment with nwss:assignsTag, nwss:assignedTo, nwss:validFrom, nwss:validUntil, nwss:supersedesAssignment A tag bears an identity for a dated window; a new assignment supersedes the old one and nothing is rewritten (ADR-0003) Resolve a scan to the entity the tag was assigned to at scan time; a gap scan resolves to the entity before the gap unless the code was next assigned elsewhere. NCGS has a tag number with no assignment window, so this extends its rule
nwss:restates, nwss:restatementReason, nwss:Withdrawal, nwss:withdraws Restatement and withdrawal of whole records (ADR-0006) Count the latest restatement and never count a withdrawn record
nwss:derivedInLedger Marks a property whose values are derived, never captured Exclude such properties from instrument coverage
nwss:ordinalScore Rank of a concept in an ordinal scheme Order and aggregate ordinal values without parsing notations
nwss-unit:KiloGM-PER-HH-DAY Unit of the per-household-day rates (waste generation, collected mass per household served); QUDT has no per-household unit Switch to a QUDT or platform unit once one exists

Namespace forms

NWSS uses the AIA vocabulary forms https://w3id.org/aiao/, https://w3id.org/impactont/ and https://w3id.org/claimont/. These are the forms the platform vocabulary and CCTS use. It does not use the http://w3id.org/<name># forms of the ontology source files. Bind these exact terms when exchanging data.

Instance data never uses the nwss: or nwss-cs: namespaces. Entities and records use urn:uuid: IRIs. Record IRIs are deterministic version-5 UUIDs derived from the instrument’s namespace and the submission key (ADR-0003).

External alignments

Material families align to cdm:WasteTypeScheme (http://independentimpact.org/cdm/) so that approved GHG methodologies can consume weighed quantities. Destinations and disposal practices align to ccts-cs:DisposalRoutes. These are skos:exactMatch, skos:closeMatch or skos:broadMatch links, plus one skos:relatedMatch from residual to cdm:MunicipalSolidWaste. They are not imports.

Workflow contracts

The process graphs in dataRequirements/process-graphs/ use the workflow terms of the Independent Impact vocabulary ahead of its publication: iiplat:Workflow with subjectClass, isPrescribedFor and isPrescribedBy; iiplat:WorkflowStep with readinessTest and completionTest; and iiplat:SparqlAskQuery with askQuery over $this. Steps are ordered by iiplat:stepOrder. Conditional steps use iiplat:appliesWhen: a step whose check fails is skipped, not failed. Marking checks use iiplat:marksWith: they mark records and never refuse them. NWSS uses these three terms ahead of their publication. They are proposed for the vocabulary in the ii-namespace pull request “Add workflow step terms” (issue #24, point 4), and both standards use them, so no standard mints its own copy. A non-terminal conditional step’s completion holds vacuously where it does not apply, so an engine that cannot skip a step still passes it. The terminal service exit step is not vacuous, so a service point still in service never reads as done.

tests/fixtures/ii-vocab-workflows.ttl is the vocabulary’s workflow section, vendored from ii-namespace develop plus the three proposed step terms. The tests check every iiplat: term the graphs use against it.

Term NWSS use Integration requirement
nwss:SmartFunctionCheck, nwss:functionSource Every test is an ASK query that is also a smart-function check carrying illustrative Fluree source Evaluate the ASK form. The smart function is the ledger’s own enforcement of the same check
nwss:ProjectDesign, nwss:MonitoringPeriod, nwss:ReviewArtifact, nwss:artifactAuthor, nwss:artifactContentCid, nwss:reviewedArtifactContentCid, nwss:submissionConsensusTimestamp, nwss:underReviewRequirement, nwss:reviewOutcome Workflow subjects and the review log the registration and verification checks read Bind to the platform’s design, review and consensus-time records. The latest review by consensus time governs

Two reading rules matter to an engine that takes “the highest step whose completion tests all pass” as the subject’s position (novaOS ADR-0004):

  • A conditional step that comes after a recurring one also carries the completion tests of the steps before it. A step that passes vacuously then never passes over an earlier step that is still outstanding.
  • The service point lifecycle is long-lived. Its collection, follow-up, evaluation and tag steps recur. The operational layer reads each step’s own state, not only the current step.

Every record pattern in an ASK query ignores a record that a withdrawal withdraws or a later record restates (ADR-0006): only the latest restatement counts. A check label’s “not withdrawn” covers both.

Tests that read the clock use SPARQL NOW() to tell whether a monitoring period has ended. nwss:periodEnd therefore carries a time zone. No test reads a service period, a due date or a carry-forward or follow-up window. Those are project parameters (ADR-0010) that the operational layer applies when it derives statuses and work queues (ADR-0005).

Reviewer reputation is the platform’s to enforce. The ASK forms see only what the ledger holds: who authored the design, who observed a record and who collected a round.

This page explains the standard and does not decide conformance: only the released corpus does. It describes docs/platform-assumptions.md at standard version 0.1.0-dev.