Class Ref
- java.lang.Object
-
- io.openapiprocessor.jsonschema.schema.Ref
-
public class Ref extends java.lang.Object$ref support.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSTART_OF_POINTER
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAbsoluteRef()java.net.URIgetAbsoluteUri()java.net.URIgetBaseUri()get the base uri of the ref.java.net.URIgetDocumentUri()get the document uri of this ref.java.lang.StringgetPointer()get the json pointer.java.lang.StringgetRef()get the original ref value.java.net.URIgetRefUri()ScopegetScope()get the scope of the ref.booleanhasDocument()checks if the ref has a document.booleanhasPointer()checks if the ref has a json pointer.java.lang.StringtoString()
-
-
-
Field Detail
-
START_OF_POINTER
public static final java.lang.String START_OF_POINTER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Ref
public Ref(Scope scope, java.lang.String ref)
create ref with scope.- Parameters:
scope- scoperef- the ref
-
Ref
public Ref(Scope scope, java.net.URI ref)
create ref with scope.- Parameters:
scope- scoperef- the ref uri
-
Ref
public Ref(Scope scope)
create empty ref with scope.- Parameters:
scope- scope
-
-
Method Detail
-
hasPointer
public boolean hasPointer()
checks if the ref has a json pointer.- Returns:
- true if ref has a json pointer
-
getPointer
public java.lang.String getPointer()
get the json pointer.- Returns:
- json pointer
-
hasDocument
public boolean hasDocument()
checks if the ref has a document.- Returns:
- true if ref has a document, else false
-
getDocumentUri
public java.net.URI getDocumentUri()
get the document uri of this ref. It resolves the ref on the scope and strips the fragment.- Returns:
- the document uri of this ref
-
getScope
public Scope getScope()
get the scope of the ref.- Returns:
- scope
-
getBaseUri
public java.net.URI getBaseUri()
get the base uri of the ref.- Returns:
- base uri
-
getRef
public java.lang.String getRef()
get the original ref value.- Returns:
- the ref
-
getRefUri
public java.net.URI getRefUri()
-
getAbsoluteRef
public java.lang.String getAbsoluteRef()
-
getAbsoluteUri
public java.net.URI getAbsoluteUri()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-