Class ReferenceRegistry
- java.lang.Object
-
- io.openapiprocessor.jsonschema.schema.ReferenceRegistry
-
public class ReferenceRegistry extends java.lang.Objectholds all resolved references of a document.
-
-
Constructor Summary
Constructors Constructor Description ReferenceRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDynamicReference(Ref ref, Scope valueScope, java.lang.Object document)voidaddReference(Ref ref, Scope valueScope, java.lang.Object document)ReferencegetDynamicReference(java.net.URI absoluteRef)get a dynamic reference.ReferencegetReference(java.net.URI absoluteRef)get a static reference.booleanhasDynamicReference(java.net.URI uri)booleanhasReference(java.net.URI absoluteRef)check ifabsoluteRefis resolved.booleanisEmpty()
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
-
hasReference
public boolean hasReference(java.net.URI absoluteRef)
check ifabsoluteRefis resolved. If the ref has an empty fragment (#) it checks with and without the empty fragment.- Parameters:
absoluteRef- absolute ref uri- Returns:
- true if the ref is resolved, otherwise false.
-
getReference
public Reference getReference(java.net.URI absoluteRef)
get a static reference.- Parameters:
absoluteRef- absolute ref uri- Returns:
- the reference
-
getDynamicReference
public Reference getDynamicReference(java.net.URI absoluteRef)
get a dynamic reference.- Parameters:
absoluteRef- absolute ref uri- Returns:
- the reference
-
addDynamicReference
public void addDynamicReference(Ref ref, Scope valueScope, java.lang.Object document)
-
hasDynamicReference
public boolean hasDynamicReference(java.net.URI uri)
-
-