Patcher Interface

Warning

this interface is still highly incomplete. In future it will allow any operation from KGCL to be applied

class oaklib.interfaces.patcher_interface.PatcherInterface(resource: Optional[oaklib.resource.OntologyResource] = None, strict: bool = False)[source]

Applies diffs

See KGCL

apply_patch(patch: kgcl_schema.datamodel.kgcl.Change, activity: Optional[kgcl_schema.datamodel.kgcl.Activity] = None, metadata: Optional[Mapping[str, Any]] = None) Optional[kgcl_schema.datamodel.kgcl.Change][source]

Applies a change description

Parameters
  • patch – TBD use KGCL

  • activity

  • metadata

Returns

if successful, return copy of change object with additional metadata attached

auto_add_contributor_using: str = None

If provided, then any creators of or contributors on a Change object are propagated to the entity after application of that change, using this property. If this is set then the recommended value is dct:contributor

migrate_curies(curie_map: Dict[str, str]) None[source]

Rewire an ontology replacing all usages of some CURIEs

Parameters

curie_map

Returns

save()[source]

Commits all changes

Returns