You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement a sub-parser for SensorML 3.0 AggregateProcess descriptors that parses the AbstractProcess-level properties and the AggregateProcess-specific components (ComponentList) and connections (ConnectionList) properties, handling recursive component parsing and data flow connection mapping.
Follow the EDR parser/helper patterns in src/ogc-api/edr/model.ts (126 lines) for function structure and JSDoc style. For test patterns, follow src/ogc-api/edr/model.spec.ts (42 lines). The SimpleProcess sub-parser from Issue #19 (simple-process.ts) is the closest sibling — follow its structure for shared AbstractProcess-level parsing, then add component/connection handling.
Scope — What to Implement
Parser Function
/** * Parse a raw SensorML 3.0 AggregateProcess JSON object into a typed AggregateProcess. * * AggregateProcess is a composite non-physical process that orchestrates * sub-processes via named components and data flow connections. * * @param json - Raw JSON object with `type: 'AggregateProcess'` * @returns Parsed AggregateProcess object * @throws {SensorMLParseError} If the input is not a valid AggregateProcess * @see https://docs.ogc.org/is/23-000/23-000.html — OGC SensorML 3.0 */exportfunctionparseAggregateProcess(json: unknown): AggregateProcess
Properties to Parse
From AbstractProcess (inherited via DescribedObject → AbstractProcess → AggregateProcess):
Same AbstractProcess-level properties as Issue #19 (SimpleProcess). The DescribedObject-level properties (id, uniqueId, label, description, identifiers, classifiers, validTime, capabilities, characteristics, contacts, documents, history, securityConstraints, legalConstraints) may be parsed by shared helper functions that the main parser (Issue #22) coordinates.
Property
Type
Required
OGC Spec
Description
type
'AggregateProcess' (const)
Yes
Part 1 L3705
Type discriminator
definition
string (URI)
No
Part 1 L3608
Process type as URI to ontology concept
typeOf
link-2
No
Part 1 L3612
Reference to base process this inherits from
configuration
Settings
No
Part 1 L3616
Value settings constraining base process properties
featuresOfInterest
FeatureList (link-2[])
No
Part 1 L3619
Sampling/domain features relevant to process
inputs
InputList (IOComponentChoice[])
No
Part 1 L3623
Process input specifications
outputs
OutputList (IOComponentChoice[])
No
Part 1 L3626
Process output specifications
parameters
ParameterList (IOComponentChoice[])
No
Part 1 L3629
Configuration parameters
modes
Mode[]
No
Part 1 L3632
Operating modes with configurations
AggregateProcess-specific properties:
Property
Type
Required
OGC Spec
Description
components
ComponentList
No
Part 1 L3708
Array of named sub-processes
connections
ConnectionList
No
Part 1 L3710
Data flow links between component inputs/outputs/parameters
❌ Do NOT parse DescribedObject-level properties independently — shared parsing helpers belong to Issue Phase 3, Task 9: SensorML Main Parser #22 (SensorML Main Parser)
❌ Do NOT modify files outside the "Files to Create or Modify" table above
❌ Do NOT refactor existing code unless required to complete this task
Acceptance Criteria
src/ogc-api/csapi/formats/sensorml/aggregate-process.ts exists with parseAggregateProcess function
Task
Implement a sub-parser for SensorML 3.0
AggregateProcessdescriptors that parses theAbstractProcess-level properties and theAggregateProcess-specificcomponents(ComponentList) andconnections(ConnectionList) properties, handling recursive component parsing and data flow connection mapping.ROADMAP Reference: Phase 3, Task 7 — SensorML Aggregate Process Parser (~2-3 hours, Medium-High complexity)
Files to Create or Modify
src/ogc-api/csapi/formats/sensorml/aggregate-process.tssrc/ogc-api/csapi/formats/sensorml/aggregate-process.spec.tsBlueprint Reference
Follow the EDR parser/helper patterns in
src/ogc-api/edr/model.ts(126 lines) for function structure and JSDoc style. For test patterns, followsrc/ogc-api/edr/model.spec.ts(42 lines). TheSimpleProcesssub-parser from Issue #19 (simple-process.ts) is the closest sibling — follow its structure for sharedAbstractProcess-level parsing, then add component/connection handling.Scope — What to Implement
Parser Function
Properties to Parse
From
AbstractProcess(inherited viaDescribedObject → AbstractProcess → AggregateProcess):Same
AbstractProcess-level properties as Issue #19 (SimpleProcess). TheDescribedObject-level properties (id, uniqueId, label, description, identifiers, classifiers, validTime, capabilities, characteristics, contacts, documents, history, securityConstraints, legalConstraints) may be parsed by shared helper functions that the main parser (Issue #22) coordinates.type'AggregateProcess'(const)definitionstring(URI)typeOflink-2configurationSettingsfeaturesOfInterestFeatureList(link-2[])inputsInputList(IOComponentChoice[])outputsOutputList(IOComponentChoice[])parametersParameterList(IOComponentChoice[])modesMode[]AggregateProcess-specific properties:componentsComponentListconnectionsConnectionListComponentList Structure (Part 1 L4112 / AggregateProcess.$defs L3715)
ComponentListis an array (minItems: 1) where each entry is:name(required string, fromSoftNamedProperty) — identifier matching^[A-Za-z][A-Za-z0-9_\-]*$link-2withtype: 'Link'): Reference to externally-defined componentThe parser must:
namefrom each component entryConnectionList Structure (Part 1 L4127 / AggregateProcess.$defs L3730)
ConnectionListis an array (minItems: 1) where each entry has:source(requiredPathRefstring) — e.g.,"components/sensor1/outputs/temperature"destination(requiredPathRefstring) — e.g.,"outputs/temperature"PathRefpattern:^(components|inputs|outputs|parameters|modes)/([A-Za-z][A-Za-z0-9_\-]*/)*[A-Za-z][A-Za-z0-9_\-]*$The parser must:
sourceanddestinationsourceanddestinationare present (required per spec)PathRefregex patternError Handling
typeis not'AggregateProcess'componentsarray contains entries without requirednamepropertyconnectionsarray contains entries missingsourceordestinationundefined)JSDoc Requirements
parseAggregateProcesswith@param,@returns,@throws,@see@seelinks to OGC SensorML 3.0 (23-000) and Part 1 spec line numbersparseComponentList,parseConnectionList,parseComponentEntry)src/ogc-api/edr/model.tsTesting Requirements
src/ogc-api/csapi/formats/sensorml/aggregate-process.spec.ts(~150-200 lines)type+ required DescribedObject propsSimpleProcessandPhysicalComponentcomponentslink-2component entries (type: 'Link',href)source/destinationPathRef stringstype, wrongtypevalue, components missingname, connections missingsource/destinationcomponents/connectionsarrays, single component, unknown extra propertiessrc/ogc-api/edr/model.spec.tsScope — What NOT to Touch
SimpleProcessparsing — that belongs to Issue Phase 3, Task 6: SensorML Simple Process Parser #19 (SensorML Simple Process Parser)PhysicalSystemorPhysicalComponentparsing — that belongs to Issue Phase 3, Task 8: SensorML Physical System Parser #21 (SensorML Physical System Parser)formats/sensorml/parser.ts(main parser) — that belongs to Issue Phase 3, Task 9: SensorML Main Parser #22 (SensorML Main Parser)formats/sensorml/index.tsbarrel file — that belongs to Issue Phase 3, Task 10: SensorML Index #23 (SensorML Index)import typeDescribedObject-level properties independently — shared parsing helpers belong to Issue Phase 3, Task 9: SensorML Main Parser #22 (SensorML Main Parser)Acceptance Criteria
src/ogc-api/csapi/formats/sensorml/aggregate-process.tsexists withparseAggregateProcessfunctionAbstractProcess-level properties (definition, typeOf, configuration, featuresOfInterest, inputs, outputs, parameters, modes)ComponentList— named entries with inline process parsing and external link handlingConnectionList— source/destination PathRef pairs with validation@seelinksaggregate-process.spec.tsexists with tests for component parsing, connection handling, recursion, invalid documents, and edge casesnpm test)Dependencies
Blocked by:
AggregateProcess,ComponentList,ConnectionList,ComponentEntry,Connectionand related type definitions)SWEDataComponent,AnyComponenttypes used in IOComponentChoice)Blocks:
Operational Constraints
Key constraints for this task:
References
Read these documents before starting implementation. They are ordered by priority.
Primary References (must read)
docs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mdAggregateProcessinterface,ComponentList,ConnectionList,ComponentEntry,Connectiontypessrc/ogc-api/edr/model.tssrc/ogc-api/edr/model.spec.tsUpstream Type/Import References (files this task imports from)
src/ogc-api/csapi/formats/sensorml/types.ts(Issue #18)AggregateProcess,ComponentList,ConnectionList,ComponentEntry,Connection,IOComponentChoice,Mode,Settingssrc/ogc-api/csapi/formats/swecommon/types.ts(Issue #17)SWEDataComponent/AnyComponent(viaimport typeonly)Sibling References (same pattern)
src/ogc-api/csapi/formats/sensorml/simple-process.ts(Issue #19)Research References (context, not required reading)
docs/planning/ROADMAP.md(Lines 417-425)Specification References (for
@seelinks and field accuracy)@seetargetdocs/research/standards/ogcapi-connectedsystems-1.bundled.oas31.yamlAggregateProcessschema (L3698),ComponentList(L4112 + AggregateProcess.$defs L3715),ConnectionList(L4127 + L3730),PathRef(L3299),SoftNamedProperty(L1938),AbstractProcess(L3599)Convention Quick Reference
.jsextension for relative importsimport type { AggregateProcess } from './types.js'import typefor interfaces/typesimport type { AggregateProcess } from './types.js'export function parseAggregateProcess(json: unknown): AggregateProcessglobalThis.fetch = jest.fn()