Esempio n. 1
0
def graph (app_type) :
    """Class/association graph describing Auth partial object model"""
    result = MOM.Graph.Spec.Graph \
        ( app_type
        , ET.Auth.Account_in_Group
            ( Role.left
                ( offset = CD.W
                )
            , Role.right
                ( offset = CD.E
                )
            )
        , desc  = _T
            ("Class/association graph displaying Auth partial object model")
        , title = _T ("Auth graph")
        )
    if hasattr (GTW.OMP, "PAP") and hasattr (GTW.OMP.PAP, "Person_has_Account"):
        result ["Auth.Account"]._add \
            ( ET.PAP.Person_has_Account
                ( Role.left
                    ( offset       = CD.S)
                , Role.right
                    ( guide_offset = 1.0
                    )
                , offset      = CD.S
                )
            )
    return result
Esempio n. 2
0
File: graph.py Progetto: Tapyr/tapyr
def graph(app_type):
    """Class/association graph describing Auth partial object model"""
    result = MOM.Graph.Spec.Graph(
        app_type,
        ET.Auth.Account_in_Group(Role.left(offset=CD.W), Role.right(offset=CD.E)),
        desc=_T("Class/association graph displaying Auth partial object model"),
        title=_T("Auth graph"),
    )
    if hasattr(GTW.OMP, "PAP") and hasattr(GTW.OMP.PAP, "Person_has_Account"):
        result["Auth.Account"]._add(
            ET.PAP.Person_has_Account(Role.left(offset=CD.S), Role.right(guide_offset=1.0), offset=CD.S)
        )
    return result
Esempio n. 3
0
def graph (app_type) :
    """Class/association graph displaying SRM partial object model"""
    return MOM.Graph.Spec.Graph \
        ( app_type
        , ET.SRM.Boat_in_Regatta
            ( Role.left
                ( Role.left (offset = CD.W)
                , offset = CD.W
                )
            , Role.right
                ( Role.left
                    ( Attr.club (offset = CD.N * 2)
                    , ET.SRM.Page
                        ( Attr.event
                        , offset = CD.S
                        )
                    , offset = CD.E
                    )
                , offset = CD.E
                )
            , ET.SRM.Crew_Member
                ( Role.left  (anchor = False, source_side = "W")
                , Role.right (anchor = False, source_side = "W")
                , offset = CD.NE
                )
            , ET.SRM.Team_has_Boat_in_Regatta
                ( Role.left
                    ( ET.SRM.Regatta_C
                        ( IS_A.SRM.Regatta
                        , offset = CD.E
                        )
                    , offset = CD.S
                    )
                , offset = CD.S
                )
            , ET.SRM.Race_Result (offset = CD.SW)
            , Attr.skipper
                ( Role.left
                    ( IS_A.PAP.Subject (offset = CD.E * 2)
                    , offset = CD.N
                    )
                , Attr.club (IS_A.PAP.Subject)
                , offset = CD.N * 2
                )
            )
        , desc  = _T
            ("Class/association graph displaying SRM partial object model")
        , title = _T ("SRM graph")
        )
Esempio n. 4
0
File: graph.py Progetto: Tapyr/tapyr
def graph (app_type) :
    """Class/association graph displaying SRM partial object model"""
    return MOM.Graph.Spec.Graph \
        ( app_type
        , ET.SRM.Boat_in_Regatta
            ( Role.left
                ( Role.left (offset = CD.W)
                , offset = CD.W
                )
            , Role.right
                ( Role.left
                    ( Attr.club (offset = CD.N * 2)
                    , ET.SRM.Page
                        ( Attr.event
                        , offset = CD.S
                        )
                    , offset = CD.E
                    )
                , offset = CD.E
                )
            , ET.SRM.Crew_Member
                ( Role.left  (anchor = False, source_side = "W")
                , Role.right (anchor = False, source_side = "W")
                , offset = CD.NE
                )
            , ET.SRM.Team_has_Boat_in_Regatta
                ( Role.left
                    ( ET.SRM.Regatta_C
                        ( IS_A.SRM.Regatta
                        , offset = CD.E
                        )
                    , offset = CD.S
                    )
                , offset = CD.S
                )
            , ET.SRM.Race_Result (offset = CD.SW)
            , Attr.skipper
                ( Role.left
                    ( IS_A.PAP.Subject (offset = CD.E * 2)
                    , offset = CD.N
                    )
                , Attr.club (IS_A.PAP.Subject)
                , offset = CD.N * 2
                )
            )
        , desc  = _T
            ("Class/association graph displaying SRM partial object model")
        , title = _T ("SRM graph")
        )
Esempio n. 5
0
def graph (app_type) :
    """Class/association graph describing MOM meta object model"""
    doc_p = hasattr (MOM, "Document")
    iht_p = hasattr (MOM, "Id_Entity_has_Tag")
    result = MOM.Graph.Spec.Graph \
        ( app_type
        , ET.MOM.Id_Entity
            ( Child.MOM.Object    (offset     = CD.N)
            , Child.MOM.Link1
                ( Attr.left       (guide_prio = 0.25)
                , offset     = CD.W
                )
            , Child.MOM._Link_n_
                ( Attr.left       (guide_prio = 0.25)
                , Attr.right      (guide_prio = 0.75)
                , Child.MOM.Link2
                    ( offset = CD.E
                    )
                , Child.MOM.Link3
                    ( Attr.middle ()
                    , offset = CD.W
                    )
                , guide_prio = 0.5
                , offset     = CD.S
                )
            ,
            )
        , desc  = _T ("Graph displaying MOM meta object model")
        , title = _T ("MOM graph")
        )
    if doc_p :
        result ["MOM.Link1"]._add \
            ( Child.MOM.Document
                ( offset     = CD.N
                )
            )
    if iht_p :
        result ["MOM.Id_Entity"]._add \
            ( ET.MOM.Id_Entity_has_Tag
                ( IS_A.MOM.Link2
                , Role.left  ()
                , Role.right
                    ( IS_A.MOM.Object
                    , offset     = CD.N
                    )
                , offset     = CD.E
                )
            )
    return result
Esempio n. 6
0
def graph(app_type):
    return MOM.Graph.Spec.Graph \
        ( app_type
        , ET.CNDB.Device
            ( Role.left
                ( ET.CNDB.Device_Type_made_by_Company
                    ( Role.right
                        ( IS_A.PAP.Group
                            ( IS_A.PAP.Subject
                                ( Child.PAP.Person
                                    ( offset       = CD.S
                                    )
                                , offset       = CD.S
                                )
                            , Child.PAP.Adhoc_Group
                                ( guide_offset = 0.5
                                , offset       = CD.NE
                                )
                            , offset       = CD.S
                            )
                        , offset       = CD.NE
                        , source_side  = "E"
                        , target_side  = "W"
                        )
                    , offset       = CD.E
                    )
                , offset       = CD.E
                )
            , Child.CNDB.Antenna
                ( Role.left
                    ( IS_A.CNDB.Device_Type
                    , ET.CNDB.Antenna_Band (offset = CD.E)
                    , offset       = CD.E
                    )
                , offset       = CD.N
                )
            , Child.CNDB.Net_Device
                ( Role.left
                    ( IS_A.CNDB.Device_Type
                    , offset       = CD.N
                    )
                , Attr.node
                    ( Attr.manager
                        ( guide_offset = 0.75
                        , source_side = "E"
                        , target_side = "W"
                        )
                    , Attr.owner
                        ( guide_offset = 0.5
                        , source_side  = "E"
                        , target_side  = "W"
                        )
                    , offset = CD.N + CD.E
                    )
                , ET.CNDB.Net_Interface (offset = CD.S + CD.E)
                , offset = CD.E + CD.S * 2
                )
            )
        , ET.CNDB.Net_Interface
            ( Role.left (guide_offset = 1.0)
            , ET.CNDB.Net_Link (offset = CD.S)
            , ET.CNDB._Net_Credentials_
                ( Role.left (guide_offset = 1.0)
                , offset       = CD.N
                )
            , ET.CNDB.Net_Interface_in_IP_Network
                ( Role.right
                    ( ET.CNDB.IP_Network_in_IP_Pool
                        ( Role.right
                            ( ET.CNDB.IP_Pool_permits_Group
                                ( offset       = CD.N
                                )
                            , offset       = CD.N
                            )
                        , offset       = CD.N
                        )
                    , Child.CNDB.IP4_Network (offset = CD.SW)
                    , Child.CNDB.IP6_Network (offset = CD.S)
                    , offset = CD.E
                    )
                , Role.left
                    ( guide_offset = 0.5
                    )
                , offset       = CD.E
                )
            , Child.CNDB.Wireless_Interface
                ( Skip.left
                , ET.CNDB.Wireless_Interface_uses_Antenna
                    ( Role.left
                        ( guide_offset = 1.5
                        )
                    , Role.right
                        ( anchor      = False
                        , source_side = "W"
                        , target_side = "W"
                        )
                    , offset       = CD.N + CD.W
                    )
                , ET.CNDB.Wireless_Interface_uses_Wireless_Channel
                    ( Role.right
                        ( Role.left
                            ( offset       = CD.S
                            )
                        , offset       = CD.S
                        )
                    , offset       = CD.W
                    )
                , offset       = CD.W
                )
            , Child.CNDB.Wired_Interface
                ( Skip.left
                , offset       = CD.SW
                )
            )
        , desc  = _T ("Graph displaying Funkfeuer object model")
        , title = _T ("CNDB graph")
        )
Esempio n. 7
0
def graph(app_type):
    """Class/association graph displaying PAP partial object model"""
    ag_p = hasattr(GTW.OMP.PAP, "Adhoc_Group")
    ass_p = hasattr(GTW.OMP.PAP, "Association")
    le_p = hasattr(GTW.OMP.PAP, "Legal_Entity")
    shp_off = CD.S
    result  = MOM.Graph.Spec.Graph \
        ( app_type
        , ET.PAP.Subject_has_Property
            ( Role.left
                ( Child.PAP.Person
                    ( offset      = CD.N
                    )
                , offset = CD.W
                )
            , Role.right
                ( Child.PAP.Address
                    ( ET.PAP.Address_Position
                        ( offset      = CD.S if (ag_p or le_p) else CD.W
                        )
                    , offset      = shp_off + 3 * CD.W
                    )
                , Child.PAP.Email
                    ( offset      = shp_off + 2 * CD.W
                    )
                , Child.PAP.Phone
                    ( offset      = shp_off + 1 * CD.W
                    )
                , Child.PAP.Url
                    ( offset      = shp_off
                    )
                , offset = CD.E
                )
            )
        , desc  = _T
            ("Class/association graph displaying PAP partial object model")
        , title = _T ("PAP graph")
        )
    if hasattr(GTW.OMP.PAP, "Group"):
        g_args = ()
        if hasattr(GTW.OMP.PAP, "Person_in_Group"):
            g_args = \
                ( ET.PAP.Person_in_Group
                    ( Role.left  ()
                    , Role.right ()
                    , offset      = CD.N
                    )
                ,
                )
        result ["PAP.Subject"]._add \
            ( Child.PAP.Group
                ( * g_args
                , offset      = CD.W
                )
            )
        if le_p:
            result ["PAP.Group"]._add \
                ( Child.PAP.Legal_Entity
                    ( offset      = CD.W
                    , source_side = "E"
                    , target_side = "W"
                    )
                )
            if ass_p:
                result ["PAP.Legal_Entity"]._add \
                    ( Child.PAP.Association
                        ( offset      = CD.N
                        )
                    )
            if hasattr(GTW.OMP.PAP, "Company"):
                result ["PAP.Legal_Entity"]._add \
                    ( Child.PAP.Company
                        ( offset      = CD.S
                        )
                    )
        if ag_p:
            result ["PAP.Group"]._add \
                ( Child.PAP.Adhoc_Group
                    ( offset      = CD.W + CD.S *
                        (-1 if not ass_p else (2 if le_p else 0))
                    , source_side = "E"
                    , target_side = "W"
                    )
                )
    if hasattr(GTW.OMP.PAP, "IM_Handle"):
        result ["PAP.Property"]._add \
            ( Child.PAP.IM_Handle
                ( offset      = shp_off + CD.E
                )
            )
    if hasattr(GTW.OMP.PAP, "Nickname"):
        result ["PAP.Property"]._add \
            ( Child.PAP.Nickname
                ( offset      = CD.E
                , source_side = "W"
                , target_side = "E"
                )
            )
    if hasattr(GTW.OMP.PAP, "Person_has_Account"):
        result ["PAP.Person"]._add \
            ( ET.PAP.Person_has_Account
                ( Role.left  (guide_offset = 1.0)
                , Role.right
                    ( offset  = CD.E
                    )
                , offset      = CD.E
                )
            )
    return result
Esempio n. 8
0
File: graph.py Progetto: Tapyr/tapyr
def graph (app_type) :
    """Class/association graph displaying PAP partial object model"""
    ag_p    = hasattr (GTW.OMP.PAP, "Adhoc_Group")
    ass_p   = hasattr (GTW.OMP.PAP, "Association")
    le_p    = hasattr (GTW.OMP.PAP, "Legal_Entity")
    shp_off = CD.S
    result  = MOM.Graph.Spec.Graph \
        ( app_type
        , ET.PAP.Subject_has_Property
            ( Role.left
                ( Child.PAP.Person
                    ( offset      = CD.N
                    )
                , offset = CD.W
                )
            , Role.right
                ( Child.PAP.Address
                    ( ET.PAP.Address_Position
                        ( offset      = CD.S if (ag_p or le_p) else CD.W
                        )
                    , offset      = shp_off + 3 * CD.W
                    )
                , Child.PAP.Email
                    ( offset      = shp_off + 2 * CD.W
                    )
                , Child.PAP.Phone
                    ( offset      = shp_off + 1 * CD.W
                    )
                , Child.PAP.Url
                    ( offset      = shp_off
                    )
                , offset = CD.E
                )
            )
        , desc  = _T
            ("Class/association graph displaying PAP partial object model")
        , title = _T ("PAP graph")
        )
    if hasattr (GTW.OMP.PAP, "Group") :
        g_args = ()
        if hasattr (GTW.OMP.PAP, "Person_in_Group") :
            g_args = \
                ( ET.PAP.Person_in_Group
                    ( Role.left  ()
                    , Role.right ()
                    , offset      = CD.N
                    )
                ,
                )
        result ["PAP.Subject"]._add \
            ( Child.PAP.Group
                ( * g_args
                , offset      = CD.W
                )
            )
        if le_p :
            result ["PAP.Group"]._add \
                ( Child.PAP.Legal_Entity
                    ( offset      = CD.W
                    , source_side = "E"
                    , target_side = "W"
                    )
                )
            if ass_p :
                result ["PAP.Legal_Entity"]._add \
                    ( Child.PAP.Association
                        ( offset      = CD.N
                        )
                    )
            if hasattr (GTW.OMP.PAP, "Company") :
                result ["PAP.Legal_Entity"]._add \
                    ( Child.PAP.Company
                        ( offset      = CD.S
                        )
                    )
        if ag_p :
            result ["PAP.Group"]._add \
                ( Child.PAP.Adhoc_Group
                    ( offset      = CD.W + CD.S *
                        (-1 if not ass_p else (2 if le_p else 0))
                    , source_side = "E"
                    , target_side = "W"
                    )
                )
    if hasattr (GTW.OMP.PAP, "IM_Handle") :
        result ["PAP.Property"]._add \
            ( Child.PAP.IM_Handle
                ( offset      = shp_off + CD.E
                )
            )
    if hasattr (GTW.OMP.PAP, "Nickname") :
        result ["PAP.Property"]._add \
            ( Child.PAP.Nickname
                ( offset      = CD.E
                , source_side = "W"
                , target_side = "E"
                )
            )
    if hasattr (GTW.OMP.PAP, "Person_has_Account") :
        result ["PAP.Person"]._add \
            ( ET.PAP.Person_has_Account
                ( Role.left  (guide_offset = 1.0)
                , Role.right
                    ( offset  = CD.E
                    )
                , offset      = CD.E
                )
            )
    return result
Esempio n. 9
0
File: graph.py Progetto: FFM/FFM
def graph (app_type) :
    return MOM.Graph.Spec.Graph \
        ( app_type
        , ET.FFM.Device
            ( Role.left
                ( ET.FFM.Device_Type_made_by_Company
                    ( Role.right
                        ( IS_A.PAP.Subject
                            ( Child.PAP.Person (offset = CD.N)
                            , offset = CD.W
                            )
                        , offset = CD.S
                        )
                    , offset = CD.W
                    )
                , offset       = CD.E * 4
                , guide_offset = 1.0
                , source_side  = "N"
                , target_side  = "N"
                )
            , Child.FFM.Antenna
                ( Role.left
                    ( IS_A.FFM.Device_Type
                    , ET.FFM.Antenna_Band (offset = CD.E)
                    , offset = CD.E * 4
                    )
                , offset = CD.N
                )
            , Child.FFM.Net_Device
                ( Role.left
                    ( IS_A.FFM.Device_Type
                    , guide_offset = 0.5
                    , offset       = CD.E * 3
                    , source_side  = "S"
                    , target_side  = "S"
                    )
                , Attr.node
                    ( Attr.manager (source_side = "N", target_side = "N")
                    , Attr.owner
                        ( guide_offset = 0.75
                        , source_side  = "E"
                        , target_side  = "W"
                        )
                    , IS_A.PAP.Subject (source_side = "E", target_side = "W")
                    , offset = CD.N
                    )
                , ET.FFM.Net_Interface (offset = CD.S + CD.E * 2)
                , offset = CD.E + CD.S
                )
            )
        , ET.FFM.Net_Interface
            ( Role.left (guide_offset = 1.0)
            , ET.FFM.Net_Link (offset = CD.S)
            , ET.FFM._Net_Credentials_
                ( Role.left (guide_offset = 1.0)
                , offset = CD.N + CD.E * 2
                )
            , ET.FFM.Net_Interface_in_IP_Network
                ( Role.right
                    ( Child.FFM.IP4_Network (offset = CD.SW)
                    , Child.FFM.IP6_Network (offset = CD.S)
                    , offset = CD.S
                    )
                , Role.left
                    ( source_side  = "N"
                    , target_side  = "N"
                    , guide_offset = 0.5
                    )
                , offset = CD.E * 2
                )
            , Child.FFM.Wireless_Interface
                ( Skip.left
                , ET.FFM.Wireless_Interface_uses_Antenna
                    ( Role.left
                        ( guide_offset = 1.5
                        )
                    , Role.right
                        ( anchor      = False
                        , source_side = "W"
                        , target_side = "W"
                        )
                    , offset = CD.N + CD.W * 2
                    )
                , ET.FFM.Wireless_Interface_uses_Wireless_Channel
                    ( Role.right
                        ( Role.left
                            ( offset = CD.S
                            )
                        , offset = CD.W
                        )
                    , offset = CD.W
                    )
                , offset = CD.W
                )
            , Child.FFM.Wired_Interface
                ( Skip.left
                , offset = CD.E
                )
            )
        , desc  = _T ("Graph displaying Funkfeuer object model")
        , title = _T ("FFM graph")
        )
Esempio n. 10
0
def graph(app_type):
    return MOM.Graph.Spec.Graph \
        ( app_type
        , ET.FFM.Device
            ( Role.left
                ( ET.FFM.Device_Type_made_by_Company
                    ( Role.right
                        ( IS_A.PAP.Subject
                            ( Child.PAP.Person (offset = CD.N)
                            , offset = CD.W
                            )
                        , offset = CD.S
                        )
                    , offset = CD.W
                    )
                , offset       = CD.E * 4
                , guide_offset = 1.0
                , source_side  = "N"
                , target_side  = "N"
                )
            , Child.FFM.Antenna
                ( Role.left
                    ( IS_A.FFM.Device_Type
                    , ET.FFM.Antenna_Band (offset = CD.E)
                    , offset = CD.E * 4
                    )
                , offset = CD.N
                )
            , Child.FFM.Net_Device
                ( Role.left
                    ( IS_A.FFM.Device_Type
                    , guide_offset = 0.5
                    , offset       = CD.E * 3
                    , source_side  = "S"
                    , target_side  = "S"
                    )
                , Attr.node
                    ( Attr.manager (source_side = "N", target_side = "N")
                    , Attr.owner
                        ( guide_offset = 0.75
                        , source_side  = "E"
                        , target_side  = "W"
                        )
                    , IS_A.PAP.Subject (source_side = "E", target_side = "W")
                    , offset = CD.N
                    )
                , ET.FFM.Net_Interface (offset = CD.S + CD.E * 2)
                , offset = CD.E + CD.S
                )
            )
        , ET.FFM.Net_Interface
            ( Role.left (guide_offset = 1.0)
            , ET.FFM.Net_Link (offset = CD.S)
            , ET.FFM._Net_Credentials_
                ( Role.left (guide_offset = 1.0)
                , offset = CD.N + CD.E * 2
                )
            , ET.FFM.Net_Interface_in_IP_Network
                ( Role.right
                    ( Child.FFM.IP4_Network (offset = CD.SW)
                    , Child.FFM.IP6_Network (offset = CD.S)
                    , offset = CD.S
                    )
                , Role.left
                    ( source_side  = "N"
                    , target_side  = "N"
                    , guide_offset = 0.5
                    )
                , offset = CD.E * 2
                )
            , Child.FFM.Wireless_Interface
                ( Skip.left
                , ET.FFM.Wireless_Interface_uses_Antenna
                    ( Role.left
                        ( guide_offset = 1.5
                        )
                    , Role.right
                        ( anchor      = False
                        , source_side = "W"
                        , target_side = "W"
                        )
                    , offset = CD.N + CD.W * 2
                    )
                , ET.FFM.Wireless_Interface_uses_Wireless_Channel
                    ( Role.right
                        ( Role.left
                            ( offset = CD.S
                            )
                        , offset = CD.W
                        )
                    , offset = CD.W
                    )
                , offset = CD.W
                )
            , Child.FFM.Wired_Interface
                ( Skip.left
                , offset = CD.E
                )
            )
        , desc  = _T ("Graph displaying Funkfeuer object model")
        , title = _T ("FFM graph")
        )