public class EdgeModel extends Object
It is based on JAXB.
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The current model XML tag name.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addOrReplaceData(DataModel data)
Adds the given
DataModel to the list if its DataModel.getKey() is not already there or replaces
it else. |
static WithId<String,WithSource<String,WithTarget<String,WithData<Build<EdgeModel>>>>> |
builder()
A builder to the current
EdgeModel class. |
static WithSource<String,WithTarget<String,WithLabel<WithProtocol<WithC4Level<String>>>>> |
generateIdFrom(String graphId)
Generates a hopefully unique and repeatably consistent ID for a given graph edge, based on its properties.
|
Optional<String> |
getC4Level()
Returns the
C4Keys.C4_LEVEL property. |
List<DataModel> |
getData()
Returns the edge's list of
DataModel. |
String |
getId()
Returns the edge's ID.
|
Optional<String> |
getLabel()
Returns the
C4Keys.LABEL property. |
Optional<String> |
getProtocol()
Returns the
C4Keys.PROTOCOL property. |
String |
getSource()
Returns the edge's source.
|
String |
getTarget()
Returns the edge's target.
|
void |
setC4Level(SourceType c4Level)
Sets a <data> tag of type
C4Keys.C4_LEVEL and with the given value. |
void |
setLabel(String label)
Sets a <data> tag of type
C4Keys.LABEL and with the given value. |
void |
setProtocol(String protocol)
Sets a <data> tag of type
C4Keys.PROTOCOL and with the given value. |
public static final String TAG_NAME
public static WithId<String,WithSource<String,WithTarget<String,WithData<Build<EdgeModel>>>>> builder()
EdgeModel class.EdgeModel instance.public static WithSource<String,WithTarget<String,WithLabel<WithProtocol<WithC4Level<String>>>>> generateIdFrom(String graphId)
graphId - the ID of the graph holding the current edge.public void addOrReplaceData(DataModel data)
DataModel to the list if its DataModel.getKey() is not already there or replaces
it else.data - the given DataModel to add/replace.public Optional<String> getC4Level()
C4Keys.C4_LEVEL property.C4Keys.C4_LEVEL.public List<DataModel> getData()
DataModel.DataModel.public String getId()
public Optional<String> getLabel()
C4Keys.LABEL property.C4Keys.LABEL.public Optional<String> getProtocol()
C4Keys.PROTOCOL property.C4Keys.PROTOCOL.public String getSource()
public String getTarget()
public void setC4Level(SourceType c4Level)
C4Keys.C4_LEVEL and with the given value.c4Level - the data value to set.public void setLabel(String label)
C4Keys.LABEL and with the given value.label - the data value to set.public void setProtocol(String protocol)
C4Keys.PROTOCOL and with the given value.protocol - the data value to set.Copyright © 2020. All rights reserved.