Class FederationDescriptionReader
java.lang.Object
se.liu.ida.hefquin.federation.catalog.FederationDescriptionReader
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FederationMembercreateBRTPFServer(String uri, VocabularyMapping vm) protected FederationMembercreateFederationMember(org.apache.jena.rdf.model.Resource fedMember, String serviceURI, org.apache.jena.rdf.model.Model fd) protected FederationMemberprotected FederationMembercreateNeo4jServer(String uri) protected FederationMembercreateSPARQLEndpoint(String uri, VocabularyMapping vm) protected FederationMembercreateTPFServer(String uri, VocabularyMapping vm) protected FederationMembercreateWrappedRESTEndpoint(String uri, List<RESTEndpoint.Parameter> params, List<MappingOperator> trMaps) protected StringgetAsURIString(org.apache.jena.rdf.model.RDFNode n) Returns a string that represents a URI obtained from the given RDF node.parseFedDescr(String filename) parseFedDescr(org.apache.jena.rdf.model.Model fd) protected VocabularyMappingparseVocabMapping(org.apache.jena.rdf.model.Resource fm, org.apache.jena.rdf.model.Model fd) Attempts to retrieve and parse the vocabulary mapping associated with the given RDF resourcefm, representing aFederationMember, in the given federation descriptionfd.static FederationCatalogreadFromFile(String filename) static FederationCatalogreadFromModel(org.apache.jena.rdf.model.Model fd) protected URIverifyExpectedURI(String uriString) Verifies that the given string represents an HTTP URI or an HTTPS URI and, if so, returns that URI.
-
Field Details
-
instance
-
-
Constructor Details
-
FederationDescriptionReader
protected FederationDescriptionReader()
-
-
Method Details
-
readFromFile
-
readFromModel
-
parseFedDescr
-
parseFedDescr
-
createFederationMember
protected FederationMember createFederationMember(org.apache.jena.rdf.model.Resource fedMember, String serviceURI, org.apache.jena.rdf.model.Model fd) -
parseVocabMapping
protected VocabularyMapping parseVocabMapping(org.apache.jena.rdf.model.Resource fm, org.apache.jena.rdf.model.Model fd) Attempts to retrieve and parse the vocabulary mapping associated with the given RDF resourcefm, representing aFederationMember, in the given federation descriptionfd. The method attempts to load the vocabulary mapping from the specified path or URL and caches the result for reuse. If no vocabulary mappings file is present, the method returnsnull.- Parameters:
fm- RDF resource for the federation memberfd- RDF model of the federation description- Returns:
- parsed
VocabularyMapping, ornullif not specified - Throws:
IllegalArgumentException- if the mapping file cannot be loaded or parsed
-
createSPARQLEndpoint
-
createTPFServer
-
createBRTPFServer
-
createNeo4jServer
-
createGraphQLServer
-
createWrappedRESTEndpoint
protected FederationMember createWrappedRESTEndpoint(String uri, List<RESTEndpoint.Parameter> params, List<MappingOperator> trMaps) -
verifyExpectedURI
-
getAsURIString
Returns a string that represents a URI obtained from the given RDF node. In particular, if the node is a URI, then that URI is returned (as a string); if the node is an xsd:anyURI literal with a valid URI as its lexical form, then that URI is returned; otherwise,nullis returned.
-