Package org.incenp.linkml.schema
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
SchemaDocumentand allows to keep track of the various schemas that are being converted as the imports closure is processed.
-
-
Constructor Summary
Constructors Constructor Description SchemaProcessingContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URIgetCurrentSchema()Gets the ID of the schema that is currently being converted.booleanisInImportChain(URI schema)Checks whether the given URI (assumed to be a schema ID) is present in the current import chain.voidpopImport()Removes the last schema ID.voidpushImport(URI schema)Pushes a new schema ID into the import queue.
-
-
-
Method Detail
-
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:
trueif the given ID represents a schema that is part of the current import chain, otherwisefalse.
-
-