@Service(value=java.lang.Object.class) @Property(name="javax.ws.rs", boolValue=true) public class WebAccess extends Object
Constructor and Description |
---|
WebAccess() |
Modifier and Type | Method and Description |
---|---|
TripleCollection |
getTriples(UriRef name)
Gets the TripleCollection with specified name
|
InputStream |
getUploadForm() |
javax.ws.rs.core.Response |
postTriples(MultiPartBody form,
javax.ws.rs.core.UriInfo uriInfo)
Posts triples to be placed into an
MGraph of the specified name. |
void |
putTriples(UriRef name,
TripleCollection triples)
Puts the triples replacing the triples of the existing MGraph with the
specified name.
|
public TripleCollection getTriples(UriRef name)
name
- public void putTriples(UriRef name, TripleCollection triples)
MGraph
with the specified name and puts the triplesname
- triples
- public javax.ws.rs.core.Response postTriples(MultiPartBody form, @Context javax.ws.rs.core.UriInfo uriInfo)
MGraph
of the specified name.
If an MGraph
with this name doesn't already exist, a new one
is created and filled with the triples posted.form
- a multipart/form-data consisting of:
- a FormFile
labeled "graph" containing the triples and
the mime-type.
- a text field labeled "name" specifying the name of the MGraph.
- an optional text field labeled "mode" specifying the mode.
If the mode is "replace", existing triples of the MGraph will be
deleted before new triples are added. If the mode is not
specified or is "append", posted triples are added to the MGraph.
- an optional text field labeled "redirection" specifying an URI
which the client should be redirected to in case of success.Response
. A response with status code BAD REQUEST (400) is
returned if the required data are missing. If the request can be
satisfied, one of the following responses is returned:
- SEE OTHER (303), if redirection is specified.
- CREATED (201), if redirection is not specified and a new
MGraph
is created.
- NO CONTENT (204), if redirection is not specified and no new
MGraph
is created.public InputStream getUploadForm()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.