@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 |
|---|---|
java.lang.String |
getNodeResourceURIPrefix() |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
listAtomURIs(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 createdAfter,
java.lang.String filterBySocketTypeUriString,
java.lang.String filterByAtomTypeUriString,
java.lang.String state) |
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> |
readAtom(javax.servlet.http.HttpServletRequest request,
java.lang.String identifier) |
org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> |
readAtomDeep(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> |
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> |
readConnectionsOfAtom(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 atom.
|
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> |
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 |
setAtomResourceURIPrefix(java.lang.String atomResourceURIPrefix) |
void |
setConnectionResourceURIPrefix(java.lang.String connectionResourceURIPrefix) |
void |
setDataURIPrefix(java.lang.String dataURIPrefix) |
void |
setLinkedDataService(LinkedDataService linkedDataService) |
void |
setNodeResourceURIPrefix(java.lang.String nodeResourceURIPrefix) |
void |
setPageURIPrefix(java.lang.String pageURIPrefix) |
void |
setRegistrationServer(RegistrationServer registrationServer) |
void |
setResourceURIPrefix(java.lang.String resourceURIPrefix) |
void |
setUriService(URIService uriService) |
java.lang.String |
showAtomPage(java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
java.lang.String |
showAtomURIListPage(java.lang.Integer page,
java.lang.String beforeId,
java.lang.String afterId,
java.lang.String modifiedAfter,
java.lang.String createdAfter,
java.lang.String filterBySocketTypeUriString,
java.lang.String filterByAtomTypeUriString,
java.lang.String state,
javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response) |
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 |
showDeepAtomPage(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 |
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.atom}/{identifier}")
public java.lang.String showAtomPage(@PathVariable
java.lang.String identifier,
org.springframework.ui.Model model,
javax.servlet.http.HttpServletResponse response)
@RequestMapping(value="${uri.path.page.atom}/{identifier}/deep")
public java.lang.String showDeepAtomPage(@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.atom}")
public java.lang.String showAtomURIListPage(@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="createdafter",required=false)
java.lang.String createdAfter,
@RequestParam(value="filterBySocketTypeUri",required=false)
java.lang.String filterBySocketTypeUriString,
@RequestParam(value="filterByAtomTypeUri",required=false)
java.lang.String filterByAtomTypeUriString,
@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.text.ParseException
java.io.IOExceptionjava.text.ParseException@RequestMapping(value="${uri.path.data.atom}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> listAtomURIs(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="createdafter",required=false)
java.lang.String createdAfter,
@RequestParam(value="filterBySocketTypeUri",required=false)
java.lang.String filterBySocketTypeUriString,
@RequestParam(value="filterByAtomTypeUri",required=false)
java.lang.String filterByAtomTypeUriString,
@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.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.atom}/{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.IOException@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.IOException@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.atom}/{identifier}",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readAtom(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="identifier")
java.lang.String identifier)
@RequestMapping(value="${uri.path.data.atom}/{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.atom}/{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.atom}/{identifier}/deep",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readAtomDeep(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.atom}/{identifier}/connections",
method=GET,
produces={"application/ld+json","application/trig","application/n-quads"})
public org.springframework.http.ResponseEntity<org.apache.jena.query.Dataset> readConnectionsOfAtom(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 setAtomResourceURIPrefix(java.lang.String atomResourceURIPrefix)
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)
@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 © 2019. All Rights Reserved.