VariousArtists: Difference between revisions

From ICO wiki
Jump to navigationJump to search
Rvinter (talk | contribs)
Mroosiok (talk | contribs)
No edit summary
Line 6: Line 6:
* Madis Heinsoo - Arendaja
* Madis Heinsoo - Arendaja
* Pavel Fleišer - Arendaja
* Pavel Fleišer - Arendaja
=== XML ===
<?xml version="1.0" encoding="utf-8" ?>
<books>
  <book id="1" published="29.05.2018" type="hardcover" pages="254" deleted="false">
    <title><![CDATA[Calypso]]></title>
    <authors>
      <author id="1">
        <firstname>
          <![CDATA[David]]>
        </firstname>
        <lastname>
          <![CDATA[Sedaris]]>
        </lastname>
      </author>
    </authors>
    <categories>
      <category id="1" name="fiction"/>
      <category id="2" name="humor"/>
      <category id="3" name="entertainment"/>
    </categories>
  </book>
  <book id="2" published="05.06.2018" type="audiobook" deleted="true">
    <title><![CDATA[Florida]]></title>
    <authors>
      <author id="2" birthdate="23.07.1978">
        <firstname>
          <![CDATA[Lauren]]>
        </firstname>
        <lastname>
          <![CDATA[Groff]]>
        </lastname>
      </author>
    </authors>
    <categories>
      <category id="1" name="fiction"/>
      <category id="4" name="short stories"/>
    </categories>
  </book>
  <book id="2" published="20.10.2015" type="audiobook" deleted="false">
    <title><![CDATA[Illuminae]]></title>
    <authors>
      <author id="3" birthdate="21.11.1958">
        <firstname>
          <![CDATA[Amie]]>
        </firstname>
        <lastname>
          <![CDATA[Kaufman]]>
        </lastname>
      </author>
      <author id="4" birthdate="13.09.1973">
        <firstname>
          <![CDATA[Jay]]>
        </firstname>
        <lastname>
          <![CDATA[Kristoff]]>
        </lastname>
      </author>
    </authors>
    <categories>
      <category id="1" name="fiction"/>
      <category id="5" name="romance"/>
    </categories>
  </book>
</books>
=== XSD===
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="books">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" name="book">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="title" type="xs:string" />
              <xs:element name="authors">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="author">
                      <xs:complexType>
                        <xs:sequence>
                          <xs:element name="firstname" type="xs:string" />
                          <xs:element name="lastname" type="xs:string" />
                        </xs:sequence>
                        <xs:attribute name="id" type="xs:int" use="required" />
                        <xs:attribute name="birthdate" type="xs:string" use="optional" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="categories">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element maxOccurs="unbounded" name="category">
                      <xs:complexType>
                        <xs:attribute name="id" type="xs:int" use="required" />
                        <xs:attribute name="name" type="xs:string" use="required" />
                      </xs:complexType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute name="id" type="xs:int" use="required" />
            <xs:attribute name="published" type="xs:string" use="required" />
            <xs:attribute name="type" type="xs:string" use="required" />
            <xs:attribute name="pages" type="xs:int" use="optional" />
            <xs:attribute name="deleted" type="xs:boolean" use="required" />
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>
=== XSLT (HTML)===
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
  <xsl:output method="html" indent="yes"/>
  <xsl:template match="/books">
    <html>
      <head>
        <title>Books list</title>
        <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"/>
      </head>
      <body>
        <h2>Books list</h2>
        <table class="table table-striped">
          <th>Title</th>
          <th>Type</th>
          <th>Authors data</th>
          <th>Categories data</th>
          <xsl:for-each select="book">
            <xsl:if test="@deleted = 'false'">
              <tr>
                <td>
                  <xsl:value-of select="title"/>
                </td>
                <td>
                  <xsl:value-of select="@type"/>
                  <xsl:if test="@type = 'hardcover'">
                    :
                    <xsl:value-of select="@pages"/> Pages
                  </xsl:if>
                </td>
                <td>
                  <xsl:for-each select="authors/author">
                    <div>
                      <xsl:value-of select="firstname"/>
                      <xsl:value-of select="lastname"/>
                      <xsl:if test="@birthdate">:
                        <xsl:value-of select="@birthdate"/>
                      </xsl:if>
                    </div>
                  </xsl:for-each>
                </td>
                <td>
                  <xsl:for-each select="categories/category">
                    <div>
                      <xsl:value-of select="@name"/>
                    </div>
                  </xsl:for-each>
                </td>
              </tr>
            </xsl:if>
          </xsl:for-each>
        </table>
      </body>
    </html>
  </xsl:template>
</xsl:stylesheet>


=Analüüs=
=Analüüs=

Revision as of 22:15, 1 June 2018

Meeskond

Liikmed:

  • Ruudi Vinter - Arendaja
  • Madis Roosioks - Arendaja, projektijuht
  • Madis Heinsoo - Arendaja
  • Pavel Fleišer - Arendaja

XML

<?xml version="1.0" encoding="utf-8" ?> <books>

 <book id="1" published="29.05.2018" type="hardcover" pages="254" deleted="false">
   <title><![CDATA[Calypso]]></title>
   <authors>
     <author id="1">
       <firstname>
         <![CDATA[David]]>
       </firstname>
       <lastname>
         <![CDATA[Sedaris]]>
       </lastname>
     </author>
   </authors>
   <categories>
     <category id="1" name="fiction"/>
     <category id="2" name="humor"/>
     <category id="3" name="entertainment"/>
   </categories>
 </book>
 <book id="2" published="05.06.2018" type="audiobook" deleted="true">
   <title><![CDATA[Florida]]></title>
   <authors>
     <author id="2" birthdate="23.07.1978">
       <firstname>
         <![CDATA[Lauren]]>
       </firstname>
       <lastname>
         <![CDATA[Groff]]>
       </lastname>
     </author>
   </authors>
   <categories>
     <category id="1" name="fiction"/>
     <category id="4" name="short stories"/>
   </categories>
 </book>
 <book id="2" published="20.10.2015" type="audiobook" deleted="false">
   <title><![CDATA[Illuminae]]></title>
   <authors>
     <author id="3" birthdate="21.11.1958">
       <firstname>
         <![CDATA[Amie]]>
       </firstname>
       <lastname>
         <![CDATA[Kaufman]]>
       </lastname>
     </author>
     <author id="4" birthdate="13.09.1973">
       <firstname>
         <![CDATA[Jay]]>
       </firstname>
       <lastname>
         <![CDATA[Kristoff]]>
       </lastname>
     </author>
   </authors>
   <categories>
     <category id="1" name="fiction"/>
     <category id="5" name="romance"/>
   </categories>
 </book>

</books>

XSD

<?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">

 <xs:element name="books">
   <xs:complexType>
     <xs:sequence>
       <xs:element maxOccurs="unbounded" name="book">
         <xs:complexType>
           <xs:sequence>
             <xs:element name="title" type="xs:string" />
             <xs:element name="authors">
               <xs:complexType>
                 <xs:sequence>
                   <xs:element maxOccurs="unbounded" name="author">
                     <xs:complexType>
                       <xs:sequence>
                         <xs:element name="firstname" type="xs:string" />
                         <xs:element name="lastname" type="xs:string" />
                       </xs:sequence>
                       <xs:attribute name="id" type="xs:int" use="required" />
                       <xs:attribute name="birthdate" type="xs:string" use="optional" />
                     </xs:complexType>
                   </xs:element>
                 </xs:sequence>
               </xs:complexType>
             </xs:element>
             <xs:element name="categories">
               <xs:complexType>
                 <xs:sequence>
                   <xs:element maxOccurs="unbounded" name="category">
                     <xs:complexType>
                       <xs:attribute name="id" type="xs:int" use="required" />
                       <xs:attribute name="name" type="xs:string" use="required" />
                     </xs:complexType>
                   </xs:element>
                 </xs:sequence>
               </xs:complexType>
             </xs:element>
           </xs:sequence>
           <xs:attribute name="id" type="xs:int" use="required" />
           <xs:attribute name="published" type="xs:string" use="required" />
           <xs:attribute name="type" type="xs:string" use="required" />
           <xs:attribute name="pages" type="xs:int" use="optional" />
           <xs:attribute name="deleted" type="xs:boolean" use="required" />
         </xs:complexType>
       </xs:element>
     </xs:sequence>
   </xs:complexType>
 </xs:element>

</xs:schema>

XSLT (HTML)

<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

   xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"

>

 <xsl:output method="html" indent="yes"/>
 <xsl:template match="/books">
   <html>
     <head>
       <title>Books list</title>
       <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous"/>
     </head>
     <body>

Books list

         <xsl:for-each select="book">
           <xsl:if test="@deleted = 'false'">
</xsl:if> </xsl:for-each>
Title Type Authors data Categories data
                 <xsl:value-of select="title"/>
                 <xsl:value-of select="@type"/>
                 <xsl:if test="@type = 'hardcover'">
                   :
                   <xsl:value-of select="@pages"/> Pages
                 </xsl:if>
                 <xsl:for-each select="authors/author">
                     <xsl:value-of select="firstname"/>
                     <xsl:value-of select="lastname"/>
                     <xsl:if test="@birthdate">:
                       <xsl:value-of select="@birthdate"/>
                     </xsl:if>
                 </xsl:for-each>
                 <xsl:for-each select="categories/category">
                     <xsl:value-of select="@name"/>
                 </xsl:for-each>
     </body>
   </html>
 </xsl:template>

</xsl:stylesheet>

Analüüs

Kirjeldus

Me loome raamatute laenutamise teenuse, kus raamatukogude asemel on raamatute kohale toomise ja laenutamise punktid a la pakiautomaadid.

Kasutajad

  • Admin
  • Tavakasutaja

Must have

  • Logimine iga kasutaja ja tegevuse kohta.

Tavakasutaja

  • Tavakasutaja saab ennast raamatukogu kasutajaks registreerida.
  • Tavakasutaja näeb oma käes olevaid raamatuid.
  • Tavakasutaja näeb oma tähtaegasid.
  • Tavakasutaja saab otsida raamatute seast.
  • Tavakasutaja saab raamatukogule soovitada raamatuid, mida ta tahaks laenutada, mida hetkel raamatukogus üldse pole.
  • Tavakasutaja saab raamatu broneerida raamatu ette määratud kuupäevani.
  • Tavakasutaja ja admini sisselogimised.

Admin

  • Admin saab raamatuid lisada süsteemi.
  • Admin saab kustutada tavakasutaja.
  • Admin saab tühistada broneeringu
  • Admin saab registreerida uusi admin kasutajaid
  • Admin saab lisada uusi kategooriaid.
  • Admin saab eemaldada kategooriaid.
  • Admin saab lisada uusi autoreid.
  • Admin saab eemaldada autoreid

Nice to have

  • Raamatute transpordi haldussüsteem
  • Tavakasutaja saab kommenteerida raamatu ning anda raamatule hinnangu.
  • Admin saab kustutada kommentaari, mis on ebasobiva sisuga.

Tegevuste logi

  • 22.03.2018 Meeskonna moodustamine.
  • 27.03.2018 Meeskonna esimene kohtumine.
  • 01.04.2018 Analüüsi esitamine.
  • 29.03.2018 Esialgne andmemudel (Ruudi Vinter)
  • 01.04.2018 Andmemudeli tõlkimine inglise keelde (Madis Roosioks)
  • 19.04.2018 Andmemudeli edasiarendus (Ruudi Vinter)
  • 01.05.2018 Raamatu tüüpide kontrolleri implementatsioon ja BookInBookType olemi loomine (Ruudi Vinter)