defineType

abstract fun defineType(id: String, exactSynonyms: Set<String>, roughSynonyms: Set<String>, isA: Set<String>, partOf: Set<String>)

Defines a type with the specified properties.

Parameters

id

the unique identifier for this type. May not be used as an ID or synonym of any other type.

exactSynonyms

the exact synonyms of this type.

roughSynonyms

broad synonyms or related terms

isA

a set of type names that are supertypes of this. All types associated with every name in this parameter will be considered supertypes of this new type.

partOf

a set of type names that this type is part of. This type will be considered a part of all types associated with all names in this parameter.

Throws

if id is already present in the schema.

if any name in isA or partOf is not in the schema

if specified isA or partOf relationships create a cyclic type definition

if any name in isA or partOf does not uniquely define a single type. For example, if they are synonyms of multiple types. Hint: use IDs.