Database Reference
In-Depth Information
Host
In Milton, the
Host
object holds all of the details needed to make connections to
the WebDAV server. To access eXist, at minimum you will need to provide:
Server
The hostname or IP address of the eXist server that you wish to connect to.
If you are running your WebDAV client on the same machine as eXist, then
you may use either
localhost
or
127.0.0.1
.
Port
The TCP port that the eXist server you wish to connect to is listening on. If
you have not reconfigured this setting in eXist, it will be
8080
by default.
RootPath
The path on the eXist server to the WebDAV server endpoint. If you have
not reconfigured this setting in eXist, it will be
exist/webdav/db
by default.
Username
The username of a valid user account in eXist that you wish to connect to
eXist as. If you have a newly installed eXist, you may use the
admin
account.
Password
The password that accompanies the aforementioned username. If you are
using the
admin
account of a newly installed eXist, the password will be
whatever you defined during the installation, or otherwise the empty string.
Milton provides a convenient
HostBuilder
class to help you construct your host
(see
Example 13-1
).
Example 13-1. Constructing a suitable Milton Host object for eXist
HostBuilder
builder
=
new
HostBuilder
();
builder
.
setServer
(
"localhost"
);
builder
.
setPort
(
8080
);
builder
.
setRootPath
(
"exist/webdav/db"
);
builder
.
setUser
(
"admin"
);
builder
.
setPassword
(
"my-admin-password "
);
Host
host
=
builder
.
buildHost
();
Resource
In Milton, the
Resource
object represents a resource on the WebDAV server. In
Milton terms, this is one of the following:
Folde
A
folder
resource in Milton is equivalent to a collection in eXist.
Search WWH ::
Custom Search