at.newmedialab.ldclient.model
Class Endpoint
java.lang.Object
at.newmedialab.ldclient.model.Endpoint
public class Endpoint
- extends Object
Definition of a Linked Data Endpoint. Contains information how to query the
endpoint, what format to expect, and when to expire data from this endpoint.
-
Endpoint.EndpointType.LINKEDDATA endpoints will be accessed by directly
retrieving the URI with appropriate Accept headers following the Linked Data
recommendations
-
Endpoint.EndpointType.CACHE endpoints will be accessed by passing the URI
as request parameter to the cache and parsing the response according to the
content type defined for this endpoint (Content-Type header is too
unspecific)
-
Endpoint.EndpointType.SPARQL endpoints will be accessed by issuing a query
of SELECT ?p ?o WHERE { {url} ?p ?o } to retrieve all triples
for the requested resource
-
Endpoint.EndpointType.NONE act as blacklist. Resources matching handled by
this endpoint are not fetched.
User: sschaffe
REGEX_INDICATOR
public static final String REGEX_INDICATOR
- See Also:
- Constant Field Values
Endpoint
public Endpoint()
Endpoint
public Endpoint(String name,
Endpoint.EndpointType type,
String uriPrefix,
String endpointUrl,
String contentType,
Long defaultExpiry)
getId
public Long getId()
setId
public void setId(Long id)
getName
public String getName()
setName
public void setName(String name)
getType
public Endpoint.EndpointType getType()
setType
public void setType(Endpoint.EndpointType type)
getUriPrefix
public String getUriPrefix()
setUriPrefix
public void setUriPrefix(String uriPrefix)
getEndpointUrl
public String getEndpointUrl()
setEndpointUrl
public void setEndpointUrl(String endpointUrl)
getContentType
public String getContentType()
setContentType
public void setContentType(String contentType)
getDefaultExpiry
public Long getDefaultExpiry()
setDefaultExpiry
public void setDefaultExpiry(Long defaultExpiry)
handles
public boolean handles(org.openrdf.model.URI resource)
- Check if this
Endpoint handles (is responsible) for this URI.
- Parameters:
resource - the Resource to check
- Returns:
true if the Resource's uri matches the endpoint's uriPrefix- See Also:
uriPrefix
handles
public boolean handles(String uri)
- Check if this
Endpoint handles (is responsible) for this URI.
- Parameters:
uri - the URI to check
- Returns:
true if the uri matches the endpoint's uriPrefix- See Also:
uriPrefix
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
Copyright © 2012-2013 Salzburg Research. All Rights Reserved.