|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnl.uva.vlet.vrs.VNode
nl.uva.vlet.vrs.ResourceNode
nl.uva.vlet.vrs.LinkNode
public class LinkNode
The LinkNode class which represents a link or a remote resource.
This class is NOT intended as a unix softlink (very bug prone), but more as
a windows shortcut object !
At the VRS/VFS level a 'saved' LinkNode appears as .vlink file and
will be regarded as a file.
The GUI can both handle a '.vlink' file AND the LinkNode object.
In the latter case the .vlink file has been 'loaded' and is of type 'Link'.
This object has custom settings which can overide (default) VRS/VFS methods.
Current implementation is to store a LinkNode as a java properties file.
Field Summary |
---|
Fields inherited from class nl.uva.vlet.vrs.ResourceNode |
---|
ATTR_LINK_IS_COMPOSITE, ATTR_LINK_MIMETYPE, default_show_shortcut_icon, guiAttributeNames, parent, resourceAttributes, SERVER_ATTRIBUTES, serverAttributeNames, storageLocation, type, urlAttributeNames |
Fields inherited from class nl.uva.vlet.vrs.VNode |
---|
ATTR_CHARSET, ATTR_HOSTNAME, ATTR_ICON, ATTR_ISVLINK, ATTR_LOCATION, ATTR_MIMETYPE, ATTR_NAME, ATTR_PATH, ATTR_PORT, ATTR_SCHEME, ATTR_TYPE, location, vrsContext |
Constructor Summary | |
---|---|
protected |
LinkNode(VRSContext context)
Private constructor |
Method Summary | |
---|---|
LinkNode |
clone()
|
static LinkNode |
createLinkNode(VRSContext context,
VRL logicalLocation,
VRL targetVRL)
Creates new LinkNode object with logical location and specified linkTarget. |
static LinkNode |
createLinkNode(VRSContext context,
VRL logicalLocation,
VRL targetVRL,
boolean resolve)
|
static LinkNode |
createLinkTo(VRL parentLoc,
java.lang.String name,
VNode target)
Main method to create a new LinkNode stored in parentLoc with name 'name' and with linkTarget the specified VNode target |
LinkNode |
duplicate()
|
VRL |
getLinkTarget()
|
java.lang.String |
getType()
Returns resource type, if it has one |
boolean |
isVLink()
Returns true if the EXTENSION equals '.vlink', this node might not be of type LinkNode. |
static LinkNode |
loadFrom(VRSContext context,
VNode vnode)
Resolves a (stored) LinkNode. |
static LinkNode |
loadFrom(VRSContext context,
VRL loc)
Load ResourceNode but return as LinkNode ! |
void |
saveAtLocation(VComposite parent,
java.lang.String newName)
Store Link node |
void |
setLinkTarget(VRL linkTarget)
|
Methods inherited from class nl.uva.vlet.vrs.VNode |
---|
compareTo, getAttributes, getAttributes, getAttributeSet, getBasename, getCharSet, getHelp, getHostname, getID, getLocation, getMimeType, getParents, getPath, getPort, getScheme, getServerAttributes, getURI, getVRL, getVRSContext, isComposite, mergedGetAttributes, setLocation, setVRL, toLinkNode, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected LinkNode(VRSContext context)
Method Detail |
---|
public void setLinkTarget(VRL linkTarget)
public LinkNode duplicate()
public LinkNode clone()
clone
in class java.lang.Object
public java.lang.String getType()
VNode
getType
in class ResourceNode
public boolean isVLink()
VNode
isVLink
in class VNode
LinkNode
,
VNode.toLinkNode()
public void saveAtLocation(VComposite parent, java.lang.String newName) throws VlException
VlException
public static LinkNode createLinkTo(VRL parentLoc, java.lang.String name, VNode target) throws VlException
VlException
public static LinkNode createLinkNode(VRSContext context, VRL logicalLocation, VRL targetVRL) throws VlException
logicalLocation
- linkTarget
-
VlException
public static LinkNode createLinkNode(VRSContext context, VRL logicalLocation, VRL targetVRL, boolean resolve) throws VlException
VlException
public static LinkNode loadFrom(VRSContext context, VRL loc) throws VlException
VlException
public static LinkNode loadFrom(VRSContext context, VNode vnode) throws VlException
vnode
- the VNode to resolve the LinkNode from
VlException
#load(VNode)
public VRL getLinkTarget() throws VlException
VlException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |