Package lu.kbra.modelizer_next.domain
Class DiagramModel
java.lang.Object
lu.kbra.modelizer_next.domain.DiagramModel
- All Implemented Interfaces:
PostConstructOwner,PreDeconstructOwner
Root model for diagram elements. It stores classes, links, comments, and their relationships.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClass(ClassModel classModel) voidaddComment(CommentModel commentModel) voidaddConceptualLink(LinkModel linkModel) voidaddTechnicalLink(LinkModel linkModel) Returns the all links.Returns the classes.getClasses(PanelType panelType) Returns the comments.Returns the conceptual links.Returns the technical links.voidRestores derived model state after JSON deserialization.voidPrepares the model before it is serialized.voidremoveClass(ClassModel classModel) voidremoveComment(CommentModel commentModel) voidremoveConceptualLink(LinkModel linkModel) voidremoveTechnicalLink(LinkModel linkModel) voidsetClasses(List<ClassModel> classes) Sets the classes.voidsetComments(List<CommentModel> comments) Sets the comments.voidsetConceptualLinks(List<LinkModel> conceptualLinks) voidsetTechnicalLinks(List<LinkModel> technicalLinks) toString()Builds a debug string for this diagram model.voidvalidateClassByPanel(ClassModel classModel) voidValidates the data before it is used.
-
Constructor Details
-
DiagramModel
public DiagramModel()Creates a diagram model instance.
-
-
Method Details
-
addClass
-
addComment
-
addConceptualLink
-
addTechnicalLink
-
buildClassByIdIndex
-
buildClassesByPanelIndex
-
buildCommentByIdIndex
-
buildConceptualLinkByIdIndex
-
buildLinkByAssociationClassIdIndex
-
buildLinkByIdIndex
-
buildTechnicalLinkByIdIndex
-
getAllLinks
Returns the all links.- Returns:
- the all links
-
getClassById
-
getClasses
Returns the classes.- Returns:
- the classes
-
getClasses
-
getClassesByPanel
-
getCommentById
-
getComments
Returns the comments.- Returns:
- the comments
-
getConceptualLinkById
-
getConceptualLinks
Returns the conceptual links.- Returns:
- the conceptual links
-
getLinkByAssociationClassId
-
getLinkById
-
getTechnicalLinkById
-
getTechnicalLinks
Returns the technical links.- Returns:
- the technical links
-
postConstruct
public void postConstruct()Restores derived model state after JSON deserialization.- Specified by:
postConstructin interfacePostConstructOwner
-
preDeconstruct
public void preDeconstruct()Prepares the model before it is serialized.- Specified by:
preDeconstructin interfacePreDeconstructOwner
-
removeClass
-
removeComment
-
removeConceptualLink
-
removeTechnicalLink
-
setClasses
Sets the classes.- Parameters:
classes- values for classes
-
setComments
Sets the comments.- Parameters:
comments- values for comments
-
setConceptualLinks
-
setTechnicalLinks
-
toString
Builds a debug string for this diagram model. -
validateClassByIdIndex
-
validateClassByPanel
-
validateCommentsByIdIndex
-
validateConceptualLinkByIdIndex
-
validateData
public void validateData()Validates the data before it is used. -
validateLinkByAssociationClassIdIndex
-
validateLinkByIdIndex
-
validateTechnicalLinkByIdIndex
-