eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HierarchicalURI':

Home

everywhere
www.exept.de
for:
[back]

Class: HierarchicalURI


Inheritance:

   Object
   |
   +--URI
      |
      +--HierarchicalURI
         |
         +--FileURI
         |
         +--FtpURI
         |
         +--HttpURI

Package:
stx:libbasic2
Category:
Net-Resources
Version:
rev: 1.15 date: 2008/05/15 13:32:05
user: mb
file: HierarchicalURI.st directory: libbasic2
module: stx stc-classLibrary: libbasic2
Author:
Stefan Vogel (stefan@zwerg)

Description:


Hierarchical URI as defined in RFC2396:

<scheme:[//authority][/absolute_path][?query][#fragment]>



[instance variables:]

[class variables:]


Related information:



Class protocol:

instance creation
o  new

o  scheme: aSchemeString fromString: aString
parse the hierarchical information.
schemeString is ignored here


Instance protocol:

accessing
o  authority
return the value of the instance variable 'authority' (automatically generated)

o  authority: something
set the value of the instance variable 'authority' (automatically generated)

o  baseName

o  examples
more examples to be added:
[exBegin]
URI fromString:'file:/phys/exept/home/tm/tmp'
[exEnd]

o  fragment
return the value of the instance variable 'fragment' (automatically generated)

o  fragment: something
set the value of the instance variable 'fragment' (automatically generated)

o  isAbsolute
return the value of the instance variable 'isAbsolute' (automatically generated)

o  isDirectory
return the value of the instance variable 'isDirectory' (automatically generated)

o  pathSegments
return the value of the instance variable 'pathSegments' (automatically generated)

o  pathSegments: something
set the value of the instance variable 'pathSegments' (automatically generated)

o  query
return the value of the instance variable 'query' (automatically generated)

o  query: something
set the value of the instance variable 'query' (automatically generated)

accessing-details
o  host
answer the host part of authority

o  password
answer the user part of authority

o  port
answer the port part of authority

o  user
answer the user part of authority

comparing
o  = anHierarchicalUri

o  hash

copying
o  postCopy

defaults
o  defaultPort
answer the default port for the given scheme.
Concrete subclasses redefine this method

escape
o  unEscape
convert escaped characters (such as %20 for ' ') to their native
representation

initialization
o  fromString: aString

o  initialize

printing & storing
o  directoryPath
answer the directory path part of the URI

o  path
answer the path part of the URI

o  printOn: aStream

o  printOn: aStream escape: doEscape
print the URI on aStream. If doEscape is set, escape special
characters

o  printPathOn: aStream escape: doEscape
print the path part

o  publicPrintOn: aStream
print, but omit password information

resolution
o  / aString
concatenate aString to my path.
Same as #construct:, but simpler to use

o  addComponent: aString
concatenate aString to my path

o  construct: aString
concatenate aString to my path

o  directory
remove the last path component

o  removeLastComponent
remove the last component


Examples:


more examples to be added:


  |u1 u2|

  u1 := URI fromString:'file:/phys/exept/tmp/'.
  u2 := u1 construct:'test.txt'.
  Transcript showCR:u1.
  Transcript showCR:u2.


  |u1 u2|

  u1 := URI fromString:'file:/phys/exept/tmp'.
  u2 := u1 construct:'test.txt'.
  Transcript showCR:u1.
  Transcript showCR:u2.


ST/X 6.1.1; WebServer 1.620 at exept:8081; Wed, 23 May 2012 19:20:55 GMT