Class WrappedRESTEndpointImpl
java.lang.Object
se.liu.ida.hefquin.federation.members.impl.BaseForFederationMember
se.liu.ida.hefquin.federation.members.impl.RESTEndpointImpl
se.liu.ida.hefquin.federation.members.impl.WrappedRESTEndpointImpl
- All Implemented Interfaces:
FederationMember,RESTEndpoint,WrappedRESTEndpoint
-
Nested Class Summary
Nested classes/interfaces inherited from interface se.liu.ida.hefquin.federation.members.RESTEndpoint
RESTEndpoint.ParameterNested classes/interfaces inherited from interface se.liu.ida.hefquin.federation.members.WrappedRESTEndpoint
WrappedRESTEndpoint.DataConversionException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final MappingOperatorprotected final Set<SourceReference> Fields inherited from class se.liu.ida.hefquin.federation.members.impl.RESTEndpointImpl
params, urlTemplateFields inherited from class se.liu.ida.hefquin.federation.members.impl.BaseForFederationMember
id -
Constructor Summary
ConstructorsConstructorDescriptionWrappedRESTEndpointImpl(String urlTemplate, List<RESTEndpoint.Parameter> params, MappingOperator mappingExpression) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.jena.query.DatasetconvertResponseDataIntoRDF(String data, SPARQLGraphPattern pattern) Assuming the given string is the content of a response retrieved when issuing a request to this REST endpoint, this method returns an RDF view of this content.booleanevaluatePatternOverRDFView(SPARQLGraphPattern pattern, String data) Assuming the given string is the content of a response retrieved when issuing a request to this REST endpoint, this method returns the result of evaluating the given graph pattern over an RDF view of this content.toString()Methods inherited from class se.liu.ida.hefquin.federation.members.impl.RESTEndpointImpl
getNumberOfParameters, getParameterByName, getParameters, getURLTemplate, isSupportedPattern, supportsMoreThanTriplePatternsMethods inherited from class se.liu.ida.hefquin.federation.members.impl.BaseForFederationMember
getIDMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface se.liu.ida.hefquin.federation.FederationMember
getID, isSupportedPattern, supportsMoreThanTriplePatternsMethods inherited from interface se.liu.ida.hefquin.federation.members.RESTEndpoint
getNumberOfParameters, getParameterByName, getParameters, getURLTemplate
-
Field Details
-
mappingExpression
-
srcRefs
-
-
Constructor Details
-
WrappedRESTEndpointImpl
public WrappedRESTEndpointImpl(String urlTemplate, List<RESTEndpoint.Parameter> params, MappingOperator mappingExpression)
-
-
Method Details
-
toString
- Overrides:
toStringin classRESTEndpointImpl
-
equals
- Overrides:
equalsin classRESTEndpointImpl
-
evaluatePatternOverRDFView
Description copied from interface:WrappedRESTEndpointAssuming the given string is the content of a response retrieved when issuing a request to this REST endpoint, this method returns the result of evaluating the given graph pattern over an RDF view of this content.- Specified by:
evaluatePatternOverRDFViewin interfaceWrappedRESTEndpoint- Parameters:
pattern- - the graph pattern to be evaluated over the RDF view of the given datadata- - the content of a response retrieved via a successful request to this REST endpoint- Returns:
- the result of evaluating the pattern over the RDF view, in the form of a sequence of solution mappings
-
convertResponseDataIntoRDF
public org.apache.jena.query.Dataset convertResponseDataIntoRDF(String data, SPARQLGraphPattern pattern) Assuming the given string is the content of a response retrieved when issuing a request to this REST endpoint, this method returns an RDF view of this content.A SPARQL graph pattern can be passed as an optional parameter to let the wrapper know which pattern is intended to be evaluated over the returned data. Some wrapper implementations may use this pattern to reduce their effort of converting the retrieved data into RDF by considering only the conversion rules that may produce RDF triples relevant to the given pattern. Wrapper implementations that do so have to guarantee that this does not have any effect on the result of evaluating the given pattern over the returned RDF triples.
- Parameters:
data- - the content of a response retrieved via a successful request to this REST endpointpattern- - the pattern that is intended to be evaluated over the returned RDF data; may benull- Returns:
- an RDF dataset that represents the given data
-