Class ReferenceResolver
- java.lang.Object
-
- org.everit.json.schema.loader.internal.ReferenceResolver
-
public final class ReferenceResolver extends java.lang.Object
Resolves anid
orref
against a parent scope.Used by TypeBasedMultiplexer (for handling
id
s) and by SchemaLoader (for handlingref
s).
-
-
Method Summary
Modifier and Type Method Description static java.lang.String
resolve(java.lang.String parentScope, java.lang.String encounteredSegment)
Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id
orref
value).static java.net.URI
resolve(java.net.URI parentScope, java.lang.String encounteredSegment)
Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id
orref
value).
-
-
-
Method Detail
-
resolve
public static java.net.URI resolve(java.net.URI parentScope, java.lang.String encounteredSegment)
Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id
orref
value).- Parameters:
parentScope
- the most immediate parent scope that the resolution should be performed againstencounteredSegment
- the new segment (complete URI, path, fragment etc) which must be resolved- Returns:
- the resolved URI
-
resolve
public static java.lang.String resolve(java.lang.String parentScope, java.lang.String encounteredSegment)
Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id
orref
value).- Parameters:
parentScope
- the most immediate parent scope that the resolution should be performed againstencounteredSegment
- the new segment (complete URI, path, fragment etc) which must be resolved- Returns:
- the resolved URI
-
-