public interface Service
A link to a service that makes more functionality available for the resource, such as from an image to the base URI of an associated IIIF Image API service. The service resource should have additional information associated with it in order to allow the client to determine how to make appropriate use of it, such as a profile link to a service description. It may also have relevant information copied from the service itself. This duplication is permitted in order to increase the performance of rendering the object without necessitating additional HTTP requests.
Please see the Service Profiles document for known services.
Services may be included either by reference or embedded within the response. The decision as to whether to embed or reference is left up to the implementer, however embedded descriptions should be kept as short as possible. If the only properties of the object are @context, @id, profile and/or label, then the client should retrieve the resource from the URI given in @id.
Example:
{
"service": {
"@context": "http://example.org/ns/jsonld/context.json",
"@id": "http://example.org/service/example.json",
"profile": "http://example.org/docs/example-service.html",
"label": "Example Service"
// Additional keys may be embedded here, if not then the @id should be retrieved
}
}
| Modifier and Type | Method and Description |
|---|---|
String |
getContext() |
URI |
getId() |
PropertyValue |
getLabel() |
String |
getProfile() |
void |
setContext(String context) |
void |
setId(String id) |
void |
setId(URI id) |
void |
setLabel(PropertyValue label) |
void |
setProfile(String profile) |
String getContext()
void setContext(String context)
URI getId()
void setId(URI id)
id - Services should have an @id that can be dereferenced, and if so, the representation retrieved from that
URI should be JSON-LD. The service at the URI in @id may require additional parameters, generate representations
other than JSON-LD, or have no JSON-LD representation at all. If a IIIF Image API service is available for the
image, then a link to the service’s base URI should be included.void setId(String id) throws URISyntaxException
URISyntaxExceptionPropertyValue getLabel()
void setLabel(PropertyValue label)
label - Services may have a label property to provide a human readable string to display to the user in the
situation that the service has to be selected or manually linked to rather than automatically processed.String getProfile()
void setProfile(String profile)
profile - Services should have a profile URI which can be used to determine the type of service, especially
for services that do not provide a JSON-LD representation. The representation retrieved from the profile URI should
be a human or machine readable description of the service.Copyright © 2016. All rights reserved.