Package com.networknt.schema
Class AbsoluteIri
- java.lang.Object
-
- com.networknt.schema.AbsoluteIri
-
public class AbsoluteIri extends java.lang.ObjectThe 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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Stringvalue
-
Constructor Summary
Constructors Constructor Description AbsoluteIri(java.lang.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(java.lang.Object obj)java.lang.StringgetScheme()Gets the scheme of the IRI.static java.lang.StringgetScheme(java.lang.String iri)Returns the scheme of the IRI.protected java.lang.StringgetSchemeAuthority()Returns the scheme and authority components of the IRI.protected static java.lang.StringgetSchemeAuthority(java.lang.String iri)Returns the scheme and authority components of the IRI.inthashCode()private static booleanisAbsoluteIri(java.lang.String iri)Determines if the iri is absolute or relative.static AbsoluteIriof(java.lang.String iri)Constructs a new IRI given the value.protected static java.lang.Stringparent(java.lang.String iri, int scheme)AbsoluteIriresolve(java.lang.String iri)Constructs a new IRI by parsing the given string and then resolving it against this IRI.static java.lang.Stringresolve(java.lang.String parent, java.lang.String iri)Constructs a new IRI by parsing the given string and then resolving it against this IRI.java.lang.StringtoString()
-
-
-
Method Detail
-
of
public static AbsoluteIri of(java.lang.String iri)
Constructs a new IRI given the value.- Parameters:
iri- the value- Returns:
- the new absolute IRI
-
resolve
public AbsoluteIri resolve(java.lang.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 java.lang.String getScheme()
Gets the scheme of the IRI.- Returns:
- the scheme
-
getSchemeAuthority
protected java.lang.String getSchemeAuthority()
Returns the scheme and authority components of the IRI.- Returns:
- the scheme and authority components
-
isAbsoluteIri
private static boolean isAbsoluteIri(java.lang.String iri)
Determines if the iri is absolute or relative.- Parameters:
iri- to determine- Returns:
- true if absolute
-
resolve
public static java.lang.String resolve(java.lang.String parent, java.lang.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
-
parent
protected static java.lang.String parent(java.lang.String iri, int scheme)
-
getSchemeAuthority
protected static java.lang.String getSchemeAuthority(java.lang.String iri)
Returns the scheme and authority components of the IRI.- Parameters:
iri- to parse- Returns:
- the scheme and authority components
-
getScheme
public static java.lang.String getScheme(java.lang.String iri)
Returns the scheme of the IRI.- Parameters:
iri- to parse- Returns:
- the scheme
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-