-
Notifications
You must be signed in to change notification settings - Fork 4
Resource Preview
Jim Amsden edited this page Nov 27, 2018
·
1 revision
oslc-service GET needs to check for Accept=application/x-oslc-compact+xml and then construct a Compact resource for the request URI. Here's an example of the Compact resource representation:
{
"compact": {
"title": "324: Need a fix <em>NOW</em>",
"icon": "http://example.com/icons/defect.jpg",
"largePreview": {
"document": "http://example.com/bugs/324?preview=large",
"hintHeight": "250px",
"hintWidth": "400px"
}
}
}
The implementation should:
- GET the resource in order to get the title
- look to see if the server has an icon for the resource based on its URI and an icons folder, and use a default icon if not
- look to see if there's a smallPreview.ejs file for the resource based on its URI, construct a default reflectively if not including identifier, title, description, creator, created, modifiedBy, modified.
- do the same thing for the large preview but include all properties including anchor tags for link properties with their title and URI.
This is an example where ldp-service needs to be called before the oslc-service as oslc-service needs the resource.