public abstract class Operation extends Object implements Serializable, Comparable<Operation>
Modifier and Type | Field and Description |
---|---|
protected MessageBase<?> |
messageBase |
protected Relation |
relation |
Modifier | Constructor and Description |
---|---|
protected |
Operation(MessageBase<?> messageBase,
Relation relation) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Operation other) |
boolean |
equals(Object object) |
static Operation |
fromMessageBaseAndRelation(MessageBase<?> messageBase,
Relation relation)
Factory method that creates an XDI operation bound to a given relation.
|
static Operation |
fromRelation(Relation relation)
Factory method that creates an XDI operation bound to a given relation.
|
Message |
getMessage()
Returns the XDI message (template) to which this XDI operation belongs.
|
MessageBase<?> |
getMessageBase()
Returns the XDI message (template) to which this XDI operation belongs.
|
MessageTemplate |
getMessageTemplate()
Returns the XDI message template to which this XDI operation belongs.
|
XDIAddress |
getOperationXDIAddress()
Returns the operation identifier of the XDI operation (e.g.
|
Object |
getParameter(XDIAddress parameterXDIAddress)
Returns a parameter value of this operation.
|
Boolean |
getParameterBoolean(XDIAddress parameterXDIAddress)
Returns a parameter value boolean of this operation.
|
Number |
getParameterNumber(XDIAddress parameterXDIAddress)
Returns a parameter value number of this operation.
|
String |
getParameterString(XDIAddress parameterXDIAddress)
Returns a parameter value string of this operation.
|
Relation |
getRelation()
Returns the underlying relation to which this XDI operation is bound.
|
XDIAddress |
getTargetXDIAddress()
Returns the target address of the operation.
|
XdiInnerRoot |
getTargetXdiInnerRoot()
Returns the target inner root of the operation.
|
IterableIterator<XDIStatement> |
getTargetXDIStatements()
Returns the target statements of the operation.
|
Object |
getVariableLiteralDataValue(XDIArc variableValueXDIArc) |
Map<XDIArc,Object> |
getVariableValues() |
XDIAddress |
getVariableXDIAddressValue(XDIArc variableValueXDIArc) |
List<XDIAddress> |
getVariableXDIAddressValues(XDIArc variableValueXDIArc) |
XDIArc |
getVariableXDIArcValue(XDIArc variableValueXDIArc) |
int |
hashCode() |
static boolean |
isValid(Relation relation)
Checks if an relation is a valid XDI operation.
|
static boolean |
isValidOperationXDIAddress(XDIAddress operationXDIAddress) |
void |
setParameter(XDIAddress parameterXDIAddress,
Object parameterValue)
Sets a parameter value of this operation.
|
void |
setVariableValue(XDIArc variableValueXDIArc,
Object variableValue) |
String |
toString() |
protected MessageBase<?> messageBase
protected Relation relation
protected Operation(MessageBase<?> messageBase, Relation relation)
public static boolean isValid(Relation relation)
relation
- The relation to check.public static boolean isValidOperationXDIAddress(XDIAddress operationXDIAddress)
public static Operation fromMessageBaseAndRelation(MessageBase<?> messageBase, Relation relation)
messageBase
- The XDI message (template) to which this XDI operation belongs.relation
- The relation that is an XDI operation.public static Operation fromRelation(Relation relation)
relation
- The relation that is an XDI operation.public MessageBase<?> getMessageBase()
public Message getMessage()
public MessageTemplate getMessageTemplate()
public Relation getRelation()
public XDIAddress getOperationXDIAddress()
public XdiInnerRoot getTargetXdiInnerRoot()
public XDIAddress getTargetXDIAddress()
public IterableIterator<XDIStatement> getTargetXDIStatements()
public void setParameter(XDIAddress parameterXDIAddress, Object parameterValue)
parameterXDIAddress
- The parameter identifier.parameterValue
- The parameter value.public Object getParameter(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public String getParameterString(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public Number getParameterNumber(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public Boolean getParameterBoolean(XDIAddress parameterXDIAddress)
parameterXDIAddress
- The parameter identifier.public List<XDIAddress> getVariableXDIAddressValues(XDIArc variableValueXDIArc)
public XDIAddress getVariableXDIAddressValue(XDIArc variableValueXDIArc)
public int compareTo(Operation other)
compareTo
in interface Comparable<Operation>
Copyright © 2017. All rights reserved.