public class WonMessage
extends java.lang.Object
implements java.io.Serializable
Note: this implementation is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
WonMessage.AttachmentHolder |
class |
WonMessage.AttachmentMetaData |
static class |
WonMessage.EnvelopePropertyCheckResult |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENVELOPE_URI_SUFFIX |
static java.lang.String |
SIGNATURE_URI_SUFFIX |
| Constructor and Description |
|---|
WonMessage(org.apache.jena.query.Dataset completeDataset) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMessagePropertiesRDFNode(org.apache.jena.rdf.model.Property property,
java.util.Collection<org.apache.jena.rdf.model.RDFNode> values) |
void |
addMessagePropertiesString(org.apache.jena.rdf.model.Property property,
java.util.Collection<java.lang.String> uris) |
void |
addMessagePropertiesURI(org.apache.jena.rdf.model.Property property,
java.util.Collection<java.net.URI> values) |
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
boolean value)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
double value)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
float value)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
int value)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
long value)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
org.apache.jena.rdf.model.RDFNode value)
Adds a property to the message resource in the head message.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
java.lang.String uri)
Adds a property to the message resource in the outermost envelope.
|
void |
addMessageProperty(org.apache.jena.rdf.model.Property property,
java.net.URI value)
Adds a property to the message resource in the outermost envelope.
|
WonMessage.EnvelopePropertyCheckResult |
checkEnvelopeProperties() |
static WonMessage |
deepCopy(WonMessage original) |
boolean |
equals(java.lang.Object obj) |
java.util.Set<WonMessage> |
getAllMessages()
Returns all messages that are present in the dataset that was used to create
this WonMessage object.
|
java.net.URI |
getAtomURI() |
java.net.URI |
getAtomURIRequired() |
java.util.List<WonMessage.AttachmentHolder> |
getAttachments()
Returns all content graphs that are attachments, including their signature
graphs.
|
org.apache.jena.query.Dataset |
getCompleteDataset()
Returns the complete dataset, even if this is a multi-message object.
|
java.net.URI |
getConnectionURI() |
java.net.URI |
getConnectionURIRequired() |
java.util.List<java.lang.String> |
getContentGraphURIs() |
java.util.Optional<WonMessage> |
getDeliveryChain() |
java.net.URI |
getEnvelopePropertyURIValue(org.apache.jena.rdf.model.Property property) |
java.net.URI |
getEnvelopePropertyURIValue(java.net.URI propertyURI) |
<T> T |
getEnvelopePropertyValue(org.apache.jena.rdf.model.Property property,
java.util.function.Function<org.apache.jena.rdf.model.RDFNode,T> mapper) |
WonMessageDirection |
getEnvelopeType() |
WonMessageDirection |
getEnvelopeTypeRequired() |
java.net.URI |
getEnvelopeURI() |
WonMessage |
getFocalMessage()
Return the message 'in focus'.
|
java.util.Set<WonMessage> |
getForwardedMessages()
Returns all messages forwarded by this message and contained in the complete
dataset.
|
java.util.List<java.net.URI> |
getForwardedMessageURIRequired() |
java.util.List<java.net.URI> |
getForwardedMessageURIs() |
WonMessage |
getHeadAndForwarded(boolean recursive) |
java.util.Optional<WonMessage> |
getHeadMessage() |
java.lang.Double |
getHintScore() |
java.lang.Double |
getHintScoreRequired() |
java.net.URI |
getHintTargetAtomURI() |
java.net.URI |
getHintTargetAtomURIRequired() |
java.net.URI |
getHintTargetSocketURI() |
java.net.URI |
getHintTargetSocketURIRequired() |
java.util.List<java.net.URI> |
getInjectIntoConnectionURIs() |
java.util.List<java.net.URI> |
getInjectIntoConnectionURIsRequired() |
org.apache.jena.query.Dataset |
getMessageContent()
Creates a new dataset containing only the content graph(s) of the message and
their signature (if present).
|
WonMessageType |
getMessageType() |
WonMessageType |
getMessageTypeRequired() |
java.net.URI |
getMessageURI() |
java.net.URI |
getMessageURIRequired() |
java.util.List<java.net.URI> |
getPreviousMessageURIs() |
java.util.List<java.net.URI> |
getPreviousMessageURIsRequired() |
java.net.URI |
getRecipientAtomURI() |
java.net.URI |
getRecipientAtomURIRequired() |
java.net.URI |
getRecipientNodeURI() |
java.net.URI |
getRecipientNodeURIRequired() |
java.net.URI |
getRecipientSocketURI() |
java.net.URI |
getRecipientSocketURIRequired() |
java.util.Optional<WonMessage> |
getRemoteResponse()
Returns the remote response to this message, if it is contained in the
complete dataset.
|
WonMessageType |
getRespondingToMessageType() |
WonMessageType |
getRespondingToMessageTypeRequired() |
java.net.URI |
getRespondingToMessageURI() |
java.net.URI |
getRespondingToMessageURIRequired() |
java.util.Optional<WonMessage> |
getResponse()
Returns the response to this message, if it is contained in the complete
dataset.
|
java.net.URI |
getSenderAtomURI() |
java.net.URI |
getSenderAtomURIRequired() |
java.net.URI |
getSenderNodeURI() |
java.net.URI |
getSenderNodeURIRequired() |
java.net.URI |
getSenderSocketURI() |
java.net.URI |
getSenderSocketURIRequired() |
java.net.URI |
getSignatureURI() |
java.util.Optional<java.net.URI> |
getSignerURI() |
java.net.URI |
getSignerURIRequired() |
int |
hashCode() |
boolean |
isEnvelopeGraph(java.lang.String modelUri,
org.apache.jena.rdf.model.Model model) |
boolean |
isMessageWithBothResponses() |
boolean |
isMessageWithResponse() |
boolean |
isPartOfDeliveryChain() |
boolean |
isRemoteResponse() |
static WonMessage |
of(java.util.Collection<WonMessage> messages) |
static WonMessage |
of(org.apache.jena.query.Dataset dataset)
Create a WonMessage object from a dataset that may contain multiple messages.
|
static WonMessage |
of(WonMessage... messages) |
java.lang.String |
toShortStringForDebug() |
java.lang.String |
toStringForDebug(boolean multiline)
Generate a String representaiton of the message for use in log statements.
|
public static final java.lang.String SIGNATURE_URI_SUFFIX
public static final java.lang.String ENVELOPE_URI_SUFFIX
public static WonMessage of(org.apache.jena.query.Dataset dataset)
dataset - public static WonMessage of(java.util.Collection<WonMessage> messages)
public static WonMessage of(WonMessage... messages)
public static WonMessage deepCopy(WonMessage original)
public org.apache.jena.query.Dataset getCompleteDataset()
public WonMessage getFocalMessage()
public java.util.Set<WonMessage> getAllMessages()
public java.util.Set<WonMessage> getForwardedMessages()
public WonMessage getHeadAndForwarded(boolean recursive)
public java.util.Optional<WonMessage> getHeadMessage()
public java.util.Optional<WonMessage> getResponse()
public java.util.Optional<WonMessage> getRemoteResponse()
public boolean isPartOfDeliveryChain()
public java.util.Optional<WonMessage> getDeliveryChain()
public java.net.URI getSignatureURI()
public java.net.URI getEnvelopeURI()
public java.net.URI getSignerURIRequired()
public java.util.Optional<java.net.URI> getSignerURI()
public void addMessageProperty(org.apache.jena.rdf.model.Property property,
org.apache.jena.rdf.model.RDFNode value)
property - value - public void addMessagePropertiesRDFNode(org.apache.jena.rdf.model.Property property,
java.util.Collection<org.apache.jena.rdf.model.RDFNode> values)
public void addMessageProperty(org.apache.jena.rdf.model.Property property,
java.lang.String uri)
property - uri - the object of the property, assumed to be an uripublic void addMessagePropertiesString(org.apache.jena.rdf.model.Property property,
java.util.Collection<java.lang.String> uris)
public void addMessageProperty(org.apache.jena.rdf.model.Property property,
java.net.URI value)
property - value - public void addMessagePropertiesURI(org.apache.jena.rdf.model.Property property,
java.util.Collection<java.net.URI> values)
public void addMessageProperty(org.apache.jena.rdf.model.Property property,
long value)
property - value - public void addMessageProperty(org.apache.jena.rdf.model.Property property,
int value)
property - value - public void addMessageProperty(org.apache.jena.rdf.model.Property property,
double value)
property - value - public void addMessageProperty(org.apache.jena.rdf.model.Property property,
float value)
property - value - public void addMessageProperty(org.apache.jena.rdf.model.Property property,
boolean value)
property - value - public org.apache.jena.query.Dataset getMessageContent()
public java.util.List<WonMessage.AttachmentHolder> getAttachments()
public boolean isEnvelopeGraph(java.lang.String modelUri,
org.apache.jena.rdf.model.Model model)
public java.util.List<java.lang.String> getContentGraphURIs()
public java.net.URI getMessageURI()
public java.net.URI getMessageURIRequired()
public WonMessageType getMessageType()
public WonMessageType getMessageTypeRequired()
public WonMessageDirection getEnvelopeType()
public WonMessageDirection getEnvelopeTypeRequired()
public java.net.URI getConnectionURI()
public java.net.URI getConnectionURIRequired()
public java.net.URI getAtomURI()
public java.net.URI getAtomURIRequired()
public java.net.URI getSenderSocketURI()
public java.net.URI getSenderSocketURIRequired()
public java.net.URI getSenderAtomURI()
public java.net.URI getSenderAtomURIRequired()
public java.net.URI getSenderNodeURI()
public java.net.URI getSenderNodeURIRequired()
public java.net.URI getRecipientSocketURI()
public java.net.URI getRecipientSocketURIRequired()
public java.net.URI getRecipientAtomURI()
public java.net.URI getRecipientAtomURIRequired()
public java.net.URI getRecipientNodeURI()
public java.net.URI getRecipientNodeURIRequired()
public java.net.URI getHintTargetSocketURI()
public java.net.URI getHintTargetSocketURIRequired()
public java.net.URI getHintTargetAtomURI()
public java.net.URI getHintTargetAtomURIRequired()
public java.lang.Double getHintScore()
public java.lang.Double getHintScoreRequired()
public java.util.List<java.net.URI> getInjectIntoConnectionURIs()
public java.util.List<java.net.URI> getInjectIntoConnectionURIsRequired()
public java.util.List<java.net.URI> getPreviousMessageURIs()
public java.util.List<java.net.URI> getPreviousMessageURIsRequired()
public java.net.URI getRespondingToMessageURI()
public java.net.URI getRespondingToMessageURIRequired()
public java.util.List<java.net.URI> getForwardedMessageURIs()
public java.util.List<java.net.URI> getForwardedMessageURIRequired()
public WonMessageType getRespondingToMessageType()
public WonMessageType getRespondingToMessageTypeRequired()
public java.net.URI getEnvelopePropertyURIValue(java.net.URI propertyURI)
public java.net.URI getEnvelopePropertyURIValue(org.apache.jena.rdf.model.Property property)
public <T> T getEnvelopePropertyValue(org.apache.jena.rdf.model.Property property,
java.util.function.Function<org.apache.jena.rdf.model.RDFNode,T> mapper)
public java.lang.String toStringForDebug(boolean multiline)
public java.lang.String toShortStringForDebug()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic boolean isMessageWithBothResponses()
public boolean isMessageWithResponse()
public boolean isRemoteResponse()
public WonMessage.EnvelopePropertyCheckResult checkEnvelopeProperties()
properties - Copyright © 2019. All Rights Reserved.