Search in sources :

Example 11 with WonNodeInfo

use of won.protocol.service.WonNodeInfo in project webofneeds by researchstudio-sat.

the class WonNodeSparqlService method getWonNodeInfoFromDataset.

/**
 * Get the {@link won.protocol.service.WonNodeInfo} as an object from a
 * {@link Dataset}
 *
 * @param ds Dataset which holds won node information
 * @return
 */
public WonNodeInfo getWonNodeInfoFromDataset(Dataset ds) {
    String dsWonNodeUri = getWonNodeUriFromDataset(ds);
    WonNodeInfo nodeInfo = WonRdfUtils.WonNodeUtils.getWonNodeInfo(URI.create(dsWonNodeUri), ds);
    if (nodeInfo == null) {
        throw new DataIntegrityException("Could not load won node info from dataset with URI: " + dsWonNodeUri);
    }
    return nodeInfo;
}
Also used : DataIntegrityException(won.protocol.exception.DataIntegrityException) WonNodeInfo(won.protocol.service.WonNodeInfo)

Aggregations

WonNodeInfo (won.protocol.service.WonNodeInfo)11 Dataset (org.apache.jena.query.Dataset)7 URI (java.net.URI)4 DistributedPubSubMediator (akka.cluster.pubsub.DistributedPubSubMediator)2 URISyntaxException (java.net.URISyntaxException)2 HttpHeaders (org.springframework.http.HttpHeaders)2 WonNodeConnection (won.matcher.service.nodemanager.pojo.WonNodeConnection)2 DatasetResponseWithStatusCodeAndHeaders (won.protocol.rest.DatasetResponseWithStatusCodeAndHeaders)2 akka.actor (akka.actor)1 DistributedPubSub (akka.cluster.pubsub.DistributedPubSub)1 Logging (akka.event.Logging)1 LoggingAdapter (akka.event.LoggingAdapter)1 Function (akka.japi.Function)1 java.util (java.util)1 HashSet (java.util.HashSet)1 Collectors (java.util.stream.Collectors)1 Element (net.sf.ehcache.Element)1 IteratorUtils (org.apache.commons.collections.IteratorUtils)1 RDFNode (org.apache.jena.rdf.model.RDFNode)1 PrefixMapping (org.apache.jena.shared.PrefixMapping)1