crldiagramdomain

package
v0.0.0-...-eb15970 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 2, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package crldiagramdomain defines the Diagram domain. This is a pre-defined domain that is, itself, represented as a CRLElement and identified with the CrlDiagramDomainURI. This concept space contains the prototypes of all Elements used to construct CrlDiagrams. Included are:

	CrlDiagram: the diagram itself
	CrlDiagramNode: a node in the diagram
	CrlDiagramLink: a link in the diagram
    CrlDiagramPointer: a pointer shown as a link in the diagram
	CrlDiagramAnchoredText: stand-alone text anchored to a reference point in the diagram

These classes are intended to hold all of the information about the diagram that is not specific to the rendering engine.

Intended Usage CRL Elements, in general, can have functions associated with them. When refinements of the elements are created, modified, or deleted, these functions are called. The strategy used for diagrams is to place all rendering-specific code in functions associated with the deining concepts. This is accomplished using the FunctionCallManager.AddFunctionCall() method. Note that this registration is NOT done in the core diagram package, but rather in the package providing the rendering engine linkage.

Instances of the prototpes can be conveniently instantiated using the supplied New<type>() functions. This creates a refinement of the type and adds the appropriate children, with each child being a refinement of its defining type.

Index

Constants

View Source
const IconSize = 16.0

IconSize defines the height and width of icons

View Source
const NodeLineWidth = 2.0

NodeLineWidth is the width of the line bordering the node image

View Source
const NodePadWidth = 1.0

NodePadWidth is the width of the padding surrounding the icon, displayLabel, and abstractionDisplayLabel

Variables

View Source
var CrlDiagramAbstractPointerURI = CrlDiagramDomainURI + "/" + "AbstractPointer"

CrlDiagramAbstractPointerURI identifies the Abstract of an Element represented as a link

View Source
var CrlDiagramAnchoredTextAnchorXURI = CrlDiagramAnchoredTextURI + "/" + "AnchorX"

CrlDiagramAnchoredTextAnchorXURI identifies the x coordinate of the anchored text anchor point

View Source
var CrlDiagramAnchoredTextAnchorYURI = CrlDiagramAnchoredTextURI + "/" + "AnchorY"

CrlDiagramAnchoredTextAnchorYURI identifies the y coordinate of the anchored text anchor point

View Source
var CrlDiagramAnchoredTextOffsetXURI = CrlDiagramAnchoredTextURI + "/" + "OffsetX"

CrlDiagramAnchoredTextOffsetXURI identifies the x offset of the anchored text anchor point

View Source
var CrlDiagramAnchoredTextOffsetYURI = CrlDiagramAnchoredTextURI + "/" + "OffsetY"

CrlDiagramAnchoredTextOffsetYURI identifies the y offset of the anchored text anchor point

View Source
var CrlDiagramAnchoredTextURI = CrlDiagramDomainURI + "/" + "AnchoredText"

CrlDiagramAnchoredTextURI identifies the concept of an Anchored Text

View Source
var CrlDiagramAnchoredTextVisibleURI = CrlDiagramAnchoredTextURI + "/" + "Visible"

CrlDiagramAnchoredTextVisibleURI identifies the boolean indicating whether the anchored text is presently viewable

View Source
var CrlDiagramDomainURI = CrlDiagramPrefix + "/CrlDiagramDomain"

CrlDiagramDomainURI identifies concept space containing all concepts related to the CrlDiagram

View Source
var CrlDiagramElementAbstractionDisplayLabelURI = CrlDiagramElementURI + "/" + "AbstractionDisplayLabel"

CrlDiagramElementAbstractionDisplayLabelURI identifies the abstraction display label concept to be used when displaying the element

View Source
var CrlDiagramElementBGColorURI = CrlDiagramElementURI + "/" + "BGColor"

CrlDiagramElementBGColorURI identifies the background color to be used when displaying the element

View Source
var CrlDiagramElementDisplayLabelURI = CrlDiagramElementURI + "/" + "DisplayLabel"

CrlDiagramElementDisplayLabelURI identifies the display label concept to be used when displaying the element

View Source
var CrlDiagramElementLineColorURI = CrlDiagramElementURI + "/" + "LineColor"

CrlDiagramElementLineColorURI identifies the line color to be used when displaying the element

View Source
var CrlDiagramElementModelReferenceURI = CrlDiagramElementURI + "/" + "ModelReference"

CrlDiagramElementModelReferenceURI identifies the reference to the model element represented by the element

View Source
var CrlDiagramElementPointerURI = CrlDiagramDomainURI + "/" + "ElementPointer"

CrlDiagramElementPointerURI identifies the element pointer of a Reference represented as a link

View Source
var CrlDiagramElementURI = CrlDiagramDomainURI + "/" + "CrlDiagramElement"

CrlDiagramElementURI identifies the CrlDiagramElement concept

View Source
var CrlDiagramHeightURI = CrlDiagramURI + "/" + "Height"

CrlDiagramHeightURI identifies the CrlDiagramHeight concept

View Source
var CrlDiagramLinkAbstractionDisplayLabelURI = CrlDiagramLinkURI + "/" + "AbstractionDisplayLabel"

CrlDiagramLinkAbstractionDisplayLabelURI identifies the anchored text used as the abstraction label on a link

View Source
var CrlDiagramLinkDisplayLabelURI = CrlDiagramLinkURI + "/" + "DisplayLabel"

CrlDiagramLinkDisplayLabelURI identifies the anchored text being used as the display label on a link

View Source
var CrlDiagramLinkMultiplicityURI = CrlDiagramLinkURI + "/" + "Multiplicity"

CrlDiagramLinkMultiplicityURI identifies the anchored text used to display multiplicity

View Source
var CrlDiagramLinkSourceURI = CrlDiagramLinkURI + "/" + "Source"

CrlDiagramLinkSourceURI identifies the concept that is the source of the link

View Source
var CrlDiagramLinkTargetURI = CrlDiagramLinkURI + "/" + "Target"

CrlDiagramLinkTargetURI identifies the concept that is the target of the link

View Source
var CrlDiagramLinkURI = CrlDiagramDomainURI + "/" + "CrlDiagramLink"

CrlDiagramLinkURI identifies the CrlDiagramLink concept

View Source
var CrlDiagramNodeAbstractionDisplayLabelURI = CrlDiagramElementURI + "/" + "AbstractionDisplayLabel"

CrlDiagramNodeAbstractionDisplayLabelURI identifies the abstraction display label concept to be used when displaying the element

View Source
var CrlDiagramNodeDisplayLabelYOffsetURI = CrlDiagramNodeURI + "/" + "DisplayLabelYOffset"

CrlDiagramNodeDisplayLabelYOffsetURI identifies the Y offset for the display label within the node

View Source
var CrlDiagramNodeHeightURI = CrlDiagramNodeURI + "/" + "Height"

CrlDiagramNodeHeightURI identifies the height of the node

View Source
var CrlDiagramNodeURI = CrlDiagramDomainURI + "/" + "CrlDiagramNode"

CrlDiagramNodeURI identifies the CrlDiagramNode concept

View Source
var CrlDiagramNodeWidthURI = CrlDiagramNodeURI + "/" + "Width"

CrlDiagramNodeWidthURI identifies the width of the node

View Source
var CrlDiagramNodeXURI = CrlDiagramNodeURI + "/" + "X"

CrlDiagramNodeXURI identifies the X coordinate of the node

View Source
var CrlDiagramNodeYURI = CrlDiagramNodeURI + "/" + "Y"

CrlDiagramNodeYURI identifies the Y coordinate of the node

View Source
var CrlDiagramOwnerPointerURI = CrlDiagramDomainURI + "/" + "OwnerPointer"

CrlDiagramOwnerPointerURI identifies the owner of an Element represented as a link

View Source
var CrlDiagramPointerURI = CrlDiagramDomainURI + "/" + "Pointer"

CrlDiagramPointerURI identifies a pointer represented as a link

View Source
var CrlDiagramPrefix = "http://activeCrl.com"

CrlDiagramPrefix is the prefix for all URIs related to CrlDiagram

View Source
var CrlDiagramReferenceLinkURI = CrlDiagramDomainURI + "/" + "ReferenceLink"

CrlDiagramReferenceLinkURI identifies the Reference represented as a link in the diagram

View Source
var CrlDiagramRefinedPointerURI = CrlDiagramDomainURI + "/" + "RefinedPointer"

CrlDiagramRefinedPointerURI identifies the refined element of a Refinement represented as a link

View Source
var CrlDiagramRefinementLinkURI = CrlDiagramDomainURI + "/" + "RefinementLink"

CrlDiagramRefinementLinkURI identifies the Refinement represented as a link in the diagram

View Source
var CrlDiagramURI = CrlDiagramDomainURI + "/" + "CrlDiagram"

CrlDiagramURI identifies the CrlDiagram concept

View Source
var CrlDiagramWidthURI = CrlDiagramURI + "/" + "Width"

CrlDiagramWidthURI identifies the CrlDiagramWidth concept

Functions

func BuildCrlDiagramDomain

func BuildCrlDiagramDomain(uOfD *core.UniverseOfDiscourse, trans *core.Transaction) core.Concept

BuildCrlDiagramDomain builds the CrlDiagram concept space and adds it to the uOfD

func GetAbstractionDisplayLabel

func GetAbstractionDisplayLabel(diagramElement core.Concept, trans *core.Transaction) string

GetAbstractionDisplayLabel is a convenience function for getting the AbstractionDisplayLabel value for a DiagramElement

func GetBGColor

func GetBGColor(diagramElement core.Concept, trans *core.Transaction) string

GetBGColor is a convenience function for getting the backgound color value of a DiagramElement

func GetDisplayLabel

func GetDisplayLabel(diagramElement core.Concept, trans *core.Transaction) string

GetDisplayLabel is a convenience function for getting the DisplayLabel value of a DiagramElement

func GetElementPointer

func GetElementPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetElementPointer returns the elementPointer for the concept if one exists

func GetFirstElementRepresentingConcept

func GetFirstElementRepresentingConcept(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConcept returns the first diagram element that represents the indicated concept

func GetFirstElementRepresentingConceptAbstractPointer

func GetFirstElementRepresentingConceptAbstractPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptAbstractPointer returns the first diagram element that represents the indicated concept's AbstractPointer

func GetFirstElementRepresentingConceptElementPointer

func GetFirstElementRepresentingConceptElementPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptElementPointer returns the first diagram element that represents the indicated concept's ElementPointer

func GetFirstElementRepresentingConceptID

func GetFirstElementRepresentingConceptID(diagram core.Concept, conceptID string, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptID returns the first diagram element that represents the indicated concept

func GetFirstElementRepresentingConceptIDAbstractPointer

func GetFirstElementRepresentingConceptIDAbstractPointer(diagram core.Concept, conceptID string, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptIDAbstractPointer returns the first diagram element that represents the indicated concept's AbstractPointer

func GetFirstElementRepresentingConceptIDElementPointer

func GetFirstElementRepresentingConceptIDElementPointer(diagram core.Concept, conceptID string, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptIDElementPointer returns the first diagram element that represents the indicated concept's ElementPointer

func GetFirstElementRepresentingConceptIDOwnerPointer

func GetFirstElementRepresentingConceptIDOwnerPointer(diagram core.Concept, conceptID string, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptIDOwnerPointer returns the first diagram element that represents the indicated concept's OwnerPointer

func GetFirstElementRepresentingConceptIDRefinedPointer

func GetFirstElementRepresentingConceptIDRefinedPointer(diagram core.Concept, conceptID string, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptIDRefinedPointer returns the first diagram element that represents the indicated concept's RefinedPointer

func GetFirstElementRepresentingConceptOwnerPointer

func GetFirstElementRepresentingConceptOwnerPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptOwnerPointer returns the first diagram element that represents the indicated concept's OwnerPointer

func GetFirstElementRepresentingConceptRefinedPointer

func GetFirstElementRepresentingConceptRefinedPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetFirstElementRepresentingConceptRefinedPointer returns the first diagram element that represents the indicated concept's RefinedPointer

func GetLineColor

func GetLineColor(diagramElement core.Concept, trans *core.Transaction) string

GetLineColor is a convenience function for getting the LineColor value of a DiagramElement

func GetLinkSource

func GetLinkSource(diagramLink core.Concept, trans *core.Transaction) core.Concept

GetLinkSource is a convenience function for getting the source concept of a link

func GetLinkSourceReference

func GetLinkSourceReference(diagramLink core.Concept, trans *core.Transaction) core.Concept

GetLinkSourceReference is a convenience function for getting the source reference of a link

func GetLinkTarget

func GetLinkTarget(diagramLink core.Concept, trans *core.Transaction) core.Concept

GetLinkTarget is a convenience function for getting the target concept of a link

func GetLinkTargetReference

func GetLinkTargetReference(diagramLink core.Concept, trans *core.Transaction) core.Concept

GetLinkTargetReference is a convenience function for getting the target reference of a link

func GetNodeHeight

func GetNodeHeight(diagramNode core.Concept, trans *core.Transaction) float64

GetNodeHeight is a convenience function for getting the Height value of a node's position

func GetNodeWidth

func GetNodeWidth(diagramNode core.Concept, trans *core.Transaction) float64

GetNodeWidth is a convenience function for getting the Width value of a node's position

func GetNodeX

func GetNodeX(diagramNode core.Concept, trans *core.Transaction) float64

GetNodeX is a convenience function for getting the X value of a node's position

func GetNodeY

func GetNodeY(diagramNode core.Concept, trans *core.Transaction) float64

GetNodeY is a convenience function for getting the X value of a node's position

func GetOwnerPointer

func GetOwnerPointer(diagram core.Concept, concept core.Concept, trans *core.Transaction) core.Concept

GetOwnerPointer returns the ownerPointer for the concept if one exists

func GetReferencedModelConcept

func GetReferencedModelConcept(diagramElement core.Concept, trans *core.Transaction) core.Concept

GetReferencedModelConcept is a function on a CrlDiagramNode that returns the model element represented by the diagram node

func Int26_6ToFloat

func Int26_6ToFloat(val fixed.Int26_6) float64

Int26_6ToFloat converts a fixed point 26_6 integer to a floating point number

func IsDiagram

func IsDiagram(el core.Concept, trans *core.Transaction) bool

IsDiagram returns true if the supplied element is a CrlDiagram

func IsDiagramAbstractPointer

func IsDiagramAbstractPointer(el core.Concept, trans *core.Transaction) bool

IsDiagramAbstractPointer returns true if the supplied element is a CrlDiagramAbstractPointer

func IsDiagramElement

func IsDiagramElement(el core.Concept, trans *core.Transaction) bool

IsDiagramElement returns true if the supplied element is a CrlDiagramElement

func IsDiagramElementPointer

func IsDiagramElementPointer(el core.Concept, trans *core.Transaction) bool

IsDiagramElementPointer returns true if the supplied element is a CrlDiagramElementPointer

func IsDiagramLink(el core.Concept, trans *core.Transaction) bool

IsDiagramLink returns true if the supplied element is a CrlDiagramLink

func IsDiagramNode

func IsDiagramNode(el core.Concept, trans *core.Transaction) bool

IsDiagramNode returns true if the supplied element is a CrlDiagramNode

func IsDiagramOwnerPointer

func IsDiagramOwnerPointer(el core.Concept, trans *core.Transaction) bool

IsDiagramOwnerPointer returns true if the supplied element is a CrlDiagramOwnerPointer

func IsDiagramPointer

func IsDiagramPointer(el core.Concept, trans *core.Transaction) bool

IsDiagramPointer returns true if the supplied element is a CrlDiagramPointer

func IsDiagramReferenceLink(el core.Concept, trans *core.Transaction) bool

IsDiagramReferenceLink returns true if the supplied element is a CrlDiagramReferenceLink

func IsDiagramRefinedPointer

func IsDiagramRefinedPointer(el core.Concept, trans *core.Transaction) bool

IsDiagramRefinedPointer returns true if the supplied element is a CrlDiagramRefinedPointer

func IsDiagramRefinementLink(el core.Concept, trans *core.Transaction) bool

IsDiagramRefinementLink returns true if the supplied element is a CrlDiagramRefinementLink

func IsDisplayLabel

func IsDisplayLabel(el core.Concept, trans *core.Transaction) bool

IsDisplayLabel returns true if the supplied Literal is the DisplayLabel

func IsModelReference

func IsModelReference(el core.Concept, trans *core.Transaction) bool

IsModelReference returns true if the supplied element is a ModelReference

func NewDiagram

func NewDiagram(trans *core.Transaction) (core.Concept, error)

NewDiagram creates a new diagram

func NewDiagramAbstractPointer

func NewDiagramAbstractPointer(trans *core.Transaction) (core.Concept, error)

NewDiagramAbstractPointer creates a new DiagramAbstractPointer

func NewDiagramElementPointer

func NewDiagramElementPointer(trans *core.Transaction) (core.Concept, error)

NewDiagramElementPointer creates a new DiagramElementPointer

func NewDiagramNode

func NewDiagramNode(trans *core.Transaction) (core.Concept, error)

NewDiagramNode creates a new diagram node

func NewDiagramOwnerPointer

func NewDiagramOwnerPointer(trans *core.Transaction) (core.Concept, error)

NewDiagramOwnerPointer creates a new DiagramOwnerPointer

func NewDiagramReferenceLink(trans *core.Transaction) (core.Concept, error)

NewDiagramReferenceLink creates a new diagram link to represent a reference

func NewDiagramRefinedPointer

func NewDiagramRefinedPointer(trans *core.Transaction) (core.Concept, error)

NewDiagramRefinedPointer creates a new DiagramRefinedPointer

func NewDiagramRefinementLink(trans *core.Transaction) (core.Concept, error)

NewDiagramRefinementLink creates a new diagram link

func SetAbstractionDisplayLabel

func SetAbstractionDisplayLabel(diagramElement core.Concept, value string, trans *core.Transaction)

SetAbstractionDisplayLabel is a function on a CrlDiagramNode that sets the abstraction display label of the diagram node

func SetBGColor

func SetBGColor(diagramElement core.Concept, value string, trans *core.Transaction)

SetBGColor is a function on a CrlDiagramNode that sets the background color for the diagram element. If the diagram element is a pointer, the value is ignored and the label is set to the empty string

func SetDisplayLabel

func SetDisplayLabel(diagramElement core.Concept, value string, trans *core.Transaction)

SetDisplayLabel is a function on a CrlDiagramNode that sets the display label of the diagram element. If the diagram element is a pointer, the value is ignored and the label is set to the empty string

func SetLineColor

func SetLineColor(diagramElement core.Concept, value string, trans *core.Transaction)

SetLineColor is a function on a CrlDiagramElement that sets the line color for the diagram element.

func SetLinkSource

func SetLinkSource(diagramLink core.Concept, source core.Concept, trans *core.Transaction)

SetLinkSource is a convenience function for setting the source concept of a link

func SetLinkTarget

func SetLinkTarget(diagramLink core.Concept, target core.Concept, trans *core.Transaction)

SetLinkTarget is a convenience function for setting the target concept of a link

func SetNodeHeight

func SetNodeHeight(diagramNode core.Concept, value float64, trans *core.Transaction)

SetNodeHeight is a function on a CrlDiagramNode that sets the height of the diagram node

func SetNodeWidth

func SetNodeWidth(diagramNode core.Concept, value float64, trans *core.Transaction)

SetNodeWidth is a function on a CrlDiagramNode that sets the width of the diagram node

func SetNodeX

func SetNodeX(diagramNode core.Concept, value float64, trans *core.Transaction)

SetNodeX is a function on a CrlDiagramNode that sets the x of the diagram node

func SetNodeY

func SetNodeY(diagramNode core.Concept, value float64, trans *core.Transaction)

SetNodeY is a function on a CrlDiagramNode that sets the y of the diagram node

func SetReferencedModelConcept

func SetReferencedModelConcept(diagramElement core.Concept, el core.Concept, trans *core.Transaction)

SetReferencedModelConcept is a function on a CrlDiagramNode that sets the model element represented by the diagram node

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL