Class SchemaProcessingContext

java.lang.Object
org.incenp.linkml.schema.SchemaProcessingContext

public class SchemaProcessingContext extends Object
The context in which a schema definition is being converted.

A context is specific to an instance of SchemaDocument and allows to keep track of the various schemas that are being converted as the imports closure is processed.

  • Constructor Details

    • SchemaProcessingContext

      public SchemaProcessingContext()
  • Method Details

    • pushImport

      public void pushImport(URI schema)
      Pushes a new schema ID into the import queue.
      Parameters:
      schema - The ID to add to the queue.
    • popImport

      public void popImport()
      Removes the last schema ID.
    • getCurrentSchema

      public URI getCurrentSchema()
      Gets the ID of the schema that is currently being converted.
      Returns:
      The current schema ID.
    • isInImportChain

      public boolean isInImportChain(URI schema)
      Checks whether the given URI (assumed to be a schema ID) is present in the current import chain.
      Parameters:
      schema - The schema ID to check.
      Returns:
      true if the given ID represents a schema that is part of the current import chain, otherwise false.