@Controller
@RequestMapping(value="/")
public class LinkedDataWebController
extends java.lang.Object
4.1.13 LDPR server responses must contain accurate response ETag header values.
add dcterms:modified and dcterms:creator
4.4 HTTP PUT - we don't support that. especially: 4.4.1 If HTTP PUT is performed ... (we do that using the owner protocol)
4.4.2 LDPR clients should use the HTTP If-Match header and HTTP ETags to ensure ...
4.5 HTTP DELETE - we don't support that.
4.6 HTTP HEAD - do we support that?
4.7 HTTP PATCH - we don't support that.
4.8 Common Properties - use common properties!!
5.1.2 Retrieving Only Non-member Properties - not supported (would have to be changed in LinkedDataServiceImpl
see 5.3.2 LDPC - send 404 when non-member-properties is not supported...
5.3.3 first page request: if a Request-URI of “
5.3.4 support the firstPage query param
5.3.5 server initiated paging is a good idea (see 5.3.5.1 )
5.3.7 ordering
| Constructor and Description |
|---|
LinkedDataWebController() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.HttpHeaders |
addExpiresHeadersBasedOnRequestURI(org.springframework.http.HttpHeaders headers,
java.lang.String requestUri)
If the request URI is the URI of a list page (list of needs, list of
connections), or a need uri, it gets the header that says 'already expired' so that crawlers
re-download these data.
|
java.lang.String |
getNodeResourceURIPrefix() |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
listConnectionURIs(javax.servlet.http.HttpServletRequest request,
java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String timestamp,
java.lang.String modifiedAfter,
boolean deep) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
listNeedURIs(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String modifiedAfter,
java.lang.String state) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readAttachment(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readConnection(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readConnectionEvents(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier,
java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String type,
boolean deep) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readConnectionsOfNeed(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier,
boolean deep,
java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String type,
java.lang.String timestamp)
Get the RDF for the connections of the specified need.
|
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readEvent(java.lang.String identifier,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This request URL should be protected by WebID filter because the result
contains events data - which is data with restricted access.
|
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readNeed(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readNeedDeep(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier,
java.lang.Integer layerSize)
This request URL should be protected by WebID filter because the result
contains events data - which is data with restricted access.
|
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readNode(javax.servlet.http.HttpServletRequest request) |
org.springframework.http.ResponseEntity<org.apache.jena.rdf.model.Model> |
readUnreadInformationGet(java.lang.String identifier,
java.util.List<java.net.URI> lastSeenMessageUris) |
org.springframework.http.ResponseEntity<org.apache.jena.rdf.model.Model> |
readUnreadInformationPost(java.lang.String identifier,
java.util.List<java.net.URI> lastSeenMessageUris) |
org.springframework.http.ResponseEntity<java.lang.String> |
redirectToData(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
If the HTTP 'Accept' header is an RDF MIME type (as listed in the 'produces'
value of the RequestMapping annotation), a redirect to a data uri is sent.
|
org.springframework.http.ResponseEntity<java.lang.String> |
redirectToPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
If the HTTP 'Accept' header is 'text/html' (as listed in the 'produces' value
of the RequestMapping annotation), a redirect to a page uri is sent.
|
org.springframework.http.ResponseEntity<java.lang.String> |
register(java.lang.String registeredType,
javax.servlet.http.HttpServletRequest request) |
void |
setConnectionResourceURIPath(java.lang.String connectionResourceURIPath) |
void |
setConnectionResourceURIPrefix(java.lang.String connectionResourceURIPrefix) |
void |
setDataURIPrefix(java.lang.String dataURIPrefix) |
void |
setLinkedDataService(LinkedDataService linkedDataService) |
void |
setNeedResourceURIPath(java.lang.String needResourceURIPath) |
void |
setNeedResourceURIPrefix(java.lang.String needResourceURIPrefix) |
void |
setNodeResourceURIPrefix(java.lang.String nodeResourceURIPrefix) |
void |
setPageURIPrefix(java.lang.String pageURIPrefix) |
void |
setRegistrationServer(RegistrationServer registrationServer) |
void |
setResourceURIPrefix(java.lang.String resourceURIPrefix) |
void |
setResponseHeaders(javax.servlet.http.HttpServletResponse response,
org.springframework.http.HttpHeaders headers) |
void |
setUriService(URIService uriService) |
java.lang.String |
showAttachmentPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showConnectionEventsPage(java.lang.String identifier,
java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String type,
boolean deep,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showConnectionPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showConnectionURIListPage(java.lang.Integer page,
boolean deep,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String timestamp,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showConnectionURIListPage(java.lang.String identifier,
java.lang.Integer page,
boolean deep,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String type,
java.lang.String timestamp,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showDeepNeedPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response,
java.lang.Integer layerSize)
This request URL should be protected by WebID filter because the result
contains events data - which is data with restricted access.
|
java.lang.String |
showEventPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
This request URL should be protected by WebID filter because the result
contains events data - which is data with restricted access.
|
java.lang.String |
showIndexPage() |
java.lang.String |
showNeedPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showNeedURIListPage(java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String state,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showNodeInformationPage(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
@RequestMapping(value="/",
method=GET)
public java.lang.String showIndexPage()
@RequestMapping(value="${uri.path.page.need}/{identifier}")
public java.lang.String showNeedPage(@PathVariable
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.need}/{identifier}/deep")
public java.lang.String showDeepNeedPage(@PathVariable
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="layer-size",required=false)
java.lang.Integer layerSize)
identifier - model - response - @RequestMapping(value="${uri.path.page.connection}/{identifier}")
public java.lang.String showConnectionPage(@PathVariable
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.connection}/{identifier}/events")
public java.lang.String showConnectionEventsPage(@PathVariable
java.lang.String identifier,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="type",required=false)
java.lang.String type,
@RequestParam(value="deep",required=false,defaultValue="false")
boolean deep,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.event}/{identifier}")
public java.lang.String showEventPage(@PathVariable(value="identifier")
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
identifier - model - response - @RequestMapping(value="${uri.path.page.attachment}/{identifier}")
public java.lang.String showAttachmentPage(@PathVariable(value="identifier")
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.need}")
public java.lang.String showNeedURIListPage(@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="state",required=false)
java.lang.String state,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
java.io.IOException@RequestMapping(value="${uri.path.page}")
public java.lang.String showNodeInformationPage(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.connection}")
public java.lang.String showConnectionURIListPage(@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="deep",defaultValue="false")
boolean deep,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="timeof",required=false)
java.lang.String timestamp,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.need}/{identifier}/connections")
public java.lang.String showConnectionURIListPage(@PathVariable
java.lang.String identifier,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="deep",defaultValue="false")
boolean deep,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="type",required=false)
java.lang.String type,
@RequestParam(value="timeof",required=false)
java.lang.String timestamp,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.resource}/**",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads","*/*"})
public org.springframework.http.ResponseEntity<java.lang.String> redirectToData(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
request - java.io.IOExceptionpublic void setResponseHeaders(javax.servlet.http.HttpServletResponse response,
org.springframework.http.HttpHeaders headers)
@RequestMapping(value="${uri.path.resource}/**",
method=GET,
produces="text/html")
public org.springframework.http.ResponseEntity<java.lang.String> redirectToPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
request - java.io.IOExceptionpublic org.springframework.http.HttpHeaders addExpiresHeadersBasedOnRequestURI(org.springframework.http.HttpHeaders headers,
java.lang.String requestUri)
headers - requestUri - @RequestMapping(value="${uri.path.data.need}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> listNeedURIs(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="modifiedafter",required=false)
java.lang.String modifiedAfter,
@RequestParam(value="state",required=false)
java.lang.String state)
throws java.io.IOException,
java.text.ParseException
java.io.IOExceptionjava.text.ParseException@RequestMapping(value="${uri.path.data.connection}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> listConnectionURIs(javax.servlet.http.HttpServletRequest request,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="timeof",required=false)
java.lang.String timestamp,
@RequestParam(value="modifiedafter",required=false)
java.lang.String modifiedAfter,
@RequestParam(value="deep",defaultValue="false")
boolean deep)
@RequestMapping(value="${uri.path.data.need}/{identifier}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readNeed(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier)
@RequestMapping(value="${uri.path.data.need}/{identifier}/unread",
method=POST,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.rdf.model.Model> readUnreadInformationPost(@PathVariable(value="identifier")
java.lang.String identifier,
@RequestParam(value="lastSeenMessageUris",required=false)
java.util.List<java.net.URI> lastSeenMessageUris)
@RequestMapping(value="${uri.path.data.need}/{identifier}/unread",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.rdf.model.Model> readUnreadInformationGet(@PathVariable(value="identifier")
java.lang.String identifier,
@RequestParam(value="lastSeenMessageUris",required=false)
java.util.List<java.net.URI> lastSeenMessageUris)
@RequestMapping(value="${uri.path.data.need}/{identifier}/deep",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readNeedDeep(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier,
@RequestParam(value="layer-size",required=false)
java.lang.Integer layerSize)
request - identifier - @RequestMapping(value="${uri.path.data}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readNode(javax.servlet.http.HttpServletRequest request)
@RequestMapping(value="${uri.path.data.connection}/{identifier}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readConnection(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier)
@RequestMapping(value="${uri.path.data.connection}/{identifier}/events",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readConnectionEvents(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="type",required=false)
java.lang.String type,
@RequestParam(value="deep",required=false,defaultValue="false")
boolean deep)
@RequestMapping(value="${uri.path.data.event}/{identifier}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readEvent(@PathVariable(value="identifier")
java.lang.String identifier,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
request - identifier - @RequestMapping(value="${uri.path.data.attachment}/{identifier}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads","*/*"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readAttachment(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier)
@RequestMapping(value="${uri.path.data.need}/{identifier}/connections",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readConnectionsOfNeed(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier,
@RequestParam(value="deep",defaultValue="false")
boolean deep,
@RequestParam(value="p",required=false)
java.lang.Integer page,
@RequestParam(value="resumebefore",required=false)
java.lang.String beforeId,
@RequestParam(value="resumeafter",required=false)
java.lang.String afterId,
@RequestParam(value="type",required=false)
java.lang.String type,
@RequestParam(value="timeof",required=false)
java.lang.String timestamp)
request - identifier - deep - If true, connection data is added to the model (not only
connection URIs). Default: false.page - taken into account only if client supports paging; in that case
the specified page is returnedbeforeId - taken into account only if client supports paging; in that case
the page with connections URIs that precede the connection having
beforeId is returnedafterId - taken into account only if client supports paging; in that case
the page with connections URIs that follow the connection having
afterId are returnedtype - only connection events of the given type are considered when
ordering returned connections. Default: all event types.timestamp - only connection events that where created before the given time
are considered when ordering returned connections. Default:
current time.public void setLinkedDataService(LinkedDataService linkedDataService)
public void setRegistrationServer(RegistrationServer registrationServer)
public void setUriService(URIService uriService)
public void setNeedResourceURIPrefix(java.lang.String needResourceURIPrefix)
public void setConnectionResourceURIPrefix(java.lang.String connectionResourceURIPrefix)
public void setDataURIPrefix(java.lang.String dataURIPrefix)
public void setResourceURIPrefix(java.lang.String resourceURIPrefix)
public void setPageURIPrefix(java.lang.String pageURIPrefix)
public java.lang.String getNodeResourceURIPrefix()
public void setNodeResourceURIPrefix(java.lang.String nodeResourceURIPrefix)
public void setNeedResourceURIPath(java.lang.String needResourceURIPath)
public void setConnectionResourceURIPath(java.lang.String connectionResourceURIPath)
@RequestMapping(value="${uri.path.resource}",
method=POST,
produces="text/plain")
public org.springframework.http.ResponseEntity<java.lang.String> register(@RequestParam(value="register")
java.lang.String registeredType,
javax.servlet.http.HttpServletRequest request)
throws java.security.cert.CertificateException,
java.io.UnsupportedEncodingException
java.security.cert.CertificateExceptionjava.io.UnsupportedEncodingExceptionCopyright © 2018. All Rights Reserved.