public class HttpXmlFileServerClient extends Object implements XmlFileServer
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_BAD_REQUEST |
static int |
STATUS_MODEL_ALREADY_EXISTS |
static int |
STATUS_MODEL_DELIVERED |
static int |
STATUS_MODEL_WRITTEN |
static int |
STATUS_NOT_FOUND |
static int |
STATUS_SERVER_ERROR |
URL_ENCODING
Constructor and Description |
---|
HttpXmlFileServerClient(URI xmlFileServer) |
Modifier and Type | Method and Description |
---|---|
boolean |
exist(URI model)
Checks if the model referenced by the URI exits and is available
|
boolean |
isResolvableUri(URI model)
Checks if the URI is resolvable by the FileServer.
|
URI |
pushModel(String modelId,
String versionId,
InputStream modelSource)
Pushes a new model (-Version) into the storage.
|
URI |
pushModel(String repositoryUrl,
String filePath,
String versionId,
InputStream modelSource)
Pushes a new model (-Version) into the storage.
|
URI |
pushModel(String modelId,
String versionId,
String repositoryUrl,
String filePath,
InputStream modelSource)
Pushes a new model (-Version) into the storage.
|
InputStream |
resolveModelUri(URI model)
Resolves the model URI and returns the modelSource
|
public static final int STATUS_NOT_FOUND
public static final int STATUS_MODEL_ALREADY_EXISTS
public static final int STATUS_BAD_REQUEST
public static final int STATUS_SERVER_ERROR
public static final int STATUS_MODEL_WRITTEN
public static final int STATUS_MODEL_DELIVERED
public HttpXmlFileServerClient(URI xmlFileServer)
public InputStream resolveModelUri(URI model) throws ModelNotFoundException, UnsupportedUriException, XmlFileServerProtocollException, IOException
XmlFileServer
resolveModelUri
in interface XmlFileServer
model
- URINULL
if URI not foundUnsupportedUriException
XmlFileServerProtocollException
IOException
ModelNotFoundException
public boolean exist(URI model) throws UnsupportedUriException, IOException, XmlFileServerProtocollException
XmlFileServer
exist
in interface XmlFileServer
UnsupportedUriException
IOException
XmlFileServerProtocollException
public boolean isResolvableUri(URI model)
XmlFileServer
isResolvableUri
in interface XmlFileServer
public URI pushModel(String modelId, String versionId, InputStream modelSource) throws IOException, UnsupportedUriException, XmlFileServerProtocollException, ModelAlreadyExistsException, XmlFileServerBadRequestException
XmlFileServer
null
if failed.pushModel
in interface XmlFileServer
IOException
UnsupportedUriException
XmlFileServerProtocollException
ModelAlreadyExistsException
XmlFileServerBadRequestException
public URI pushModel(String repositoryUrl, String filePath, String versionId, InputStream modelSource) throws IOException, UnsupportedUriException, XmlFileServerProtocollException, ModelAlreadyExistsException, XmlFileServerBadRequestException
XmlFileServer
null
if failed.
The modelId will be generated from the server, as well as the model URIpushModel
in interface XmlFileServer
IOException
UnsupportedUriException
XmlFileServerProtocollException
ModelAlreadyExistsException
XmlFileServerBadRequestException
public URI pushModel(String modelId, String versionId, String repositoryUrl, String filePath, InputStream modelSource) throws UnsupportedUriException, XmlFileServerProtocollException, IOException, ModelAlreadyExistsException, XmlFileServerBadRequestException
XmlFileServer
null
if failed. pushModel
in interface XmlFileServer
UnsupportedUriException
XmlFileServerProtocollException
IOException
ModelAlreadyExistsException
XmlFileServerBadRequestException
Copyright © 2013 SEMS (Simulation Experiment Management for Systems Biology). All rights reserved.