Package com.stardog.stark.util
Class ParsedURI
java.lang.Object
com.stardog.stark.util.ParsedURI
- All Implemented Interfaces:
Cloneable
A replacement for Java's own URI: java.net.URI. Java's implementation is quite buggy in that it doesn't
resolve relative URIs correctly.
Note: this implementation is not guaranteed to handle ipv6 addresses correctly (yet).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()getPath()getQuery()booleanbooleanbooleanisOpaque()booleanbooleanChecks whether this URI is a relative URI that references itself (i.e.voidNormalizes the path of this URI if it has one.Resolves a relative URI using this URI as the base URI.Resolves a relative URI using this URI as the base URI.toString()
-
Constructor Details
-
ParsedURI
-
ParsedURI
-
ParsedURI
-
-
Method Details
-
isHierarchical
public boolean isHierarchical() -
isOpaque
public boolean isOpaque() -
isAbsolute
public boolean isAbsolute() -
isRelative
public boolean isRelative() -
isSelfReference
public boolean isSelfReference()Checks whether this URI is a relative URI that references itself (i.e. it only contains an anchor). -
getScheme
-
getSchemeSpecificPart
-
getAuthority
-
getPath
-
getQuery
-
getFragment
-
normalize
public void normalize()Normalizes the path of this URI if it has one. Normalizing a path means that any unnecessary '.' and '..' segments are removed. For example, the URI http://server.com/a/b/../c/./d would be normalized to http://server.com/a/c/d. A URI doens't have a path if it is opaque. -
resolve
Resolves a relative URI using this URI as the base URI. -
resolve
Resolves a relative URI using this URI as the base URI. -
toString
-
toString
-
clone
-