JPL-IMCE / gov.nasa.jpl.imce.oml

Ontology Modeling Language (OML) Workbench
14 stars 1 forks source link

Validate IRIs when creating OML Modules #275

Open NicolasRouquette opened 6 years ago

NicolasRouquette commented 6 years ago

The Eclipse-based OML APIs generally use EMF's URI for constructing IRIs; e.g.:

import org.eclipse.emf.common.util.URI

val organization = "..."
val datasource = "..."
val s_suffix = ".."
val systemURI = URI.createURI('''http://«organization»/user-model/«datasource»/«s_suffix»''')

Unfortunately, the EMF URI API allows creating ill-formed IRIs; e.g.:

...
val systemURI = URI.createURI('''http:///«organization»/user-model/«datasource»/«s_suffix»''')

This is allowed by the Eclipse EMF URI API but it is ill-formed per RFC7230, see Effective Request URI syntax