Informační tok Funkční structura Datová struktura ER model Modulová struktura Typová struktura Relační model Dokumentace


[Celkový datový model] [Funkce] [Externí rohraní] [Stavové diagramy] [Datové elementy] [Entity] [Relace]
[Databáze] [Události] [Materiály] [Generovací funkce] [Vyhodnocovací funkce] [Konfigurace] [Uživatelé] [Projekt] [Home]



Vyhodnocovací funkce
Attribute
(Web Publishing)


Vytvořeno: 03-20-2000 14:43:56
Poslední změna: 01-14-2003 13:15:39

Outputs detailed information about the given Attribute of an Entity Type.

Modul

Module: Web Publishing

Zdrojový kód:

PROCEDURE Attribute(Entity$, Name$)
BEGIN
  foundsomething! = FALSE;
  FOREACH Attribute WHERE Attribute.Entity = Entity$
                    AND Attribute.Name = Name$ DO
    foundsomething! = TRUE;
    CALL Header("Atribut - " + Name);
    FOR Entity WHERE Entity.Name = Attribute.Entity DO
      CALL Title2("Atribut", Attribute.Name, Conv$(Entity.Boxname));
    END
  END

  //display a dummy title if the element does not exist
  IF NOT foundsomething! THEN
    CALL Header("Atribut - " + name$);
    CALL Title ("Atribut", name$);
    CALL H2_Spaceless("Aktuální projekt neobsahuje atribut daného jména.");
    PRINT {HTML} "<BR>",NL;
  END

  IF foundsomething! THEN
    FOREACH Attribute WHERE Attribute.Entity = Entity$
                      AND Attribute.Name = Name$ DO
    
      //link for Comment
      PRINT {HTML} Anchor$("","koment", ""), NL;
      //general object data without state and responsable user and with comment
      CALL GenObjectData(Object, FALSE, TRUE);
      PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;

      //description of the object, if avialable
      IF hasText THEN
        PRINT {HTML} Anchor$("","popis", ""), NL;
        CALL GetSystemProperty("WebPubDescriptionPage", sepPage$);
        IF sepPage$ = "TRUE" THEN
            PRINT {HTML} Anchor$("<B>Popis</B>", "", "popis" + Str$(Attribute.Object) + ".htm");
            PRINT {HTML} "<BR>",NL;
            PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;
        ELSE
           dummy$ = Text;
           PRINT dummy$;
           PRINT {HTML} "<BR>",NL;
           PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;
        END
      END

      //two column table with all the data - one line per property
      CALL H2_TopSpaceless("Vlastnosti");
      PRINT {HTML} "<TABLE NOWRAP VALIGN=BASELINE>",NL;
      
      //Entity Type
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>Entita:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      FOR Entity WHERE Entity.Name = Attribute.Entity DO
          PRINT {HTML} "<I>" + Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm") + "</I></FONT></TD>", NL;
      END
      PRINT {HTML} " </TR>",NL;

      //Dataelement
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>Datový element:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      FOR Data WHERE Data.Name = Attribute.Data DO
        PRINT {HTML} "<I>" + Anchor$(Boxname, "", Str$(Object) + ".htm") + "</I></FONT></TD>", NL;
      END
      PRINT {HTML} " </TR>",NL;

      //not null
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>Povolena hodnota NULL:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      IF Notnull THEN
        PRINT {HTML} "<I>ne</I></FONT></TD>",NL;
      ELSE
        PRINT {HTML} "<I>ano</I></FONT></TD>",NL;
      END
      PRINT {HTML} " </TR>",NL;
      
      //With Default
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>S defaultní hodnotou:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      IF Withdefault THEN
        PRINT {HTML} "<I>ano</I></FONT></TD>",NL;
      ELSE
        PRINT {HTML} "<I>ne</I></FONT></TD>",NL;
      END
      PRINT {HTML} " </TR>",NL;

      //problem domain
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>Problem Domain:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      IF Private THEN
        PRINT {HTML} "<I>ano</I></FONT></TD>",NL;
      ELSE
        PRINT {HTML} "<I>ne</I></FONT></TD>",NL;
      END
      PRINT {HTML} " </TR>",NL;
      
      //end of table
      PRINT {HTML} "</TABLE>",NL;
      PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;

      //two column table with userdefined properties of the element - one line per property
      CALL GenUserdefinedProperties(Object);
      
      // List of references to Relattributes
      CALL H2_TopSpaceless("Odpovídající atributy relací");
      PRINT {HTML} " <FONT SIZE=2 FACE=""Verdana, Arial"">";
      IF Private THEN
        PRINT {HTML} "Atribute je problem domain atribut.",NL;
      ELSE
        foundattrcon! = FALSE;
        first! = TRUE;
        FOREACH Attributeconnection WHERE Attributeconnection.Entity = Attribute.Entity
                                    AND Attributeconnection.Attribute = Attribute.Name
                                    ORDER BY Relation, Relattribute DO
            foundattrcon! = TRUE;
            IF first! THEN
                PRINT {HTML} "Atribut odpovídá následujícím atributům relací: <BR><BR> ",NL;
                PRINT {HTML} "<TABLE>", NL;
            ELSE
                PRINT {HTML} "<TR>";
            END

            //Attribute
            FOR Relattribute WHERE Relattribute.Relation = Attributeconnection.Relation
                             AND Relattribute.Name = Attributeconnection.Relattribute DO
                PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><IMG SRC = ""bullet.gif""></TD>",NL;
                PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
                PRINT {HTML} Anchor$(Relattribute.Name, "", Str$(Object) + ".htm");
                PRINT {HTML} "</FONT></TD>";
            END

            //Relation
            FOR Relation WHERE Relation.Name = Attributeconnection.Relation DO
                PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
                PRINT {HTML} " (" + Anchor$(Conv$(Relation.Boxname), "", Str$(Object) + ".htm") + ")";
                PRINT {HTML} "</FONT></TD></TR>",NL;
            END
            first! = FALSE;
        END
        PRINT {HTML} "</TABLE>",NL;

        IF NOT foundattrcon! THEN
            PRINT {HTML} "Atribut nemá odpovídající atributy relací.";
            PRINT {HTML} "<BR>",NL;
        END
        PRINT {HTML} "<BR>",NL;
      END
      
      //usage in ifd
      CALL H2_TopSpaceless("Reference v diagramech informačních toků");
      foundUsage! = FALSE;
      lastIfd$ = "";
      FOREACH Funentflow WHERE Entity = Attribute.Entity
                         AND Infoname = Attribute.Name
                         ORDER BY Ifd DO
        IF Funentflow.Ifd <> lastIfd$ THEN
          lastIfd$ = Funentflow.Ifd;
          FOR Informationflow WHERE Name = Funentflow.Ifd DO
            foundUsage! = TRUE;
            PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=""top"">";
            PRINT {HTML} " ", Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm");
            PRINT {HTML} "<BR>",NL;
          END
        END
      END
      IF NOT foundUsage! THEN
        PRINT {HTML} "Atribut není použit v žádném informačním toku.";
        PRINT {HTML} "<BR>",NL;
      END
      PRINT {HTML} "<BR>",NL;
      
      //usage in dsd
      CALL H2_TopSpaceless("Refrence v datových strukturách");
      foundUsage! = FALSE;
      lastDsd$ = "";
      FOREACH Field WHERE Entity = Attribute.Entity
                    AND Attribute = Attribute.Name
                    ORDER BY Datastructure DO
        IF Field.Datastructure <> lastDsd$ THEN
          lastDsd$ = Field.Datastructure;
          FOR Datastructure WHERE Name = Field.Datastructure DO
            foundUsage! = TRUE;
            PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=""top"">";
            PRINT {HTML} " ", Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm");
            PRINT {HTML} "<BR>",NL;
          END
        END
      END
      IF NOT foundUsage! THEN
        PRINT {HTML} "Atribut není použit v žádné datové struktuře.";
        PRINT {HTML} "<BR>",NL;
      END
      PRINT {HTML} "<BR>",NL;

      PRINT {HTML} "</FONT>",NL;
    END
  END
  
  CALL Footer("");
END


Generováno: 16.10.2003 7:41 Systém: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\Projekt03.csf Generováno systémem case/4/0
Vygeneroval: Administrator Soubor: C:\Documents and Settings\hajsman\Dokumenty\Vyuka\Irs2\Projekt case40\html\96027885.htm (C) microTOOL GmbH 2002