public class VfsResourceReference extends AbstractResourceReference
Modifier and Type | Field and Description |
---|---|
static ResourceType |
TYPE
Represents a VFS Resource Type.
|
Constructor and Description |
---|
VfsResourceReference(URI fullURI) |
VfsResourceReference(URI uri,
List<String> pathSegments) |
VfsResourceReference(URI uri,
String pathSegments) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object object) |
String |
getPath() |
List<String> |
getPathSegments() |
URI |
getURI() |
int |
hashCode() |
String |
toString() |
URI |
toURI() |
addParameter, getParameters, getParameterValue, getParameterValues, getType, setType
public static final ResourceType TYPE
public VfsResourceReference(URI uri, List<String> pathSegments)
uri
- the URI pointing to the archive (without the path inside the archive),
e.g. attach:space.page@attachment
pathSegments
- see getPathSegments()
public VfsResourceReference(URI uri, String pathSegments)
uri
- the URI pointing to the archive (without the path inside the archive),
e.g. attach:space.page@attachment
pathSegments
- see getPathSegments()
, specified as "/"-separated string (e.g. "path/to/file")public VfsResourceReference(URI fullURI)
fullURI
- the full opaque URI containing both the reference to the archive and the path to the entry inside
it, e.g. attach:space.page@attachment/path/to/file
. Note that this constructor requires that any
"/" character inside the reference to the archive be URL-encodedpublic URI getURI()
attach:space.page@file.zip
, http://server/path/to/zip
)public List<String> getPathSegments()
{"some",
"directory", "file.txt"}
for some/directory/file.txt
public String getPath()
some/directory/file.txt
public int hashCode()
hashCode
in class AbstractResourceReference
public boolean equals(Object object)
equals
in class AbstractResourceReference
public String toString()
toString
in class AbstractResourceReference
public URI toURI()
Copyright © 2004–2017 XWiki. All rights reserved.