|
|
Class: HierarchicalURI
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)
Hierarchical URI as defined in RFC2396:
<scheme:[//authority][/absolute_path][?query][#fragment]>
[instance variables:]
[class variables:]
instance creation
-
new
-
-
scheme: aSchemeString fromString: aString
-
parse the hierarchical information.
schemeString is ignored here
accessing
-
authority
-
return the value of the instance variable 'authority' (automatically generated)
-
authority: something
-
set the value of the instance variable 'authority' (automatically generated)
-
baseName
-
-
examples
-
more examples to be added:
[exBegin]
URI fromString:'file:/phys/exept/home/tm/tmp'
[exEnd]
-
fragment
-
return the value of the instance variable 'fragment' (automatically generated)
-
fragment: something
-
set the value of the instance variable 'fragment' (automatically generated)
-
isAbsolute
-
return the value of the instance variable 'isAbsolute' (automatically generated)
-
isDirectory
-
return the value of the instance variable 'isDirectory' (automatically generated)
-
pathSegments
-
return the value of the instance variable 'pathSegments' (automatically generated)
-
pathSegments: something
-
set the value of the instance variable 'pathSegments' (automatically generated)
-
query
-
return the value of the instance variable 'query' (automatically generated)
-
query: something
-
set the value of the instance variable 'query' (automatically generated)
accessing-details
-
host
-
answer the host part of authority
-
password
-
answer the user part of authority
-
port
-
answer the port part of authority
-
user
-
answer the user part of authority
comparing
-
= anHierarchicalUri
-
-
hash
-
copying
-
postCopy
-
defaults
-
defaultPort
-
answer the default port for the given scheme.
Concrete subclasses redefine this method
escape
-
unEscape
-
convert escaped characters (such as %20 for ' ') to their native
representation
initialization
-
fromString: aString
-
-
initialize
-
printing & storing
-
directoryPath
-
answer the directory path part of the URI
-
path
-
answer the path part of the URI
-
printOn: aStream
-
-
printOn: aStream escape: doEscape
-
print the URI on aStream. If doEscape is set, escape special
characters
-
printPathOn: aStream escape: doEscape
-
print the path part
-
publicPrintOn: aStream
-
print, but omit password information
resolution
-
/ aString
-
concatenate aString to my path.
Same as #construct:, but simpler to use
-
addComponent: aString
-
concatenate aString to my path
-
construct: aString
-
concatenate aString to my path
-
directory
-
remove the last path component
-
removeLastComponent
-
remove the last component
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.
|
|