{
  "name": "EOAP CWL Custom Types Building Blocks",
  "abstract": "Building Blocks for CWL Custom Types used in Earth Observation Application Packages (EOAP).\nThese types enable mapping between CWL workflow inputs/outputs and OGC API Processes descriptions.\n",
  "description": "The custom types provide a standardized way to describe:\n- GeoJSON geometries and features for spatial inputs/outputs\n- STAC Catalogs, Collections, and Items for EO data manifests\n- OGC bounding boxes for spatial extents\n- Standard string formats (datetime, URI, email, etc.)\n\nThese types bridge the gap between CWL workflow specifications and OGC API Processes\nprocessDescription schemas, enabling automatic mapping of inputs and outputs as described\nin Table 13 of OGC API - Processes Part 1: Core ([OGC 18-062r3](https://docs.ogc.org/DRAFTS/18-062r3.html)).\n\n**Note**: These building blocks document CWL Custom Types defined in [eoap/schemas](https://github.com/eoap/schemas). \nThe JSON Schemas provided are translations for documentation purposes. CWL uses Schema Salad as its schema \nlanguage, which is based on Apache Avro Schema and extends it with semantic annotations for linked data.\n",
  "modified": "2026-01-13T12:25:25.876083",
  "tooling": {
    "bblocks-postprocess": {
      "commitId": "\"5c5cdf9715a991a423177ea9a663d07c902a3b0e",
      "shortCommitId": "\"5c5cdf",
      "date": "2026-01-13T12:02:25+00:00\""
    }
  },
  "gitRepository": "https://github.com/ogcincubator/bblocks-eoap-cct",
  "gitHubRepository": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/",
  "baseURL": "https://ogcincubator.github.io/bblocks-eoap-cct/",
  "viewerURL": "https://ogcincubator.github.io/bblocks-eoap-cct/",
  "validationReport": "https://ogcincubator.github.io/bblocks-eoap-cct/build/tests/report.html",
  "validationReportJson": "https://ogcincubator.github.io/bblocks-eoap-cct/build/tests/report.json",
  "imports": [
    "https://opengeospatial.github.io/bblocks/register.json",
    "https://ogcincubator.github.io/bblocks-ogcapi-records/build/register.json",
    "https://ogcincubator.github.io/bblocks-stac/build/register.json",
    "https://ogcincubator.github.io/bblocks-ogcapi-processes/build/register.json",
    "https://ogcincubator.github.io/bblocks-cwl/build/register.json"
  ],
  "bblocks": [
    {
      "itemIdentifier": "eoap.cct.bbox",
      "$schema": "https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/master/ogc/bblocks/metadata-schema.yaml",
      "name": "eaop-cct:OGC-BoundingBox",
      "abstract": "CWL custom type for OGC bounding box with coordinate reference system",
      "description": "Defines a CWL custom type for OGC bounding boxes conforming to OGC API standards. The BoundingBox type represents spatial extents with bbox coordinates and an optional CRS specification. Maps to the bbox schema defined in Table 13 of OGC API - Processes Part 2.",
      "status": "under-development",
      "dateTimeAddition": "2025-12-17T00:00:00Z",
      "dateOfLastChange": "2025-12-18",
      "version": "1.0",
      "itemClass": "schema",
      "register": "eoap-cct",
      "dependsOn": [],
      "scope": "dev",
      "tags": [
        "CWL",
        "bounding box",
        "bbox",
        "OGC",
        "spatial extent",
        "CRS",
        "OGC API Processes"
      ],
      "sourceSchema": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/bbox/schema.yaml",
      "ldContext": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/bbox/context.jsonld",
      "sources": [
        {
          "title": "OGC API - Features Part 1 - Bounding Box",
          "link": "https://docs.ogc.org/is/17-069r4/17-069r4.html#_parameter_bbox"
        },
        {
          "title": "OGC API - Processes Part 1 - Table 13",
          "link": "https://docs.ogc.org/DRAFTS/18-062r3.html#_921c9ed7-3bf5-8c1d-a5be-f1ca4d0d5351"
        },
        {
          "title": "CRS84 Definition",
          "link": "http://www.opengis.net/def/crs/OGC/1.3/CRS84"
        },
        {
          "title": "EOAP CWL Custom Types - OGC BBox",
          "link": "https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/ogc.yaml"
        }
      ],
      "maturity": "development",
      "group": "EOAP",
      "shaclShapes": {},
      "schema": {
        "application/yaml": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/bbox/schema.yaml",
        "application/json": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/bbox/schema.json"
      },
      "sourceLdContext": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/bbox/context.jsonld",
      "sourceFiles": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/bbox/",
      "rdfData": [],
      "validationPassed": false,
      "testOutputs": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/build/tests/cct/bbox/",
      "documentation": {
        "markdown": {
          "mediatype": "text/markdown",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/markdown/cct/bbox/index.md"
        },
        "json-full": {
          "mediatype": "application/json",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/json-full/cct/bbox/index.json"
        },
        "bblocks-viewer": {
          "mediatype": "text/html",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/bblock/eoap.cct.bbox"
        }
      }
    },
    {
      "itemIdentifier": "eoap.cct.string-format",
      "$schema": "https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/master/ogc/bblocks/metadata-schema.yaml",
      "name": "eaop-cct:String-Format",
      "abstract": "CWL custom types for standard string formats (date, datetime, URI, email, etc.)",
      "description": "Defines CWL custom types for standard string formats conforming to JSON Schema and OpenAPI specifications. These types enable workflows to validate and document string inputs/outputs with specific format constraints (datetime, URI, email, UUID, etc.). Maps to string format constraints in OGC API - Processes schemas (Table 13).",
      "status": "under-development",
      "dateTimeAddition": "2025-12-17T00:00:00Z",
      "dateOfLastChange": "2025-12-18",
      "version": "1.0",
      "itemClass": "schema",
      "register": "eoap-cct",
      "dependsOn": [],
      "scope": "dev",
      "tags": [
        "CWL",
        "string format",
        "datetime",
        "URI",
        "email",
        "UUID",
        "validation",
        "OGC API Processes"
      ],
      "sourceSchema": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/string-format/schema.yaml",
      "ldContext": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/string-format/context.jsonld",
      "sources": [
        {
          "title": "JSON Schema Validation - String Formats",
          "link": "https://json-schema.org/understanding-json-schema/reference/string.html#format"
        },
        {
          "title": "OpenAPI 3.0 - Data Types",
          "link": "https://swagger.io/docs/specification/v3_0/data-models/data-types/"
        },
        {
          "title": "RFC 1123 - Requirements for Internet Hosts - Application and Support",
          "link": "https://tools.ietf.org/html/rfc1123"
        },
        {
          "title": "RFC 3339 - Date and Time on the Internet",
          "link": "https://tools.ietf.org/html/rfc3339"
        },
        {
          "title": "RFC 3986 - Uniform Resource Identifier (URI)",
          "link": "https://tools.ietf.org/html/rfc3986"
        },
        {
          "title": "RFC 3987 - Internationalized Resource Identifiers (IRIs)",
          "link": "https://tools.ietf.org/html/rfc3987"
        },
        {
          "title": "RFC 4122 - A Universally Unique IDentifier (UUID) URN Namespace",
          "link": "https://tools.ietf.org/html/rfc4122"
        },
        {
          "title": "RFC 4291 - IP Version 6 Addressing Architecture",
          "link": "https://tools.ietf.org/html/rfc4291"
        },
        {
          "title": "RFC 5321 - Simple Mail Transfer Protocol",
          "link": "https://tools.ietf.org/html/rfc5321"
        },
        {
          "title": "RFC 5890 - Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework",
          "link": "https://tools.ietf.org/html/rfc5890"
        },
        {
          "title": "RFC 6531 - Internationalized Email Headers",
          "link": "https://tools.ietf.org/html/rfc6531"
        },
        {
          "title": "RFC 6570 - A Uniform Resource Name (URN) Namespace for UUIDs",
          "link": "https://tools.ietf.org/html/rfc6570"
        },
        {
          "title": "RFC 6901 - JSON Pointer",
          "link": "https://tools.ietf.org/html/rfc6901"
        },
        {
          "title": "OGC API - Processes Part 1 - Table 13",
          "link": "https://docs.ogc.org/DRAFTS/18-062r3.html#_921c9ed7-3bf5-8c1d-a5be-f1ca4d0d5351"
        },
        {
          "title": "EOAP CWL Custom Types - String Formats",
          "link": "https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/string_format.yaml"
        }
      ],
      "maturity": "development",
      "group": "EOAP",
      "shaclShapes": {},
      "schema": {
        "application/yaml": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/string-format/schema.yaml",
        "application/json": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/string-format/schema.json"
      },
      "sourceLdContext": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/string-format/context.jsonld",
      "sourceFiles": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/string-format/",
      "rdfData": [],
      "validationPassed": false,
      "testOutputs": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/build/tests/cct/string-format/",
      "documentation": {
        "markdown": {
          "mediatype": "text/markdown",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/markdown/cct/string-format/index.md"
        },
        "json-full": {
          "mediatype": "application/json",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/json-full/cct/string-format/index.json"
        },
        "bblocks-viewer": {
          "mediatype": "text/html",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/bblock/eoap.cct.string-format"
        }
      }
    },
    {
      "itemIdentifier": "eoap.cct.geojson",
      "$schema": "https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/master/ogc/bblocks/metadata-schema.yaml",
      "name": "eaop-cct:GeoJSON",
      "abstract": "CWL custom types for GeoJSON geometries, features, and feature collections",
      "description": "Defines CWL custom types for GeoJSON data structures including Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, Feature, FeatureCollection, and GeometryCollection. These types enable CWL workflows to handle geospatial vector data and map to OGC API - Processes input/output schemas (Table 13).",
      "status": "under-development",
      "dateTimeAddition": "2025-12-17T00:00:00Z",
      "dateOfLastChange": "2025-12-18",
      "version": "1.0",
      "itemClass": "schema",
      "register": "eoap-cct",
      "dependsOn": [],
      "scope": "dev",
      "tags": [
        "CWL",
        "GeoJSON",
        "geometry",
        "feature",
        "geospatial",
        "OGC API Processes"
      ],
      "sourceSchema": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/geojson/schema.yaml",
      "ldContext": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/geojson/context.jsonld",
      "sources": [
        {
          "title": "GeoJSON Format Specification (RFC 7946)",
          "link": "https://datatracker.ietf.org/doc/html/rfc7946"
        },
        {
          "title": "OGC API - Processes Part 1 - Table 13",
          "link": "https://docs.ogc.org/DRAFTS/18-062r3.html#_921c9ed7-3bf5-8c1d-a5be-f1ca4d0d5351"
        },
        {
          "title": "EOAP CWL Custom Types - GeoJSON",
          "link": "https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/geojson.yaml"
        }
      ],
      "maturity": "development",
      "group": "EOAP",
      "shaclShapes": {},
      "schema": {
        "application/yaml": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/geojson/schema.yaml",
        "application/json": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/geojson/schema.json"
      },
      "sourceLdContext": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/geojson/context.jsonld",
      "sourceFiles": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/geojson/",
      "rdfData": [],
      "validationPassed": false,
      "testOutputs": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/build/tests/cct/geojson/",
      "documentation": {
        "markdown": {
          "mediatype": "text/markdown",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/markdown/cct/geojson/index.md"
        },
        "json-full": {
          "mediatype": "application/json",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/json-full/cct/geojson/index.json"
        },
        "bblocks-viewer": {
          "mediatype": "text/html",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/bblock/eoap.cct.geojson"
        }
      }
    },
    {
      "itemIdentifier": "eoap.cct.stac",
      "$schema": "https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/master/ogc/bblocks/metadata-schema.yaml",
      "name": "eaop-cct:STAC",
      "abstract": "CWL custom types for STAC Catalogs, Items, and Collections",
      "description": "Defines CWL custom types for STAC (SpatioTemporal Asset Catalog) metadata structures including Catalog, Item, and Collection. These types enable CWL workflows to handle EO product manifests and map to OGC API - Processes input/output schemas for STAC resources as defined in OGC Best Practice for Earth Observation Application Package (section 6.2.3).",
      "status": "under-development",
      "dateTimeAddition": "2025-12-17T00:00:00Z",
      "dateOfLastChange": "2025-12-18",
      "version": "1.0",
      "itemClass": "schema",
      "register": "eoap-cct",
      "dependsOn": [
        "eoap.cct.geojson"
      ],
      "scope": "dev",
      "tags": [
        "CWL",
        "STAC",
        "SpatioTemporal Asset Catalog",
        "Earth Observation",
        "metadata",
        "OGC API Processes"
      ],
      "sourceSchema": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/stac/schema.yaml",
      "ldContext": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/stac/context.jsonld",
      "sources": [
        {
          "title": "STAC Specification v1.0.0",
          "link": "https://github.com/radiantearth/stac-spec"
        },
        {
          "title": "OGC Best Practice for Earth Observation Application Package",
          "link": "https://docs.ogc.org/bp/20-089r1.html"
        },
        {
          "title": "EOAP CWL Custom Types - STAC",
          "link": "https://raw.githubusercontent.com/eoap/schemas/refs/heads/main/stac.yaml"
        }
      ],
      "maturity": "development",
      "group": "EOAP",
      "shaclShapes": {},
      "schema": {
        "application/yaml": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/stac/schema.yaml",
        "application/json": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/stac/schema.json"
      },
      "sourceLdContext": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/stac/context.jsonld",
      "sourceFiles": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/stac/",
      "rdfData": [],
      "validationPassed": false,
      "testOutputs": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/build/tests/cct/stac/",
      "documentation": {
        "markdown": {
          "mediatype": "text/markdown",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/markdown/cct/stac/index.md"
        },
        "json-full": {
          "mediatype": "application/json",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/json-full/cct/stac/index.json"
        },
        "bblocks-viewer": {
          "mediatype": "text/html",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/bblock/eoap.cct.stac"
        }
      }
    },
    {
      "itemIdentifier": "eoap.cct.cwl-to-ogcprocess",
      "$schema": "https://raw.githubusercontent.com/opengeospatial/bblocks-postprocess/master/ogc/bblocks/metadata-schema.yaml",
      "name": "CWL to OGC API Processes Profile",
      "abstract": "Profile for converting CWL CommandLineTool and Workflow definitions to OGC API Processes processDescriptions",
      "description": "This building block provides a transformation profile that converts Common Workflow Language (CWL) CommandLineTool and Workflow definitions into OGC API - Processes processDescription schemas. It supports all EOAP custom types including BBox, GeoJSON, STAC, and String Formats, as well as standard CWL types. The profile enables automatic mapping of CWL workflow definitions to OGC API - Processes compliant service descriptions, facilitating the deployment of CWL workflows as OGC processes.",
      "status": "under-development",
      "dateTimeAddition": "2025-12-18T00:00:00Z",
      "dateOfLastChange": "2025-12-18",
      "version": "1.0",
      "itemClass": "model",
      "register": "eoap-cct",
      "dependsOn": [
        "ogc.api.processes.v1.schemas.process",
        "ogc.cwl.v1_2_1.CWLWorkflow",
        "eoap.cct.bbox",
        "eoap.cct.string-format",
        "eoap.cct.stac",
        "eoap.cct.geojson"
      ],
      "scope": "dev",
      "tags": [
        "CWL",
        "Common Workflow Language",
        "OGC API Processes",
        "processDescription",
        "transformation",
        "profile",
        "EOAP",
        "CommandLineTool",
        "Workflow"
      ],
      "sources": [
        {
          "title": "Common Workflow Language (CWL) Specification",
          "link": "https://www.commonwl.org/v1.2/"
        },
        {
          "title": "OGC API - Processes Part 1: Core",
          "link": "https://docs.ogc.org/is/18-062r2/18-062r2.html"
        },
        {
          "title": "OGC Best Practice for Earth Observation Application Package",
          "link": "https://docs.ogc.org/bp/20-089r1.html"
        },
        {
          "title": "Earth Observation Application Package (EOAP) CWL Custom Types",
          "link": "https://github.com/eoap/schemas"
        }
      ],
      "maturity": "development",
      "group": "EOAP",
      "highlighted": true,
      "shaclShapes": {},
      "ldContext": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/cwl-to-ogcprocess/context.jsonld",
      "schema": {
        "application/yaml": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/cwl-to-ogcprocess/schema.yaml",
        "application/json": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/cct/cwl-to-ogcprocess/schema.json"
      },
      "sourceSchema": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/cwl-to-ogcprocess/schema.yaml",
      "sourceLdContext": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/cwl-to-ogcprocess/context.jsonld",
      "sourceFiles": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/cwl-to-ogcprocess/",
      "rdfData": [],
      "validationPassed": true,
      "testOutputs": "https://github.com/ogcincubator/bblocks-eoap-cct/blob/master/build/tests/cct/cwl-to-ogcprocess/",
      "transforms": [
        {
          "id": "cwl-to-ogcprocess",
          "description": "Converts CWL CommandLineTool or Workflow to OGC API Processes processDescription with support for all EOAP custom types",
          "type": "jq",
          "ref": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/cwl-to-ogcprocess/transforms/cwl-to-ogcprocess.jq",
          "code": "# Unified transform: CWL CommandLineTool/Workflow to OGC API Processes processDescription\n# Supports all EOAP custom types: BBox, GeoJSON, STAC, and String Formats\n\n# Helper function to extract the root element (first Workflow in $graph, or the document itself)\ndef getRootElement:\n  if has(\"$graph\") then\n    # Find the first Workflow in the $graph array\n    (.\"$graph\" | map(select(.class == \"Workflow\")) | first) // .\"$graph\"[0]\n  else\n    .\n  end;\n\n# Map BBox custom type to OGC schema\ndef mapBBoxType:\n  if (. | type) == \"string\" and ((. | contains(\"bbox.yaml#BBox\")) or (. | contains(\"ogc.yaml#BBox\"))) then\n    {\n      type: \"object\",\n      required: [\"bbox\"],\n      properties: {\n        bbox: {\n          type: \"array\",\n          items: { type: \"number\" },\n          oneOf: [\n            { minItems: 4, maxItems: 4, description: \"2D bbox\" },\n            { minItems: 6, maxItems: 6, description: \"3D bbox\" }\n          ]\n        },\n        crs: {\n          type: \"string\",\n          enum: [\"CRS84\", \"CRS84h\"],\n          default: \"CRS84\"\n        }\n      }\n    }\n  else\n    null\n  end;\n\n# Map GeoJSON custom types to OGC schemas\ndef mapGeoJSONType:\n  if (. | type) == \"string\" then\n    if (. | contains(\"geojson.yaml#\")) then\n      if (. | contains(\"Point\")) then\n        { \n          type: \"object\",\n          required: [\"type\", \"coordinates\"],\n          properties: {\n            type: { type: \"string\", enum: [\"Point\"] },\n            coordinates: { \n              type: \"array\",\n              minItems: 2,\n              maxItems: 3,\n              items: { type: \"number\" }\n            }\n          },\n          format: \"geojson-geometry\"\n        }\n      elif (. | contains(\"Feature\")) then\n        {\n          type: \"object\",\n          required: [\"type\", \"geometry\", \"properties\"],\n          properties: {\n            type: { type: \"string\", enum: [\"Feature\"] },\n            geometry: { type: \"object\" },\n            properties: { type: \"object\" }\n          },\n          format: \"geojson-feature\"\n        }\n      elif (. | contains(\"FeatureCollection\")) then\n        {\n          type: \"object\",\n          required: [\"type\", \"features\"],\n          properties: {\n            type: { type: \"string\", enum: [\"FeatureCollection\"] },\n            features: { \n              type: \"array\",\n              items: { type: \"object\" }\n            }\n          },\n          format: \"geojson-feature-collection\"\n        }\n      else\n        { type: \"object\", format: \"geojson-geometry\" }\n      end\n    else\n      null\n    end\n  else\n    null\n  end;\n\n# Map STAC custom types to OGC schemas  \ndef mapSTACType:\n  if (. | type) == \"string\" and (. | contains(\"stac.yaml#\")) then\n    if (. | contains(\"Item\")) then\n      {\n        type: \"object\",\n        required: [\"type\", \"stac_version\", \"id\", \"geometry\", \"properties\", \"links\", \"assets\"],\n        properties: {\n          type: { type: \"string\", enum: [\"Feature\"] },\n          stac_version: { type: \"string\" },\n          id: { type: \"string\" },\n          geometry: { type: \"object\" },\n          properties: { type: \"object\" },\n          links: { type: \"array\" },\n          assets: { type: \"object\" }\n        },\n        format: \"stac-item\"\n      }\n    elif (. | contains(\"Collection\")) then\n      {\n        type: \"object\",\n        required: [\"type\", \"stac_version\", \"id\", \"description\", \"license\", \"extent\", \"links\"],\n        format: \"stac-collection\"\n      }\n    elif (. | contains(\"Catalog\")) then\n      {\n        type: \"object\",\n        required: [\"type\", \"stac_version\", \"id\", \"description\", \"links\"],\n        format: \"stac-catalog\"\n      }\n    else\n      { type: \"object\", format: \"stac\" }\n    end\n  else\n    null\n  end;\n\n# Map string format custom types to OGC schemas\ndef mapStringFormatType:\n  if (. | type) == \"string\" and (. | contains(\"string-format.yaml#\")) then\n    if (. | contains(\"DateTime\")) then\n      { type: \"string\", format: \"date-time\" }\n    elif (. | contains(\"Date\")) then\n      { type: \"string\", format: \"date\" }\n    elif (. | contains(\"Time\")) then\n      { type: \"string\", format: \"time\" }\n    elif (. | contains(\"Duration\")) then\n      { type: \"string\", format: \"duration\" }\n    elif (. | contains(\"URI\")) then\n      { type: \"string\", format: \"uri\" }\n    elif (. | contains(\"Email\")) then\n      { type: \"string\", format: \"email\" }\n    elif (. | contains(\"UUID\")) then\n      { type: \"string\", format: \"uuid\" }\n    elif (. | contains(\"IPv4\")) then\n      { type: \"string\", format: \"ipv4\" }\n    elif (. | contains(\"IPv6\")) then\n      { type: \"string\", format: \"ipv6\" }\n    elif (. | contains(\"Hostname\")) then\n      { type: \"string\", format: \"hostname\" }\n    else\n      { type: \"string\" }\n    end\n  else\n    null\n  end;\n\n# Map CWL File type to OGC schema\ndef mapFileType:\n  if . == \"File\" or . == \"stdout\" or . == \"stderr\" then\n    {\n      type: \"string\",\n      contentMediaType: \"application/octet-stream\"\n    }\n  else\n    null\n  end;\n\n# Map CWL Directory type to OGC schema\ndef mapDirectoryType:\n  if . == \"Directory\" then\n    {\n      type: \"string\",\n      contentMediaType: \"application/x-directory\"\n    }\n  else\n    null\n  end;\n\n# Unified type mapper - tries all type mappings\ndef mapType:\n  . as $type |\n  # Check if it's an array type (e.g., \"string[]\", \"int[]\", etc.)\n  if ($type | type) == \"string\" and ($type | endswith(\"[]\")) then\n    # Extract base type by removing \"[]\" suffix\n    ($type | sub(\"\\\\[\\\\]$\"; \"\")) as $baseType |\n    {\n      type: \"array\",\n      items: ($baseType | mapType)\n    }\n  else\n    (mapBBoxType // mapGeoJSONType // mapSTACType // mapStringFormatType // mapFileType // mapDirectoryType // \n     if ($type | type) == \"string\" then\n       if $type == \"string\" then { type: \"string\" }\n       elif $type == \"int\" or $type == \"long\" then { type: \"integer\" }\n       elif $type == \"float\" or $type == \"double\" then { type: \"number\" }\n       elif $type == \"boolean\" then { type: \"boolean\" }\n       else { type: \"string\" }\n       end\n     else\n       { type: \"object\" }\n     end\n    )\n  end;\n\n# Process inputs\ndef processInputs:\n  if . then\n    if (. | type) == \"array\" then\n      # Workflow style: inputs is an array with id fields\n      map(\n        .type as $inputType |\n        {\n          key: .id,\n          value: {\n            title: (.label // .id),\n            description: (.doc // \"\"),\n            schema: ($inputType | mapType),\n            minOccurs: 1,\n            maxOccurs: 1\n          }\n        }\n      ) | from_entries\n    else\n      # CommandLineTool style: inputs is an object\n      to_entries | map(\n        .value.type as $inputType |\n        {\n          key: .key,\n          value: {\n            title: (.value.label // .key),\n            description: (.value.doc // \"\"),\n            schema: ($inputType | mapType),\n            minOccurs: 1,\n            maxOccurs: 1\n          }\n        }\n      ) | from_entries\n    end\n  else\n    {}\n  end;\n\n# Process outputs\ndef processOutputs:\n  if . then\n    if (. | type) == \"array\" then\n      # Workflow style: outputs is an array with id fields\n      map(\n        .type as $outputType |\n        {\n          key: .id,\n          value: {\n            title: (.label // .id),\n            description: (.doc // \"\"),\n            schema: ($outputType | mapType)\n          }\n        }\n      ) | from_entries\n    else\n      # CommandLineTool style: outputs is an object\n      to_entries | map(\n        .value.type as $outputType |\n        {\n          key: .key,\n          value: {\n            title: (.value.label // .key),\n            description: (.value.doc // \"\"),\n            schema: ($outputType | mapType)\n          }\n        }\n      ) | from_entries\n    end\n  else\n    {}\n  end;\n\n# Main transformation\ngetRootElement as $root |\n{\n  id: ($root.id // (if ($root.baseCommand | type) == \"array\" then $root.baseCommand[0] else $root.baseCommand end) // \"cwl-process\"),\n  version: \"1.0.0\",\n  title: ($root.label // \"CWL Process\"),\n  description: ($root.doc // \"Process converted from CWL\"),\n  \n  inputs: ($root.inputs | processInputs),\n  outputs: ($root.outputs | processOutputs),\n  \n  jobControlOptions: [\"async-execute\", \"sync-execute\"],\n  outputTransmission: [\"value\", \"reference\"]\n}\n",
          "inputs": {
            "mediaTypes": [
              {
                "id": "json",
                "defaultExtension": "json",
                "label": "JSON",
                "mimeType": "application/json",
                "extensions": [
                  "json"
                ]
              }
            ]
          },
          "outputs": {
            "mediaTypes": [
              {
                "id": "json",
                "defaultExtension": "json",
                "label": "JSON",
                "mimeType": "application/json",
                "extensions": [
                  "json"
                ]
              }
            ]
          }
        },
        {
          "id": "cwl-to-ogcprocess-refs",
          "description": "Converts CWL CommandLineTool or Workflow to OGC API Processes processDescription with support for all EOAP custom types",
          "type": "jq",
          "ref": "https://ogcincubator.github.io/bblocks-eoap-cct/_sources/cwl-to-ogcprocess/transforms/cwl-to-ogcprocess-refs.jq",
          "code": "# Unified transform: CWL CommandLineTool/Workflow to OGC API Processes processDescription\n# Uses reference schemas (allOf + $ref) for EOAP custom types: BBox, GeoJSON, STAC\n\n# Helper function to extract the root element (first Workflow in $graph, or the document itself)\ndef getRootElement:\n  if has(\"$graph\") then\n    # Find the first Workflow in the $graph array\n    (.\"$graph\" | map(select(.class == \"Workflow\")) | first) // .\"$graph\"[0]\n  else\n    .\n  end;\n\n# Map BBox custom type to OGC schema with reference\ndef mapBBoxType:\n  if (. | type) == \"string\" and ((. | contains(\"bbox.yaml#BBox\")) or (. | contains(\"ogc.yaml#BBox\"))) then\n    {\n      allOf: [\n        {\n          format: \"ogc-bbox\"\n        },\n        {\n          \"$ref\": \"https://raw.githubusercontent.com/opengeospatial/ogcapi-processes/master/openapi/schemas/processes-core/bbox.yaml\"\n        }\n      ]\n    }\n  else\n    null\n  end;\n\n# Map GeoJSON custom types to OGC schemas with references\ndef mapGeoJSONType:\n  if (. | type) == \"string\" then\n    if (. | contains(\"geojson.yaml#\")) then\n      if (. | contains(\"Point\")) then\n        {\n          allOf: [\n            {\n              format: \"geojson-geometry\"\n            },\n            {\n              \"$ref\": \"https://geojson.org/schema/Point.json\"\n            }\n          ]\n        }\n      elif (. | contains(\"Feature\")) then\n        {\n          allOf: [\n            {\n              format: \"geojson-feature\"\n            },\n            {\n              \"$ref\": \"https://geojson.org/schema/Feature.json\"\n            }\n          ]\n        }\n      elif (. | contains(\"FeatureCollection\")) then\n        {\n          allOf: [\n            {\n              format: \"geojson-feature-collection\"\n            },\n            {\n              \"$ref\": \"https://geojson.org/schema/FeatureCollection.json\"\n            }\n          ]\n        }\n      elif (. | contains(\"Polygon\")) then\n        {\n          allOf: [\n            {\n              format: \"geojson-geometry\"\n            },\n            {\n              \"$ref\": \"https://geojson.org/schema/Polygon.json\"\n            }\n          ]\n        }\n      else\n        {\n          allOf: [\n            {\n              format: \"geojson-geometry\"\n            },\n            {\n              \"$ref\": \"https://geojson.org/schema/Geometry.json\"\n            }\n          ]\n        }\n      end\n    else\n      null\n    end\n  else\n    null\n  end;\n\n# Map STAC custom types to OGC schemas with references\ndef mapSTACType:\n  if (. | type) == \"string\" and (. | contains(\"stac.yaml#\")) then\n    if (. | contains(\"Item\")) then\n      {\n        allOf: [\n          {\n            format: \"stac-item\"\n          },\n          {\n            \"$ref\": \"https://raw.githubusercontent.com/radiantearth/stac-api-spec/refs/heads/release/v1.0.0/stac-spec/item-spec/json-schema/item.json\"\n          }\n        ]\n      }\n    elif (. | contains(\"Collection\")) then\n      {\n        allOf: [\n          {\n            format: \"stac-collection\"\n          },\n          {\n            \"$ref\": \"https://raw.githubusercontent.com/radiantearth/stac-api-spec/refs/heads/release/v1.0.0/stac-spec/collection-spec/json-schema/collection.json\"\n          }\n        ]\n      }\n    elif (. | contains(\"Catalog\")) then\n      {\n        allOf: [\n          {\n            format: \"stac-catalog\"\n          },\n          {\n            \"$ref\": \"https://raw.githubusercontent.com/radiantearth/stac-api-spec/refs/heads/release/v1.0.0/stac-spec/catalog-spec/json-schema/catalog.json\"\n          }\n        ]\n      }\n    else\n      {\n        allOf: [\n          {\n            format: \"stac\"\n          },\n          {\n            \"$ref\": \"https://raw.githubusercontent.com/radiantearth/stac-api-spec/refs/heads/release/v1.0.0/stac-spec/catalog-spec/json-schema/catalog.json\"\n          }\n        ]\n      }\n    end\n  else\n    null\n  end;\n\n# Map string format custom types to OGC schemas\ndef mapStringFormatType:\n  if (. | type) == \"string\" and (. | contains(\"string-format.yaml#\")) then\n    if (. | contains(\"DateTime\")) then\n      { type: \"string\", format: \"date-time\" }\n    elif (. | contains(\"Date\")) then\n      { type: \"string\", format: \"date\" }\n    elif (. | contains(\"Time\")) then\n      { type: \"string\", format: \"time\" }\n    elif (. | contains(\"Duration\")) then\n      { type: \"string\", format: \"duration\" }\n    elif (. | contains(\"URI\")) then\n      { type: \"string\", format: \"uri\" }\n    elif (. | contains(\"Email\")) then\n      { type: \"string\", format: \"email\" }\n    elif (. | contains(\"UUID\")) then\n      { type: \"string\", format: \"uuid\" }\n    elif (. | contains(\"IPv4\")) then\n      { type: \"string\", format: \"ipv4\" }\n    elif (. | contains(\"IPv6\")) then\n      { type: \"string\", format: \"ipv6\" }\n    elif (. | contains(\"Hostname\")) then\n      { type: \"string\", format: \"hostname\" }\n    else\n      { type: \"string\" }\n    end\n  else\n    null\n  end;\n\n# Map CWL File type to OGC schema\ndef mapFileType:\n  if . == \"File\" or . == \"stdout\" or . == \"stderr\" then\n    {\n      type: \"string\",\n      contentMediaType: \"application/octet-stream\"\n    }\n  else\n    null\n  end;\n\n# Map CWL Directory type to OGC schema\ndef mapDirectoryType:\n  if . == \"Directory\" then\n    {\n      type: \"string\",\n      contentMediaType: \"application/x-directory\"\n    }\n  else\n    null\n  end;\n\n# Unified type mapper - tries all type mappings\ndef mapType:\n  . as $type |\n  # Check if it's an array type (e.g., \"string[]\", \"int[]\", etc.)\n  if ($type | type) == \"string\" and ($type | endswith(\"[]\")) then\n    # Extract base type by removing \"[]\" suffix\n    ($type | sub(\"\\\\[\\\\]$\"; \"\")) as $baseType |\n    {\n      type: \"array\",\n      items: ($baseType | mapType)\n    }\n  else\n    (mapBBoxType // mapGeoJSONType // mapSTACType // mapStringFormatType // mapFileType // mapDirectoryType // \n     if ($type | type) == \"string\" then\n       if $type == \"string\" then { type: \"string\" }\n       elif $type == \"int\" or $type == \"long\" then { type: \"integer\" }\n       elif $type == \"float\" or $type == \"double\" then { type: \"number\" }\n       elif $type == \"boolean\" then { type: \"boolean\" }\n       else { type: \"string\" }\n       end\n     else\n       { type: \"object\" }\n     end\n    )\n  end;\n\n# Process inputs\ndef processInputs:\n  if . then\n    if (. | type) == \"array\" then\n      # Workflow style: inputs is an array with id fields\n      map(\n        .type as $inputType |\n        {\n          key: .id,\n          value: {\n            title: (.label // .id),\n            description: (.doc // \"\"),\n            schema: ($inputType | mapType),\n            minOccurs: 1,\n            maxOccurs: 1\n          }\n        }\n      ) | from_entries\n    else\n      # CommandLineTool style: inputs is an object\n      to_entries | map(\n        .value.type as $inputType |\n        {\n          key: .key,\n          value: {\n            title: (.value.label // .key),\n            description: (.value.doc // \"\"),\n            schema: ($inputType | mapType),\n            minOccurs: 1,\n            maxOccurs: 1\n          }\n        }\n      ) | from_entries\n    end\n  else\n    {}\n  end;\n\n# Process outputs\ndef processOutputs:\n  if . then\n    if (. | type) == \"array\" then\n      # Workflow style: outputs is an array with id fields\n      map(\n        .type as $outputType |\n        {\n          key: .id,\n          value: {\n            title: (.label // .id),\n            description: (.doc // \"\"),\n            schema: ($outputType | mapType)\n          }\n        }\n      ) | from_entries\n    else\n      # CommandLineTool style: outputs is an object\n      to_entries | map(\n        .value.type as $outputType |\n        {\n          key: .key,\n          value: {\n            title: (.value.label // .key),\n            description: (.value.doc // \"\"),\n            schema: ($outputType | mapType)\n          }\n        }\n      ) | from_entries\n    end\n  else\n    {}\n  end;\n\n# Main transformation\ngetRootElement as $root |\n{\n  id: ($root.id // (if ($root.baseCommand | type) == \"array\" then $root.baseCommand[0] else $root.baseCommand end) // \"cwl-process\"),\n  version: \"1.0.0\",\n  title: ($root.label // \"CWL Process\"),\n  description: ($root.doc // \"Process converted from CWL\"),\n  \n  inputs: ($root.inputs | processInputs),\n  outputs: ($root.outputs | processOutputs),\n  \n  jobControlOptions: [\"async-execute\", \"sync-execute\"],\n  outputTransmission: [\"value\", \"reference\"]\n}\n",
          "inputs": {
            "mediaTypes": [
              {
                "id": "json",
                "defaultExtension": "json",
                "label": "JSON",
                "mimeType": "application/json",
                "extensions": [
                  "json"
                ]
              }
            ]
          },
          "outputs": {
            "mediaTypes": [
              {
                "id": "json",
                "defaultExtension": "json",
                "label": "JSON",
                "mimeType": "application/json",
                "extensions": [
                  "json"
                ]
              }
            ]
          }
        }
      ],
      "documentation": {
        "markdown": {
          "mediatype": "text/markdown",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/markdown/cct/cwl-to-ogcprocess/index.md"
        },
        "json-full": {
          "mediatype": "application/json",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/build/generateddocs/json-full/cct/cwl-to-ogcprocess/index.json"
        },
        "bblocks-viewer": {
          "mediatype": "text/html",
          "url": "https://ogcincubator.github.io/bblocks-eoap-cct/bblock/eoap.cct.cwl-to-ogcprocess"
        }
      }
    }
  ],
  "remoteCacheDir": "https://ogcincubator.github.io/bblocks-eoap-cct/build/annotated/_cache",
  "links": [
    {
      "rel": "self",
      "href": "https://ogcincubator.github.io/bblocks-eoap-cct/build/register.json",
      "type": "application/json",
      "title": "This Building Blocks Register in JSON format"
    },
    {
      "rel": "self",
      "href": "https://ogcincubator.github.io/bblocks-eoap-cct/build/bblocks.ttl",
      "type": "text/turtle",
      "title": "This Building Blocks Register in RDF Turtle format"
    },
    {
      "rel": "self",
      "href": "https://ogcincubator.github.io/bblocks-eoap-cct/build/bblocks.jsonld",
      "type": "application/ld+json",
      "title": "This Building Blocks Register in JSON-LD format"
    }
  ]
}