case class URI(scheme: Option[String], authority: Option[String], path: List[String] = Nil, abs: Boolean = false, query: Option[String] = None, fragment: Option[String] = None) extends Product with Serializable
Custom implementation of the URI RFC that's better than java.net.URI
- abs
true if the path is absolute (ignored if scheme or authority are present)
- Source
- URI.scala
- Alphabetic
- By Inheritance
- URI
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
def
!/(p: List[String]): URI
drop path, query, fragment, append (absolute) path
-
def
!/(n: String): URI
drop path, query, fragment, append (absolute) path of length 1
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
##(f: String): URI
drop fragment, append fragment
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
/(p: List[String]): URI
drop query, fragment, append to path path stays relative/absolute; but URI(_, Some(_), Nil, false, _, _) / _ turns path absolute trailing empty segment of this URI is dropped when appending
-
def
/(n: String): URI
drop query, fragment, append one segment to path
-
def
<=(u: URI): Boolean
true iff this is a prefix of u
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
?(q: String): URI
drop query, fragment, append query
-
def
^: URI
drops query and fragment, drop last path segment (if any)
-
def
^!: URI
drops query and fragment and path
-
def
absolute: Boolean
true if the path is absolute
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- val authority: Option[String]
-
def
authorityNull: String
convenience: the authority or null
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
colon(n: String): URI
drop authority, path, query, fragment, append authority and make path absolute
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- val fragment: Option[String]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val path: List[String]
-
def
pathAsString: String
returns the whole path as a string (/-separated, possibly with a leading /)
-
def
pathNoTrailingSlash: List[String]
removes an empty trailing segment, which results from a trailing /
- val query: Option[String]
-
def
relativize(u: URI): URI
makes a URI relative to this one
-
def
resolve(u: URI): URI
resolves a URI against this one (not using the java.net.URI resolution algorithm, which is buggy when u has no scheme, authority, path)
-
def
resolve(s: String): URI
parses a URI and resolves it against this
- val scheme: Option[String]
-
def
schemeNull: String
convenience: the scheme or null
-
def
setExtension(ext: String): URI
changes the (file) extension of the last path segment (if any) to ext extension is added if none exists
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toJava: java.net.URI
converts MMT's implementation to Java's (buggy) implementation of URIs
-
def
toString(): String
- Definition Classes
- URI → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()