Interface DiagramEngine
- All Known Implementing Classes:
PlantUmlDiagramEngine
public interface DiagramEngine
Interface for constructing entity and relationship descriptions, as well as generating diagrams,
designed to work with a specific diagramming library.
-
Method Summary
Modifier and TypeMethodDescriptionconstructEntityDescription(String entityName, String dataStoreName, List<AttributeModel> attributeModelList) Constructs a description of an entity in the format required by the selected diagramming library.constructRelationDescription(String currentEntityType, String refEntityType, RelationType relationType, String dataStoreName) Constructs a string representation of a relationship between two entities in a specific format for use with a diagramming library.byte[]generateDiagram(String entitiesDescription, String relationsDescriptions) Generates a diagram in a binary format based on the provided descriptions of entities and their relationships.booleanChecks the availability of the remote diagramming service.
-
Method Details
-
constructEntityDescription
String constructEntityDescription(String entityName, String dataStoreName, List<AttributeModel> attributeModelList) Constructs a description of an entity in the format required by the selected diagramming library.- Parameters:
entityName- the name of the entity to be describeddataStoreName- the name of the data store where the entity residesattributeModelList- a list of attributes that define the structure of the entity- Returns:
- a string representing the description of the entity in the required format
-
constructRelationDescription
String constructRelationDescription(String currentEntityType, String refEntityType, RelationType relationType, String dataStoreName) Constructs a string representation of a relationship between two entities in a specific format for use with a diagramming library.- Parameters:
currentEntityType- the type of the current entity involved in the relationshiprefEntityType- the type of the referenced entity involved in the relationshiprelationType- the type of the relationship (e.g., MANY_TO_ONE, ONE_TO_MANY)dataStoreName- the name of the data store where the entities reside- Returns:
- a string describing the relationship between the specified entities in the required format
-
generateDiagram
Generates a diagram in a binary format based on the provided descriptions of entities and their relationships.- Parameters:
entitiesDescription- a string containing the descriptions of entities to be included in the diagramrelationsDescriptions- a string containing the descriptions of relationships between entities- Returns:
- a byte array representing the generated diagram
-
pingService
boolean pingService()Checks the availability of the remote diagramming service.- Returns:
trueif the service is accessible, otherwisefalse.
-