public static class WonRdfUtils.SocketUtils
extends java.lang.Object
| Constructor and Description |
|---|
SocketUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addSocket(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI,
java.net.URI socketTypeURI,
boolean isDefaultSocket) |
static void |
addSocket(org.apache.jena.rdf.model.Model model,
java.net.URI socketURI,
java.net.URI socketTypeURI,
boolean isDefaultSocket)
Adds a triple to the model of the form <> won:socket [socketURI].
|
static void |
addTargetSocket(org.apache.jena.rdf.model.Model content,
java.net.URI socketURI)
Adds a triple to the model of the form <> won:targetSocket [socketURI].
|
static java.util.Optional<org.apache.jena.rdf.model.Model> |
createSocketModelForHintOrConnect(java.util.Optional<java.net.URI> socket,
java.util.Optional<java.net.URI> targetSocket)
Creates a model for connecting two sockets.
|
static java.util.Optional<java.net.URI> |
getAtomOfSocket(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static java.util.Set<java.net.URI> |
getCompatibleSocketDefinitions(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static java.util.Set<RdfUtils.Pair<java.net.URI>> |
getCompatibleSocketsForAtoms(org.apache.jena.query.Dataset dataset,
java.net.URI firstAtom,
java.net.URI secondAtom)
Calculates all compatible socket pairs in the two specified atoms defined in
the dataset.
|
static java.util.Optional<java.net.URI> |
getDefaultSocket(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI,
boolean returnAnyIfNoDefaultFound) |
static java.util.Optional<java.net.URI> |
getDefaultSocket(org.apache.jena.rdf.model.Model model,
boolean returnAnyIfNoDefaultFound) |
static java.util.Optional<java.net.URI> |
getDefaultSocket(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
boolean returnAnyIfNoDefaultFound)
Returns the default socket found in the model.
|
static java.util.Optional<java.net.URI> |
getDefaultSocket(org.apache.jena.rdf.model.Model model,
java.net.URI subject,
boolean returnAnyIfNoDefaultFound) |
static java.util.Set<RdfUtils.Pair<java.net.URI>> |
getIncompatibleSocketsForAtoms(org.apache.jena.query.Dataset dataset,
java.net.URI firstAtom,
java.net.URI secondAtom) |
static java.net.URI |
getSocket(WonMessage message)
Returns the socket in a connect message.
|
static java.util.Optional<java.net.URI> |
getSocketDefinition(org.apache.jena.query.Dataset dataset,
java.net.URI socket) |
static java.util.Collection<java.net.URI> |
getSockets(org.apache.jena.rdf.model.Model content)
Returns all sockets found in the model, attached to the null relative URI
'<>'.
|
static java.util.Set<java.net.URI> |
getSocketsOfAtom(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI) |
static java.util.stream.Stream<java.net.URI> |
getSocketsOfAtomAsStream(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI) |
static java.util.Collection<java.net.URI> |
getSocketsOfType(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI,
java.net.URI socketType) |
static java.util.Collection<java.net.URI> |
getSocketsOfType(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
java.net.URI socketType)
Returns all sockets of the given type found in the model.
|
static java.util.Collection<java.net.URI> |
getSocketsOfType(org.apache.jena.rdf.model.Model model,
java.net.URI socketType)
Returns all sockets of the base resource of the given type.
|
static java.util.Collection<java.net.URI> |
getSocketsOfType(org.apache.jena.rdf.model.Model model,
java.net.URI subject,
java.net.URI socketType)
Returns all sockets of subject with the given type found in the model.
|
static java.net.URI |
getTargetSocket(WonMessage message)
Returns the targetSocket in a connect message.
|
static java.util.Optional<java.net.URI> |
getTypeOfSocket(org.apache.jena.query.Dataset content,
java.net.URI socket) |
static java.util.Optional<java.net.URI> |
getTypeOfSocket(org.apache.jena.rdf.model.Model content,
java.net.URI socket)
Returns all sockets found in the model, attached to the null relative URI
'<>'.
|
static boolean |
isSocketsCompatible(org.apache.jena.query.Dataset dataset,
java.net.URI firstAtomSocket,
java.net.URI secondAtomSocket)
Checks if the specified sockets are compatible.
|
static void |
setAutoOpen(SocketDefinitionImpl socketConfiguration,
org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static void |
setCompatibleSocketDefinitions(SocketDefinitionImpl socketConfiguration,
org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static void |
setDerivationProperties(SocketDefinitionImpl socketConfiguration,
org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static void |
setInverseDerivationProperties(SocketDefinitionImpl socketConfiguration,
org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
static void |
setSocketCapacity(SocketDefinitionImpl socketConfiguration,
org.apache.jena.query.Dataset dataset,
java.net.URI socketURI) |
public static java.net.URI getSocket(WonMessage message)
message - public static java.net.URI getTargetSocket(WonMessage message)
message - public static java.util.Set<RdfUtils.Pair<java.net.URI>> getCompatibleSocketsForAtoms(org.apache.jena.query.Dataset dataset, java.net.URI firstAtom, java.net.URI secondAtom)
dataset - leftAtom - rightAtom - public static java.util.Set<RdfUtils.Pair<java.net.URI>> getIncompatibleSocketsForAtoms(org.apache.jena.query.Dataset dataset, java.net.URI firstAtom, java.net.URI secondAtom)
public static boolean isSocketsCompatible(org.apache.jena.query.Dataset dataset,
java.net.URI firstAtomSocket,
java.net.URI secondAtomSocket)
dataset - firstAtomSocket - secondAtomSocket - public static java.util.Optional<java.net.URI> getSocketDefinition(org.apache.jena.query.Dataset dataset,
java.net.URI socket)
public static java.util.Collection<java.net.URI> getSockets(org.apache.jena.rdf.model.Model content)
content - public static java.util.Optional<java.net.URI> getTypeOfSocket(org.apache.jena.rdf.model.Model content,
java.net.URI socket)
content - public static java.util.Optional<java.net.URI> getTypeOfSocket(org.apache.jena.query.Dataset content,
java.net.URI socket)
public static java.util.Collection<java.net.URI> getSocketsOfType(org.apache.jena.rdf.model.Model model,
java.net.URI socketType)
model - subject - socketType - public static java.util.Collection<java.net.URI> getSocketsOfType(org.apache.jena.rdf.model.Model model,
java.net.URI subject,
java.net.URI socketType)
model - socketType - public static java.util.Collection<java.net.URI> getSocketsOfType(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
java.net.URI socketType)
model - socketType - public static java.util.Collection<java.net.URI> getSocketsOfType(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI,
java.net.URI socketType)
public static java.util.Optional<java.net.URI> getDefaultSocket(org.apache.jena.rdf.model.Model model,
boolean returnAnyIfNoDefaultFound)
public static java.util.Optional<java.net.URI> getDefaultSocket(org.apache.jena.rdf.model.Model model,
java.net.URI subject,
boolean returnAnyIfNoDefaultFound)
public static java.util.Set<java.net.URI> getSocketsOfAtom(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI)
public static java.util.stream.Stream<java.net.URI> getSocketsOfAtomAsStream(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI)
public static java.util.Optional<java.net.URI> getDefaultSocket(org.apache.jena.rdf.model.Model model,
org.apache.jena.rdf.model.Resource subject,
boolean returnAnyIfNoDefaultFound)
model - subject - boolean - returnAnyIfNoDefaultFoundpublic static java.util.Optional<java.net.URI> getDefaultSocket(org.apache.jena.query.Dataset atomDataset,
java.net.URI atomURI,
boolean returnAnyIfNoDefaultFound)
public static void addSocket(org.apache.jena.rdf.model.Model model,
java.net.URI socketURI,
java.net.URI socketTypeURI,
boolean isDefaultSocket)
model - socketURI - public static void addSocket(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI,
java.net.URI socketTypeURI,
boolean isDefaultSocket)
public static void addTargetSocket(org.apache.jena.rdf.model.Model content,
java.net.URI socketURI)
content - socketURI - public static java.util.Optional<org.apache.jena.rdf.model.Model> createSocketModelForHintOrConnect(java.util.Optional<java.net.URI> socket,
java.util.Optional<java.net.URI> targetSocket)
public static void setCompatibleSocketDefinitions(SocketDefinitionImpl socketConfiguration, org.apache.jena.query.Dataset dataset, java.net.URI socketURI)
public static java.util.Set<java.net.URI> getCompatibleSocketDefinitions(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI)
public static void setDerivationProperties(SocketDefinitionImpl socketConfiguration, org.apache.jena.query.Dataset dataset, java.net.URI socketURI)
public static void setInverseDerivationProperties(SocketDefinitionImpl socketConfiguration, org.apache.jena.query.Dataset dataset, java.net.URI socketURI)
public static void setAutoOpen(SocketDefinitionImpl socketConfiguration, org.apache.jena.query.Dataset dataset, java.net.URI socketURI)
public static void setSocketCapacity(SocketDefinitionImpl socketConfiguration, org.apache.jena.query.Dataset dataset, java.net.URI socketURI)
public static java.util.Optional<java.net.URI> getAtomOfSocket(org.apache.jena.query.Dataset dataset,
java.net.URI socketURI)
Copyright © 2019. All Rights Reserved.