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
Typestructure
(Web Publishing)


Vytvořeno: 04-30-1998 15:29:52
Poslední změna: 01-14-2003 11:01:11

Outputs detailed information about the given type structure.

Modul

Module: Web Publishing

Zdrojový kód:

PROCEDURE Typestructure(name$)
BEGIN

  foundsomething! = FALSE;
  FOR Typestructure WHERE Name = Name$ DO
    foundsomething! = TRUE;
    CALL Header("Typová struktura - " + Conv$(Boxname));
    CALL Title ("Typová struktura", Conv$(Boxname));
  END

  //display a dummy title if type structure does not exist
  IF NOT foundsomething! THEN
    CALL Header("Typová struktura - " + name$);
    CALL Title ("Typová struktura", name$);
  END

  IF foundsomething! THEN
    FOR Typestructure WHERE Name = Name$ DO
    
      //display image(s) along with their image maps
      CALL TypestructureMap(Name, 1, PageWasGenerated!);
      PRINT {HTML} Anchor$( "", "TPage1", "#TPage1");
      CALL Long2IDString(Object, id$);
      PRINT {HTML} "<P ALIGN=CENTER><IMG SRC=1-" + id$ + ".png BORDER=0 USEMAP=""#map_page1""></P>", NL;
      firstPage! = TRUE;
      FOREACH Tpage WHERE Typestructure = Typestructure.Name ORDER BY Page DO
        IF firstPage! THEN // generate page numbers only for more than one page
          PRINT {HTML} "<P ALIGN=CENTER><I>Page 1</I></P>", NL;
          firstPage! = FALSE;
        END
        CALL TypestructureMap(Typestructure, Page, PageWasGenerated!);
        PRINT {HTML} Anchor$( "", "TPage"+Str$(Page), "#TPage" + Str$(Page));
        CALL PageNo2IDString(Page, pageid$);
        PRINT {HTML} "<P ALIGN=CENTER><IMG SRC=" + pageid$ + "-" + id$ + ".png BORDER=1";
        IF PageWasGenerated! THEN
          PRINT {HTML} " USEMAP=""#map_page", Page ,"""";
        END
        PRINT {HTML} "></P>",NL;
        PRINT {HTML} "<P ALIGN=CENTER><I>Page "+ Str$(Page) + "</I></P>", NL;
      END
      
      //general object data
      CALL GenObjectData(Object, TRUE, TRUE);
      PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;

      //description of the object, if avialable
      FOR Tfield WHERE Typestructure = Typestructure.Name AND X = 286 AND Y = 15 AND Page = 1 AND hasText DO
        CALL GetSystemProperty("WebPubDescriptionPage", sepPage$);
        IF sepPage$ = "TRUE" THEN
          PRINT {HTML} Anchor$("<B>Popis</B>", "", "desc" + Str$(Typestructure.Object) + ".htm");
          PRINT {HTML} "<BR>",NL;
          PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;
        ELSE
          IF Text <> "" THEN
            dummy$ = Text;
            PRINT dummy$;
            PRINT {HTML} "<BR>",NL;
            PRINT {HTML} "<HR SIZE=""1"" COLOR=""#3366CC"">", NL;
          END
        END
      END

      //two column table with properties of the typestructure
      CALL H2_TopSpaceless("Vlastnosti");
      PRINT {HTML} "<TABLE NOWRAP VALIGN=BASELINE>",NL;
      //technical name
      PRINT {HTML} " <TR>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<B>Technický název:</B></FONT></TD>",NL;
      PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
      PRINT {HTML} "<I>", Id , "</I></FONT></TD>",NL;
      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 all type fields
      CALL H2_TopSpaceless("Datové položky");
      foundtfield! = FALSE;
      FOREACH TField WHERE Typestructure = Typestructure.Name DO
        foundtfield! = TRUE;
        BREAK;
      END
      IF foundtfield! THEN
        PRINT {HTML} "<TABLE NOWRAP VALIGN=BASELINE>",NL;
        PRINT {HTML} " <TR>",NL;
        PRINT {HTML} " <TH ALIGN=LEFT VALIGN=TOP COLSPAN=2><FONT SIZE=2 FACE=""Verdana, Arial""><B>Název</B></FONT></TH>",NL;
        PRINT {HTML} " <TH VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><B>Atribut</B></FONT></TH>",NL;
        PRINT {HTML} " <TH VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><B>Datový element</B></FONT></TH>",NL;
        PRINT {HTML} " </TR>",NL;
        FOREACH TField WHERE Typestructure = Typestructure.Name DO
          //dataelem or attribute of a relation either
          PRINT {HTML} " <TR>",NL;
        
          //name
          PRINT {HTML} " <TD ALIGN=CENTER VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT {HTML} "<IMG SRC=""bullet.gif""> ";
          PRINT {HTML} "</FONT></TD>",NL;
          PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT Conv$(Boxname);
          //PRINT {HTML} Anchor$("<B>" + Conv$(Boxname) + "</B>", "", Str$(Object) + ".htm");
          PRINT {HTML} "</FONT></TD>",NL;
        
          IF Data <> "" THEN
            //data
            PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>-</CENTER></FONT></TD>";
            PRINT {HTML} " <TD></TD><TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>";
            FOR Data WHERE Name = Tfield.Data DO
              PRINT {HTML} Anchor$(Boxname, "", Str$(Object) + ".htm");
            END
            PRINT {HTML} "</CENTER></FONT></TD>",NL;
          ELSIF Relation <> "" THEN
            //link to attribute of relation + link to relation
            PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>";
            FOR Relattribute WHERE Name = Tfield.Relattribute
                               AND Relation = Tfield.Relation DO
              PRINT {HTML} Anchor$(Relattribute.Name, "", Str$(Object) + ".htm");
            END
            PRINT " (";
            FOR Relation WHERE Name = Tfield.Relation DO
              PRINT {HTML} Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm");
            END
            PRINT ")";
            PRINT {HTML} "</CENTER></FONT></TD>", NL;
            
            //data elem associated with attribute
            PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>-</CENTER></FONT></TD>",NL;
          ELSE
            PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>-</CENTER></FONT></TD>",NL;
            PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><CENTER>-</CENTER></FONT></TD>",NL;
          END
          
          PRINT {HTML} " </TR>",NL;
        END
        PRINT {HTML} "</TABLE>",NL;
      ELSE
        PRINT {HTML} "Diagram neobsahuje datové položky.<BR>",NL;
      END

      //list all relations referenced (as a whole)
      CALL H2("Reference relací");
      foundrpart! = FALSE;
      FOREACH Relationpart WHERE Typestructure = Typestructure.Name DO
        foundrpart! = TRUE;
        BREAK;
      END
      IF foundrpart! THEN
        PRINT {HTML} "<TABLE NOWRAP VALIGN=BASELINE>",NL;
        PRINT {HTML} " <TR>",NL;
        PRINT {HTML} " <TH ALIGN=LEFT VALIGN=TOP COLSPAN=2><FONT SIZE=2 FACE=""Verdana, Arial""><B>Název</B></FONT></TH>",NL;
        PRINT {HTML} " <TH VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><B>Relace</B></FONT></TH>",NL;
        PRINT {HTML} " </TR>",NL;
        FOREACH Relationpart WHERE Typestructure = Typestructure.Name ORDER BY Typestructure, Page DO
          PRINT {HTML} " <TR>",NL;
          
          //name
          PRINT {HTML} " <TD ALIGN=CENTER VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT {HTML} "<IMG SRC=""bullet.gif""> ";
          PRINT {HTML} "</FONT></TD>",NL;
          PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT Conv$(Boxname);
          //PRINT {HTML} Anchor$("<B>" + Conv$(Boxname) + "</B>", "", Str$(Object) + ".htm");
          PRINT {HTML} "</FONT></TD>",NL;
          
          //name of relation being referenced
          PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          FOR Relation WHERE Name = Relationpart.Relation DO
            PRINT {HTML} Anchor$("<B>" + Conv$(Boxname) + "</B>", "", Str$(Object) + ".htm");
          END
          PRINT {HTML} "</FONT></TD>",NL;
        
          PRINT {HTML} " </TR>",NL;
        END
        PRINT {HTML} "</TABLE>",NL;
      ELSE
        PRINT {HTML} "Typová struktura neobsahuje žádné reference na relace.<BR>",NL;
      END
      
      //list of all parts
      CALL H2("Party");
      foundpart! = FALSE;
      FOREACH Tpart WHERE Typestructure = Typestructure.Name DO
        foundpart! = TRUE;
        BREAK;
      END
      IF foundpart! THEN
        PRINT {HTML} "<TABLE NOWRAP VALIGN=BASELINE>",NL;
        PRINT {HTML} " <TR>",NL;
        PRINT {HTML} " <TH ALIGN=LEFT VALIGN=TOP COLSPAN=2><FONT SIZE=2 FACE=""Verdana, Arial""><B>Název</B></FONT></TH>",NL;
        PRINT {HTML} " <TH VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial""><B>Typová struktura</B></FONT></TH>",NL;
        PRINT {HTML} " </TR>",NL;
        FOREACH Tpart WHERE Typestructure = Typestructure.Name ORDER BY Typestructure, Page DO
          PRINT {HTML} " <TR>",NL;
          
          //name
          PRINT {HTML} " <TD ALIGN=CENTER VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT {HTML} "<IMG SRC=""bullet.gif""> ";
          PRINT {HTML} "</FONT></TD>",NL;
          PRINT {HTML} " <TD VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          PRINT Conv$(Boxname);
          //PRINT {HTML} Anchor$("<B>" + Conv$(Boxname) + "</B>", "", Str$(Object) + ".htm");
          PRINT {HTML} "</FONT></TD>",NL;
          
          //name of type structure being referenced
          PRINT {HTML} " <TD ALIGN=LEFT VALIGN=TOP><FONT SIZE=2 FACE=""Verdana, Arial"">";
          FOR Typestructure WHERE Name = Tpart.Tpartname DO
            PRINT {HTML} Anchor$("<B>" + Conv$(Boxname) + "</B>", "", Str$(Object) + ".htm");
          END
          PRINT {HTML} "</FONT></TD>",NL;
        
          PRINT {HTML} " </TR>",NL;
        END
        PRINT {HTML} "</TABLE>",NL;
      ELSE
        PRINT {HTML} "Typová struktura neobsahuje reference na jiné typové struktury.<BR>",NL;
      END

      //associated data structure
      PRINT {HTML} "<BR>",NL;
      CALL H2_TopSpaceless("Odpovídající datová struktura");
      founddsd! = FALSE;
      FOR Datastructure WHERE Name = Typestructure.Datastructure DO
        founddsd! = TRUE;
        PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=TOP> ";
        PRINT {HTML} Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm"), "<BR>",NL;
      END
      IF NOT founddsd! THEN
        PRINT {HTML} "Typová struktura nemá odpovídající datovou strukturu.", "<BR>", NL;
      END


      //modul structures that refer to this type structure
      PRINT {HTML} "<BR>",NL;
      CALL H2_TopSpaceless("Modulové struktury do nichž je referencována");
      foundTref! = FALSE;
      lastMod$ = "";
      FOREACH Typeref WHERE Typestructure = Typestructure.Name ORDER BY Module DO
        IF Typeref.Module <> lastMod$ THEN
          lastMod$ = Typeref.Module;
          FOR Module WHERE Name = Typeref.Module DO
              foundTref! = TRUE;
              PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=TOP> ";
              PRINT {HTML} Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm"),"<BR>",NL;
          END
        END
      END
      IF NOT foundTref! THEN
        PRINT {HTML} "Typová struktura není referencována v žádném modulu.", "<BR>", NL;
      END

      //type structures that refer to this type structure
      PRINT {HTML} "<BR>",NL;
      CALL H2_TopSpaceless("Typové struktury do nichž je referencována");
      foundTPart! = FALSE;
      lastTSD$ = "";
      FOREACH TPart WHERE TPart.TPartname = Typestructure.Name ORDER BY TPart.Typestructure DO
        IF TPart.Typestructure <> lastTSD$ THEN
          lastTSD$ = TPart.Typestructure;
          FOR Typestructure WHERE Name = TPart.Typestructure DO
              foundTPart! = TRUE;
              PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=TOP> ";
              PRINT {HTML} Anchor$(Conv$(Boxname), "", Str$(Object) + ".htm"),"<BR>",NL;
          END
        END
      END
      IF NOT foundTPart! THEN
        PRINT {HTML} "Typová struktura není referencována v žádné typové struktuře.", "<BR>", NL;
      END

      //data bases that refer to this type structure
      PRINT {HTML} "<BR>",NL;
      CALL H2_TopSpaceless("Databáze do nichž je referencována");
      foundDBRef! = FALSE;
      lastMod$ = "";
      FOREACH Databaseview WHERE Typestructure = Typestructure.Name ORDER BY Database DO
         FOR Database WHERE Name = Databaseview.Database DO
             foundDBRef! = TRUE;
             PRINT {HTML} "<IMG SRC=""bullet.gif"" ALIGN=TOP> ";
             PRINT {HTML} Anchor$(Name, "", Str$(Object) + ".htm"),"<BR>",NL;
         END
      END
      IF NOT foundDBRef! THEN
        PRINT {HTML} "Typová struktura není referencována v žádné databázi.", "<BR>", NL;
      END
      
    END
  ELSE
    CALL H2_Spaceless("V projektu není typová struktura daného jména.");
    PRINT {HTML} "<BR>",NL;
  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\7464.htm (C) microTOOL GmbH 2002