public synchronized WonMessageType getMessageType() { if (this.messageType == null) { URI type = getEnvelopePropertyURIValue(WONMSG.HAS_MESSAGE_TYPE_PROPERTY); this.messageType = WonMessageType.getWonMessageType(type); } return this.messageType; }
public static URI getParentEntityUri(final WonMessage message) { URI parentURI = null; WonMessageDirection direction = message.getEnvelopeType(); if (direction == WonMessageDirection.FROM_EXTERNAL ){ parentURI = getParentUriFromReceiverProperties(message); } else if (direction == WonMessageDirection.FROM_OWNER || direction == WonMessageDirection.FROM_SYSTEM){ parentURI = getParentUriFromSenderProperties(message); } return parentURI; }
@Override public WonMessage process(WonMessage message) throws WonMessageProcessingException { message.addMessageProperty(RDF.type, direction.getResource()); return message; }
public static WonMessageBuilder setMessagePropertiesForNeedCreatedNotification( URI messageURI, URI localNeed, URI localWonNode) { return new WonMessageBuilder(messageURI) .setWonMessageType(WonMessageType.NEED_CREATED_NOTIFICATION) .setWonMessageDirection(WonMessageDirection.FROM_EXTERNAL) .setSenderNeedURI(localNeed) .setSenderNodeURI(localWonNode) .setSentTimestampToNow(); }
private static URI getParentUriFromReceiverProperties(WonMessage message) { URI parentURI; parentURI = message.getReceiverURI(); if (parentURI == null) { parentURI = message.getReceiverNeedURI(); } if (parentURI == null) { parentURI = message.getReceiverNodeURI(); } return parentURI; }
private static URI getParentUriFromSenderProperties(WonMessage message) { URI parentURI; parentURI = message.getSenderURI(); if (parentURI == null) { parentURI = message.getSenderNeedURI(); } if (parentURI == null) { parentURI = message.getSenderNodeURI(); } return parentURI; }
public synchronized WonMessageDirection getEnvelopeType() { if (this.envelopeType == null) { URI type = getEnvelopePropertyURIValue(RDF.type); if (type != null) { this.envelopeType = WonMessageDirection.getWonMessageDirection(type); } } return this.envelopeType; }
@Override public WonMessageType getWonMessageType() { return this.message.getMessageType(); } }
public synchronized URI getSenderNeedURI() { if (this.senderNeedURI == null) { this.senderNeedURI = getEnvelopePropertyURIValue(WONMSG.SENDER_NEED_PROPERTY); } return this.senderNeedURI; }
public synchronized URI getInnermostMessageURI() { if (this.innermostMessageURI == null){ //also sets the innermostMessageURI getEnvelopeGraphs(); } return this.innermostMessageURI; }
public synchronized List<URI> getRefersTo() { if (this.refersTo == null) { this.refersTo = getEnvelopePropertyURIValues(WONMSG.REFERS_TO_PROPERTY); } return this.refersTo; }
public synchronized WonMessageType getIsResponseToMessageType() { if (this.isResponseToMessageType == null) { URI typeURI = getEnvelopePropertyURIValue(WONMSG.IS_RESPONSE_TO_MESSAGE_TYPE); if (typeURI != null) { this.isResponseToMessageType = WonMessageType.getWonMessageType(typeURI); } } return isResponseToMessageType; }
public synchronized URI getSenderNodeURI() { if (this.senderNodeURI == null) { this.senderNodeURI = getEnvelopePropertyURIValue(WONMSG.SENDER_NODE_PROPERTY); } return this.senderNodeURI; }
public synchronized URI getOuterEnvelopeGraphURI() { if (this.outerEnvelopeGraphURI != null) { return this.outerEnvelopeGraphURI; } getEnvelopeGraphs(); //also sets the outerEnvelopeUri return this.outerEnvelopeGraphURI; }
public synchronized List<URI> getPreviousMessageURIs() { if (this.previousMessages == null) { this.previousMessages = getEnvelopePropertyURIValues(WONMSG.HAS_PREVIOUS_MESSAGE_PROPERTY); } return this.previousMessages; }
public synchronized URI getReceiverURI() { if (this.receiverURI == null) { this.receiverURI = getEnvelopePropertyURIValue(WONMSG.RECEIVER_PROPERTY); } return this.receiverURI; }
public synchronized URI getIsRemoteResponseToMessageURI() { if (this.isRemoteResponseToMessageURI == null) { this.isRemoteResponseToMessageURI = getEnvelopePropertyURIValue(WONMSG.IS_REMOTE_RESPONSE_TO); } return this.isRemoteResponseToMessageURI; }
public synchronized URI getSenderURI() { if (this.senderURI == null) { this.senderURI = getEnvelopePropertyURIValue(WONMSG.SENDER_PROPERTY); } return this.senderURI; }
public synchronized URI getIsResponseToMessageURI() { if (this.isResponseToMessageURI == null) { this.isResponseToMessageURI = getEnvelopePropertyURIValue(WONMSG.IS_RESPONSE_TO); } return this.isResponseToMessageURI; }
public synchronized URI getCorrespondingRemoteMessageURI() { if (this.correspondingRemoteMessageURI == null) { this.correspondingRemoteMessageURI = getEnvelopePropertyURIValue(WONMSG.HAS_CORRESPONDING_REMOTE_MESSAGE); } return this.correspondingRemoteMessageURI; }