Class ReferenceResolver

java.lang.Object
org.everit.json.schema.loader.internal.ReferenceResolver

public final class ReferenceResolver extends Object
Resolves an id or ref against a parent scope.

Used by TypeBasedMultiplexer (for handling ids) and by SchemaLoader (for handling refs).

  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    resolve(String parentScope, String encounteredSegment)
    Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id or ref value).
    static URI
    resolve(URI parentScope, String encounteredSegment)
    Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id or ref value).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • resolve

      public static URI resolve(URI parentScope, String encounteredSegment)
      Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id or ref value).
      Parameters:
      parentScope - the most immediate parent scope that the resolution should be performed against
      encounteredSegment - the new segment (complete URI, path, fragment etc) which must be resolved
      Returns:
      the resolved URI
    • resolve

      public static String resolve(String parentScope, String encounteredSegment)
      Creates an absolute JSON pointer string based on a parent scope and a newly encountered pointer segment (id or ref value).
      Parameters:
      parentScope - the most immediate parent scope that the resolution should be performed against
      encounteredSegment - the new segment (complete URI, path, fragment etc) which must be resolved
      Returns:
      the resolved URI