Package com.networknt.schema
Class AbsoluteIri
- java.lang.Object
-
- com.networknt.schema.AbsoluteIri
-
public class AbsoluteIri extends Object
The absolute IRI is an IRI without the fragment.absolute-IRI = scheme ":" ihier-part [ "?" iquery ]
This does not attempt to validate whether the value really conforms to an absolute IRI format as in earlier drafts the IDs are not defined as such.
-
-
Constructor Summary
Constructors Constructor Description AbsoluteIri(String value)Constructs a new IRI given the value.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetScheme()Gets the scheme of the IRI.static StringgetScheme(String iri)Returns the scheme of the IRI.protected StringgetSchemeAuthority()Returns the scheme and authority components of the IRI.protected static StringgetSchemeAuthority(String iri)Returns the scheme and authority components of the IRI.inthashCode()static AbsoluteIriof(String iri)Constructs a new IRI given the value.protected static Stringparent(String iri, int scheme)AbsoluteIriresolve(String iri)Constructs a new IRI by parsing the given string and then resolving it against this IRI.static Stringresolve(String parent, String iri)Constructs a new IRI by parsing the given string and then resolving it against this IRI.StringtoString()
-
-
-
Constructor Detail
-
AbsoluteIri
public AbsoluteIri(String value)
Constructs a new IRI given the value.- Parameters:
value-
-
-
Method Detail
-
of
public static AbsoluteIri of(String iri)
Constructs a new IRI given the value.- Parameters:
iri- the value- Returns:
- the new absolute IRI
-
resolve
public AbsoluteIri resolve(String iri)
Constructs a new IRI by parsing the given string and then resolving it against this IRI.- Parameters:
iri- to resolve- Returns:
- the new absolute IRI
-
getScheme
public String getScheme()
Gets the scheme of the IRI.- Returns:
- the scheme
-
getSchemeAuthority
protected String getSchemeAuthority()
Returns the scheme and authority components of the IRI.- Returns:
- the scheme and authority components
-
resolve
public static String resolve(String parent, String iri)
Constructs a new IRI by parsing the given string and then resolving it against this IRI.- Parameters:
parent- the parent absolute IRIiri- to resolve- Returns:
- the new absolute IRI
-
getSchemeAuthority
protected static String getSchemeAuthority(String iri)
Returns the scheme and authority components of the IRI.- Parameters:
iri- to parse- Returns:
- the scheme and authority components
-
getScheme
public static String getScheme(String iri)
Returns the scheme of the IRI.- Parameters:
iri- to parse- Returns:
- the scheme
-
-