eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'PackageId':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: PackageId


Inheritance:

   Object
   |
   +--PackageId

Package:
stx:libbasic
Category:
System-Support-Projects
Version:
rev: 1.30 date: 2015/08/24 12:57:16
user: stefan
file: PackageId.st directory: libbasic
module: stx stc-classLibrary: libbasic

Description:


Represents packageID's.
Knows the relationship between modules and directories in the package-organization.


Class protocol:

defaults
o  noProjectID
return the symbol used to tag classes and methods which are loose.
This means: not yet assigned to a particular project.

instance creation
o  from: aStringOrSymbol
(self from:'stx:libbasic') module
(self from:'stx:libbasic') directory

o  module: moduleString directory: directoryString
(PackageId module:'stx' directory:'libbasic') module
(PackageId module:'stx' directory:'libbasic') directory


Instance protocol:

accessing
o  directory
return the directory component. That's the rest after the colon.
The module is typically used to define the project-path or project-id within its
sourcecode repository (which is selected via the module).
usage example(s):
     (PackageId from:'stx:libbasic') module
     (PackageId from:'stx:libbasic') directory
     (PackageId from:'stx') module
     (PackageId from:'stx') directory
     (PackageId from:'stx:goodies/xml/stx') module
     (PackageId from:'stx:goodies/xml/stx') directory

o  module
return the module component. That's the first component up to the colon.
The module is typically used to select a corresponding sourcecode repository.
usage example(s):
     (PackageId from:'stx:libbasic') module
     (PackageId from:'stx:libbasic') directory

o  module: moduleString directory: directoryString
(self new module:'stx' directory:'libbasic') module
(self new module:'stx' directory:'libbasic') directory
(self new module:'stx' directory:'goodies/net') module
(self new module:'stx' directory:'goodies/net') directory
(self new module:'stx' directory:'goodies\net') module
(self new module:'stx' directory:'goodies\net') directory

o  packageIdString: aString
the required format is:
module:path
where path is a unix-like path (i.e. containing slashes).
However, for our convenience, also allow for
module/path
and even:
module\ms-dos-path
and convert them as required.
This makes it easier on a doit, by copy-pasting port of a path into a loadPackage
expression

o  string

comparing
o  = aPackageId
compares equal to a corresponding string
usage example(s):
     'stx:libbasic' asPackageId = 'stx:libbasic'
     'stx:libbasic' asPackageId = 'stx:libbasic' asSymbol asPackageId
     'stx:libbasic' asPackageId = 'stx:libbasic' asPackageId
     'stx:libbasic2' asPackageId = 'stx:libbasic3' asPackageId

o  hash
(comment from inherited method)
return an Integer useful as a hash key for the receiver.
This hash should return same values for objects with same
contents (i.e. use this to hash on structure)

converting
o  asPackageId

o  asString

o  asSymbol

printing
o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

queries
o  isModuleId
true if this is a module-id only (i.e. no directory component present).
These are not allowed to be used as real projects, but only for organization.
The reason is that this is used as selector to select the sourceCodeManager and
also the manager's repository

o  libraryName
return the name of the library, when compiled to a binary (i.e. dll/so).
To avoid conflicts with the projectDefinition class
(which is named <module>_<directory_components>), we prefix the library name
with 'lib'. This has the added advantage, that under unix, linking can be done with
'-l'shortName.
usage example(s):
     (PackageId from:'stx:libbasic') libraryName
     (PackageId from:'stx:goodies/xml/stx') libraryName
     (PackageId from:'bosch:dapasx') libraryName
     (PackageId from:'exept:expecco') libraryName

o  packageDirectory
return the pathName of the directory for this package in the file system
usage example(s):
     'stx:libbasic2' asPackageId packageDirectory

o  parentPackage
(PackageId from:'stx:libbasic') parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage
(PackageId from:'stx:goodies/xml/stx') parentPackage parentPackage parentPackage

o  pathRelativeToTopDirectory
'stx:libbasic' asPackageId pathRelativeToTopDirectory
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory
'bosch:dapasx' asPackageId pathRelativeToTopDirectory

o  pathRelativeToTopDirectory: aDirectory
|top|

top := Smalltalk packagePath first.
'stx:goodies/net/ssl' asPackageId pathRelativeToTopDirectory:top

o  projectDefinitionClass
return the project definition for this package.
Eg. for 'stx:libbasic', this would return the stx_libbasic project definition class.
usage example(s):
     'stx:libbasic' asPackageId projectDefinitionClass
     'exept/expecco/foo' asPackageId projectDefinitionClass
     'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClass
     'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClass
     'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClass
     'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClass

o  projectDefinitionClassName
'stx:libbasic' asPackageId projectDefinitionClassName
'exept/expecco/foo' asPackageId projectDefinitionClassName
'exept/expecco/plugin/manualTest' asPackageId projectDefinitionClassName
'exept:expecco/plugin/manualTest' asPackageId projectDefinitionClassName
'exept_expecco_plugin_manualTest' asPackageId projectDefinitionClassName
'exept/expecco/plugin/edi-edifact' asPackageId projectDefinitionClassName

o  projectDirectory
replace by:

** This is an obsolete interface - do not use it (it may vanish in future versions) **



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 24 Sep 2018 21:20:27 GMT