public class Dereferencer extends Object
Document
, process its reference strings and attempt to dereference them
using IReferenceResolver
. Produce a clone of the original model,
with the resolved components/definitions attached.Constructor and Description |
---|
Dereferencer(Document source)
Setup the dereferencer execution with default config.
|
Dereferencer(Document source,
IReferenceResolver resolver,
boolean strict)
Setup the dereferencer execution.
|
Modifier and Type | Method and Description |
---|---|
Document |
dereference()
Execute the algorithm.
|
IReferenceResolver |
getResolver() |
Set<String> |
getUnresolvableReferences()
After
dereference() is executed and strict is false, |
boolean |
isStrict() |
public Dereferencer(Document source)
source
- original Document
public Dereferencer(Document source, IReferenceResolver resolver, boolean strict)
source
- original Document
resolver
- provide a custom resolver, otherwise the common ReferenceResolverChain
is used.strict
- If true, and there are any references that cannot be resolved, raise an exception.
Defaults to false.public Document dereference()
RuntimeException
- if strict and some references could not be dereferencedpublic IReferenceResolver getResolver()
public boolean isStrict()
public Set<String> getUnresolvableReferences()
dereference()
is executed and strict is false,Copyright © 2020 Red Hat. All rights reserved.