ModuleAddress (PMII - Principia Mathematica II)
Keywords: com.meyling.principia.module.ModuleAddress class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hilbert II - JAVA-Packages - Principia Mathematica II
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.meyling.principia.module
Class ModuleAddress

    java.lang.Object
      com.meyling.principia.module.ModuleAddress

public class ModuleAddress
extends Object

An object of this class represents an address for a module.

Version:
  $Revision: 1.17 $
Author:
  Michael Meyling

Constructor Summary
`ModuleAddress(ModuleAddress oldAddress, Name name, Version moduleVersion, Version ruleVersion)` Constructor.
`ModuleAddress(String address)` Constructor.
`ModuleAddress(String address, ModuleAddress parent)` Constructor.

Method Summary
`String` | `createRelativeAddress(ModuleAddress reference)` Create relative address from `orgin` to `next`.
`static String` | `createRelativeAddress(String orgin, String next)` Create relative address from `orgin` to `next`.
`boolean` | `equals(Object object)`
`String` | `getAddress()` Get module address.
`String` | `getFileName()` Get name of module including version information and postfix.
`String` | `getGeneratedName()` Transform an URL address into a local file path where a generated module could saved.
`String` | `getGeneratedName(String ending)` Transform an URL address into a local file path where a generated module or document could be saved.
`String` | `getHeader()` Get address header (including protocol, host, port, user) but without file path.
`String` | `getLocalName()` Transform an URL address into a local file path where a module could be buffered.
`static String` | `getLocalName(String address)` Transform an URL address into a local file path where a module could be buffered
`static String` | `getModuleFileName(Specification spec)` Get the file name of the specified module.
`static String` | `getModuleFileName(String address)` Get the file name of an module without path and protokoll.
`(package private) static ModuleAddress[]` | `getModulePaths(Module module, Specification spec)` Get all potential module addresses from a module specifiaction.
`Version` | `getModuleVersion()` Get version of module.
`Name` | `getName()` Get name of module (without version information and postfix).
`String` | `getPath()` Get address path (without protocol, host, port and file name).
`Version` | `getRuleVersion()` Get rule version of module.
`URL` | `getURL()` Get fully qualified URL of module.
`int` | `hashCode()`
`boolean` | `isFileAddress()`
`boolean` | `isRelativeAddress()` Was this module address created relativly?
`static String` | `newEnding(String address, String newEnding)` Get module address with new ending.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ModuleAddress

    public ModuleAddress(String address,
                         ModuleAddress parent)
                  throws IOException

  Constructor.

Parameters:
  `address` - address of module
  `parent` - address of parent module
Throws:
  `IOException` - if address is formaly incorrect

### ModuleAddress

    public ModuleAddress(String address)
                  throws IOException

  Constructor.

Parameters:
  `address` - address of module
Throws:
  `IOException` - if address is formaly incorrect

### ModuleAddress

    public ModuleAddress(ModuleAddress oldAddress,
                         Name name,
                         Version moduleVersion,
                         Version ruleVersion)
                  throws IOException

  Constructor.

Throws:
  `IOException` - if address is formaly incorrect

Method Detail

### getAddress

    public final String getAddress()

  Get module address.

  Returns:
    module address

### getHeader

    public final String getHeader()

  Get address header (including protocol, host, port, user) but without file path.

  Returns:
    address header

### getPath

    public final String getPath()

  Get address path (without protocol, host, port and file name).

  Returns:
    module path

### getFileName

    public final String getFileName()

  Get name of module including version information and postfix.

  Returns:
    module name

### getName

    public final Name getName()

  Get name of module (without version information and postfix).

  Returns:
    module name

### getURL

    public final URL getURL()

  Get fully qualified URL of module.

  Returns:
    module path

### getRuleVersion

    public final Version getRuleVersion()

  Get rule version of module.

  Returns:
    rule version

### getModuleVersion

    public final Version getModuleVersion()

  Get version of module.

  Returns:
    module version

### isRelativeAddress

    public final boolean isRelativeAddress()

  Was this module address created relativly?

  Returns:
    relativly created?

### isFileAddress

    public final boolean isFileAddress()

### getLocalName

    public final String getLocalName()

  Transform an URL address into a local file path where a module could be buffered.

  Returns:
    local file path for that `address`.

### getGeneratedName

    public final String getGeneratedName()

  Transform an URL address into a local file path where a generated module could saved.

  Returns:
    local file path for that `address`.

### getGeneratedName

    public final String getGeneratedName(String ending)

  Transform an URL address into a local file path where a generated module or document could be saved.

  Parameters:
    `ending` - new ending for document
  Returns:
    local file path for that `address`.

### createRelativeAddress

    public final String createRelativeAddress(ModuleAddress reference)

  Create relative address from `orgin` to `next`.

  Parameters:
    `reference` - this should be the next location
  Returns:
    relative (or if neccessary absolute) address

### toString

    public final String toString()

### hashCode

    public final int hashCode()

### equals

    public final boolean equals(Object object)

### getModuleFileName

    public static final String getModuleFileName(Specification spec)

  Get the file name of the specified module.

  Parameters:
    `spec` - here are the (perhaps relative) addresses to another module
  Returns:
    file name of specified module

### getModulePaths

    static final ModuleAddress[] getModulePaths(Module module,
                                                Specification spec)
                                         throws ArgumentException

  Get all potential module addresses from a module specifiaction.

  Parameters:
    `module` - starting from that module (has an absolute address)
    `spec` - here are the (perhaps relative) addresses to another module
  Returns:
    array of absolute address strings
  Throws:
    `ArgumentException` - if an URL is malformed

### getLocalName

    public static final String getLocalName(String address)
                                     throws IOException

  Transform an URL address into a local file path where a module could be buffered

  Parameters:
    `address` - an URL
  Returns:
    local file path for that `address`
  Throws:
    `IOException` - if `address` contains no "://"

### getModuleFileName

    public static final String getModuleFileName(String address)
                                          throws IOException

  Get the file name of an module without path and protokoll.

  Parameters:
    `address` - an URL
  Returns:
    file name of that `address`
  Throws:
    `IOException` - if that was no valid module address

### createRelativeAddress

    public static final String createRelativeAddress(String orgin,
                                                     String next)

  Create relative address from `orgin` to `next`.

  Parameters:
    `orgin` - this is the original location (URL!)
    `next` - this should be the next location (URL!)
  Returns:
    relative (or if neccessary absolute) address

### newEnding

    public static final String newEnding(String address,
                                         String newEnding)

  Get module address with new ending. E.g.: ".html" instead of ".qedeq".

  Parameters:
    `address` - the address of somthing (e.g.: a module)
    `newEnding` - this should be the new ending (e.g.: "html")
  Returns:
    module address with substituted ending

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hilbert II - JAVA-Packages - Principia Mathematica II
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

©left GNU General Public Licence All Rights Reserved.