|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qedeq.kernel.se.common.DefaultModuleAddress
public class DefaultModuleAddress
An object of this class represents an address for a QEDEQ module.
Field Summary | |
---|---|
static DefaultModuleAddress |
MEMORY
Default memory module address with identifier "default". |
Constructor Summary | |
---|---|
DefaultModuleAddress()
Default constructor for memory modules. |
|
DefaultModuleAddress(boolean memory,
java.lang.String identifier)
Constructor mainly used for memory modules. |
|
DefaultModuleAddress(java.io.File file)
Constructor. |
|
DefaultModuleAddress(java.lang.String u)
Constructor. |
|
DefaultModuleAddress(java.lang.String address,
ModuleAddress parent)
Constructor. |
|
DefaultModuleAddress(java.net.URL u)
Constructor. |
Method Summary | |
---|---|
ModuleContext |
createModuleContext()
Get module address as ModuleContext . |
static java.lang.String |
createRelative(java.lang.String org,
java.lang.String nex)
Create relative address. |
static java.lang.String |
createRelativeAddress(java.lang.String origin,
java.lang.String next)
Create relative address from origin to next . |
boolean |
equals(java.lang.Object object)
|
java.lang.String |
getFileName()
Get module file name. |
java.lang.String |
getHeader()
Get address header (including protocol, host, port, user) but without file path. |
ModuleAddress[] |
getModulePaths(Specification spec)
Get all potential module addresses from a module specification. |
java.lang.String |
getName()
Get name of module (file name without .xml ). |
java.lang.String |
getPath()
Get address path (without protocol, host, port and file name). |
java.lang.String |
getUrl()
Get fully qualified URL of module. |
int |
hashCode()
|
boolean |
isFileAddress()
Is this a local QEDEQ file. |
boolean |
isRelativeAddress()
Was this module address created relatively? |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final DefaultModuleAddress MEMORY
Constructor Detail |
---|
public DefaultModuleAddress(java.lang.String u) throws java.net.MalformedURLException
u
- Address of module. Must not be null
.
Must be a URL with protocol "file" or "http" and address a file
with extension ".xml".
java.net.MalformedURLException
- Address is formally incorrect.public DefaultModuleAddress(java.net.URL u) throws java.net.MalformedURLException
u
- Address of module. Must not be null
.
Must be a URL with protocol "file" or "http" and address a file
with extension ".xml".
java.net.MalformedURLException
- Address is formally incorrect.public DefaultModuleAddress(java.io.File file) throws java.io.IOException
file
- File path of module. Must address a file
with extension ".xml".
java.io.IOException
- Problem with file location.public DefaultModuleAddress()
public DefaultModuleAddress(boolean memory, java.lang.String identifier)
memory
- Must be true. If not a runtime exception occurs.identifier
- Identifies the module in memory. Must not be null
.public DefaultModuleAddress(java.lang.String address, ModuleAddress parent) throws java.net.MalformedURLException
address
- Address of module. Must not be null
.
Must be a URL with protocol "file" or "http" (if parent
is
null
) and address a file
with extension ".xml".parent
- Address of parent module. Can be null
.
java.net.MalformedURLException
- Address is formally incorrect.Method Detail |
---|
public ModuleContext createModuleContext()
ModuleContext
. Creates a new object.
createModuleContext
in interface ModuleAddress
ModuleContext
.public java.lang.String getHeader()
getHeader
in interface ModuleAddress
public java.lang.String getPath()
getPath
in interface ModuleAddress
public java.lang.String getFileName()
getFileName
in interface ModuleAddress
public java.lang.String getName()
.xml
).
getName
in interface ModuleAddress
public java.lang.String getUrl()
getUrl
in interface ModuleAddress
public boolean isRelativeAddress()
isRelativeAddress
in interface ModuleAddress
public boolean isFileAddress()
file:
.
isFileAddress
in interface ModuleAddress
public final java.lang.String toString()
toString
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public final boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public final ModuleAddress[] getModulePaths(Specification spec) throws java.io.IOException
ModuleAddress
getModulePaths
in interface ModuleAddress
spec
- Here are the (perhaps relative) addresses to
another module.
java.io.IOException
- One address is not correctly formed.public static final java.lang.String createRelativeAddress(java.lang.String origin, java.lang.String next)
origin
to next
.
If both addresses point to the same file we return "".
origin
- This is the original location (URL!).next
- This should be the next location (URL!).
public static java.lang.String createRelative(java.lang.String org, java.lang.String nex)
org
- This is the original location.nex
- This should be the next location.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |