Class ProtocolParameterReader
java.lang.Object
es.uam.eps.ir.relison.grid.ParametersReader
es.uam.eps.ir.relison.grid.diffusion.protocol.ProtocolParameterReader
public class ProtocolParameterReader extends ParametersReader
Reads the parameters for diffusion protocols.
-
Field Summary
Fields Modifier and Type Field Description private ExpirationParameterReader
expiration
In case the protocol is custom, the expiration mechanismprivate static java.lang.String
EXPIRATION
Identifier for the expiration mechanismprivate java.lang.String
name
Protocol nameprivate static java.lang.String
NAME
Identifier for the name of the protocolprivate Parameters
params
In case the protocol is preconfigured, its parametersprivate static java.lang.String
PARAMS
Identifier for the parameters of the protocolprivate boolean
preconfigured
Indicates if the protocol is custom or preconfiguredprivate PropagationParameterReader
propagation
In case the protocol is custom, the propagation mechanismprivate static java.lang.String
PROPAGATION
Identifier for the propagation mechanismprivate SelectionParameterReader
selection
In case the protocol is custom, the protocol mechanismprivate static java.lang.String
SELECTION
Identifier for the protocol mechanismprivate SightParameterReader
sight
In case the protocol is custom, the sight mechanismprivate static java.lang.String
SIGHT
Identifier for the sight mechanismprivate static java.lang.String
TYPE
Identifier for the type of the protocolprivate UpdateParameterReader
update
In case the protocol is custom, the update mechanismprivate static java.lang.String
UPDATE
Identifier for the update mechanism -
Constructor Summary
Constructors Constructor Description ProtocolParameterReader()
-
Method Summary
Modifier and Type Method Description ExpirationParameterReader
getExpiration()
Obtains the parameters for the expiration mechanism.java.lang.String
getName()
Obtains the name of the protocol.Parameters
getParams()
Obtains the parameters for the preconfigured protocol.PropagationParameterReader
getPropagation()
Obtains the parameters for the propagation mechanism.SelectionParameterReader
getSelection()
Obtains the parameters for the protocol mechanism.SightParameterReader
getSight()
Obtains the parameters for the sight mechanism.UpdateParameterReader
getUpdate()
Obtains the parameters for the update mechanism.boolean
isPreconfigured()
Indicates if the protocol is preconfigured or custom.java.lang.String
printProtocol()
Shows the configuration of a protocol.void
readProtocol(java.util.Map<java.lang.String,java.lang.Object> protocol)
Reads a protocol from an XML.Methods inherited from class es.uam.eps.ir.relison.grid.ParametersReader
readBoolean, readDouble, readInteger, readLong, readOrientation, readParameters, readParameterValues, readString
-
Field Details
-
name
private java.lang.String nameProtocol name -
params
In case the protocol is preconfigured, its parameters -
selection
In case the protocol is custom, the protocol mechanism -
expiration
In case the protocol is custom, the expiration mechanism -
update
In case the protocol is custom, the update mechanism -
propagation
In case the protocol is custom, the propagation mechanism -
sight
In case the protocol is custom, the sight mechanism -
preconfigured
private boolean preconfiguredIndicates if the protocol is custom or preconfigured -
NAME
private static final java.lang.String NAMEIdentifier for the name of the protocol- See Also:
- Constant Field Values
-
TYPE
private static final java.lang.String TYPEIdentifier for the type of the protocol- See Also:
- Constant Field Values
-
PARAMS
private static final java.lang.String PARAMSIdentifier for the parameters of the protocol- See Also:
- Constant Field Values
-
SELECTION
private static final java.lang.String SELECTIONIdentifier for the protocol mechanism- See Also:
- Constant Field Values
-
EXPIRATION
private static final java.lang.String EXPIRATIONIdentifier for the expiration mechanism- See Also:
- Constant Field Values
-
UPDATE
private static final java.lang.String UPDATEIdentifier for the update mechanism- See Also:
- Constant Field Values
-
PROPAGATION
private static final java.lang.String PROPAGATIONIdentifier for the propagation mechanism- See Also:
- Constant Field Values
-
SIGHT
private static final java.lang.String SIGHTIdentifier for the sight mechanism- See Also:
- Constant Field Values
-
-
Constructor Details
-
ProtocolParameterReader
public ProtocolParameterReader()
-
-
Method Details
-
readProtocol
public void readProtocol(java.util.Map<java.lang.String,java.lang.Object> protocol)Reads a protocol from an XML.- Parameters:
protocol
- the element containing the protocol information.
-
getName
public java.lang.String getName()Obtains the name of the protocol.- Returns:
- the name of the protocol.
-
getParams
Obtains the parameters for the preconfigured protocol.- Returns:
- the parameters if it is preconfigured, null if not.
-
getSelection
Obtains the parameters for the protocol mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getExpiration
Obtains the parameters for the expiration mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getUpdate
Obtains the parameters for the update mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getPropagation
Obtains the parameters for the propagation mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
getSight
Obtains the parameters for the sight mechanism.- Returns:
- the parameters if it is not preconfigured, null if not.
-
isPreconfigured
public boolean isPreconfigured()Indicates if the protocol is preconfigured or custom.- Returns:
- true if the protocol is preconfigured, false if it is custom.
-
printProtocol
public java.lang.String printProtocol()Shows the configuration of a protocol.- Returns:
- a string containing the configuration of the protocol.
-