Packages

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
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. URI
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new URI(scheme: Option[String], authority: Option[String], path: List[String] = Nil, abs: Boolean = false, query: Option[String] = None, fragment: Option[String] = None)

    abs

    true if the path is absolute (ignored if scheme or authority are present)

Value Members

  1. def !/(p: List[String]): URI

    drop path, query, fragment, append (absolute) path

  2. def !/(n: String): URI

    drop path, query, fragment, append (absolute) path of length 1

  3. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def ##(f: String): URI

    drop fragment, append fragment

  5. final def ##(): Int
    Definition Classes
    AnyRef → Any
  6. 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

  7. def /(n: String): URI

    drop query, fragment, append one segment to path

  8. def <=(u: URI): Boolean

    true iff this is a prefix of u

  9. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def ?(q: String): URI

    drop query, fragment, append query

  11. def ^: URI

    drops query and fragment, drop last path segment (if any)

  12. def ^!: URI

    drops query and fragment and path

  13. def absolute: Boolean

    true if the path is absolute

  14. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  15. val authority: Option[String]
  16. def authorityNull: String

    convenience: the authority or null

  17. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  18. def colon(n: String): URI

    drop authority, path, query, fragment, append authority and make path absolute

  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  21. val fragment: Option[String]
  22. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  26. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  27. val path: List[String]
  28. def pathAsString: String

    returns the whole path as a string (/-separated, possibly with a leading /)

  29. def pathNoTrailingSlash: List[String]

    removes an empty trailing segment, which results from a trailing /

  30. val query: Option[String]
  31. def relativize(u: URI): URI

    makes a URI relative to this one

  32. 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)

  33. def resolve(s: String): URI

    parses a URI and resolves it against this

  34. val scheme: Option[String]
  35. def schemeNull: String

    convenience: the scheme or null

  36. def setExtension(ext: String): URI

    changes the (file) extension of the last path segment (if any) to ext extension is added if none exists

  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toJava: java.net.URI

    converts MMT's implementation to Java's (buggy) implementation of URIs

  39. def toString(): String
    Definition Classes
    URI → AnyRef → Any
  40. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped