Maagikud: Difference between revisions
No edit summary |
No edit summary |
||
(14 intermediate revisions by 3 users not shown) | |||
Line 5: | Line 5: | ||
*Rauno Lõhmus | *Rauno Lõhmus | ||
==Idee== | ==Idee== | ||
== | |||
Meie rühma analüüs on nähtav [ | Meie rühma idee oli luua lennujaama ja lennuliini integreeritud süsteem. | ||
Antud rakenduses peaks olema võimalik | |||
*kasutajaks registreerida ja sisse logida. | |||
*Kasutajaid on eri tüüpi. | |||
*Admin kasutaja saab lisada, vaadata ja kustutada kõiki pileteid, lennukeid, lende, lennuliine ja lennujaamu. Admin näeb ka statistilist ülevaadet. | |||
*Tavakasutaja saab broneerida pileteid ning enda omasid ka vaadata. | |||
*Mitte sisse loginud kasutaja saab pileteid broneerida. | |||
==Projekt== | |||
Meie rühma analüüs on nähtav [https://docs.google.com/document/d/1kzOGrE7uUnhSKKrL30hpfImqq1ydPLH5e4G05UhOC4o/edit lingil]. | |||
Versioonihaldus https://ralohmus.visualstudio.com/Airport | |||
Meie link koodile on [http://enos.itcollege.ee/~sjaanus/c/Airport_solution.zip siin]. | |||
Administraatori kasutaja on admin@eesti.ee ja parooliks Foobar.foobar1 | |||
==XML== | |||
===XML=== | |||
<source lang="xml"> | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<people_in_seats> | |||
<person_in_seat person_in_seat_id="3"> | |||
<person person_id="3"> | |||
<firstname>Peeter</firstname> | |||
<lastname>Pakiraam</lastname> | |||
<personal_code>345678912</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="2" type="regular" plane_id="3">1</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="2" takeoff="2017-03-13" landing="2017-03-13">2</flight> | |||
</person_in_seat> | |||
<person_in_seat person_in_seat_id="4"> | |||
<person person_id="4"> | |||
<firstname>Ants</firstname> | |||
<lastname>Pakk</lastname> | |||
<personal_code>312312321</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="4" type="VIP" plane_id="4">4</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="4" takeoff="2017-03-13" landing="2017-03-13">4</flight> | |||
</person_in_seat> | |||
<person_in_seat person_in_seat_id="5"> | |||
<person person_id="5"> | |||
<firstname>Tõnu</firstname> | |||
<lastname>Raamat</lastname> | |||
<personal_code>323123123</personal_code> | |||
</person> | |||
<!--Number between tags shows actual seat number--> | |||
<seat seat_id="5" type="regular" plane_id="5">5</seat> | |||
<!--Number between tags shows flight_id--> | |||
<flight flight_line_id="5" takeoff="2017-03-13" landing="2017-03-13">5</flight> | |||
</person_in_seat> | |||
</people_in_seats> | |||
</source> | |||
===XSD=== | |||
<source lang="xml"> | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |||
<xs:element name="people_in_seats"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element maxOccurs="unbounded" name="person_in_seat"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="person"> | |||
<xs:complexType> | |||
<xs:sequence> | |||
<xs:element name="firstname" type="xs:string" /> | |||
<xs:element name="lastname" type="xs:string" /> | |||
<xs:element name="personal_code" type="xs:unsignedInt" /> | |||
</xs:sequence> | |||
<xs:attribute name="person_id" type="xs:unsignedInt" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="seat"> | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:unsignedInt"> | |||
<xs:attribute name="seat_id" type="xs:unsignedInt" use="required" /> | |||
<xs:attribute name="type" type="xs:string" use="required" /> | |||
<xs:attribute name="plane_id" type="xs:unsignedInt" use="required" /> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
<xs:element name="flight"> | |||
<xs:complexType> | |||
<xs:simpleContent> | |||
<xs:extension base="xs:unsignedInt"> | |||
<xs:attribute name="flight_line_id" type="xs:unsignedInt" use="required" /> | |||
<xs:attribute name="takeoff" type="xs:date" use="required" /> | |||
<xs:attribute name="landing" type="xs:date" use="required" /> | |||
</xs:extension> | |||
</xs:simpleContent> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
<xs:attribute name="person_in_seat_id" type="xs:unsignedInt" use="required" /> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:sequence> | |||
</xs:complexType> | |||
</xs:element> | |||
</xs:schema> | |||
</source> | |||
===XSLT1=== | |||
<source lang="xml"> | |||
<?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="xml" indent="yes"/> | |||
<xsl:template match="/"> | |||
<people_in_seat> | |||
<xsl:for-each select="people_in_seat/person"> | |||
<person> | |||
<firstname> | |||
<xsl:value-of select="firstname"/> | |||
</firstname> | |||
<lastname> | |||
<xsl:value-of select="lastname"/> | |||
</lastname> | |||
<personalcode> | |||
<xsl:value-of select="personalcode"/> | |||
</personalcode> | |||
<seats> | |||
<xsl:for-each select="people_in_seat/seat"/> | |||
<seat> | |||
<xsl:value-of select ="@seat_id"/> | |||
<xsl:value-of select ="@type"/> | |||
<xsl:value-of select ="@plane_id"/> | |||
<xsl:value-of select ="."/> | |||
</seat> | |||
</seats> | |||
<flights> | |||
<xsl:for-each select="people_in_seat/flight"/> | |||
<flight> | |||
<xsl:value-of select ="@flight_line_id"/> | |||
<xsl:value-of select ="@takeoff"/> | |||
<xsl:value-of select ="@landing"/> | |||
<xsl:value-of select ="."/> | |||
</flight> | |||
</flights> | |||
</person> | |||
</xsl:for-each> | |||
</people_in_seat> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
===XSLT2=== | |||
<source lang="xml"> | |||
<?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="/people_in_seats"> | |||
<html> | |||
<head> | |||
<title>People in seats data</title> | |||
</head> | |||
<body> | |||
<xsl:for-each select="person_in_seat"> | |||
<ul> | |||
<xsl:for-each select="person_in_seat/person"> | |||
<xsl:value-of select="firstname"/> | |||
<xsl:value-of select="lastname"/> | |||
<xsl:value-of select="personal_code"/> | |||
</xsl:for-each> | |||
</ul> | |||
<ul> | |||
<xsl:for-each select="person_in_seat/seat"> | |||
<li> | |||
<xsl:value-of select="@seat_id"/> | |||
<xsl:value-of select="@type"/> | |||
<xsl:value-of select="@plane_id"/> | |||
<xsl:value-of select="."/> | |||
</li> | |||
</xsl:for-each> | |||
</ul> | |||
<ul> | |||
<xsl:for-each select="person_in_seat/flight"> | |||
<li> | |||
<xsl:value-of select="@flight_line_id"/> | |||
<xsl:value-of select="@takeoff"/> | |||
<xsl:value-of select="@landing"/> | |||
<xsl:value-of select="."/> | |||
</li> | |||
</xsl:for-each> | |||
</ul> | |||
</xsl:for-each> | |||
</body> | |||
</html> | |||
</xsl:template> | |||
</xsl:stylesheet> | |||
</source> | |||
==Must have== | ==Must have== | ||
*Lendude broneerimine | |||
*Väljuvate ja saabuvate lendude graafikud | |||
*Kasutaja loomine/autentimine | |||
*Administraatorid saavad lisada/muuta/kustutada lennukeid/lennujaamu/lende/lennu liine | |||
==Nice to have== | ==Nice to have== | ||
*Lennukite jälgimine õhuruumis | |||
*Ilus kasutajaliides | |||
==XML retsensioon== | |||
Valisime XML retsensiooni tegemiseks tiimi nimega LTD töö. | |||
Tööle peale vaadates on näha, et loodud on kõik ülesandes nõutud failid: XML fail, selle skeemifail ja kaks XSL transformatsioonifaili. Dimensioonide puhul on kasutatud mitmeid erinevaid atribuute. Transformatsioonides on kasutatud nii tsükleid kui ka tingimuste kontrolle. | |||
Ülesehitus on failidel loogiline. Eesmärgiks on näidata andmeid selle kohta, millal inimesed viibivad autokooli sõidutundides. Kena on ka see, et kompileerimise vigade vältimiseks on kasutatud tekstiliste andmete korral CDATA-t. | |||
Transformatsioonid on loodud HTML ja XML jaoks ehk siis on tehtud nii nagu ülesandena oli nõutud. Transformatsioonifaile on kerge ja mugav lugeda. | |||
Lõppkokkuvõttes ilus töö. |
Latest revision as of 15:07, 7 June 2018
Liikmed:
- Kristina Rästas
- Simo Jaanus
- Artur Tammiste
- Rauno Lõhmus
Idee
Meie rühma idee oli luua lennujaama ja lennuliini integreeritud süsteem.
Antud rakenduses peaks olema võimalik
- kasutajaks registreerida ja sisse logida.
- Kasutajaid on eri tüüpi.
- Admin kasutaja saab lisada, vaadata ja kustutada kõiki pileteid, lennukeid, lende, lennuliine ja lennujaamu. Admin näeb ka statistilist ülevaadet.
- Tavakasutaja saab broneerida pileteid ning enda omasid ka vaadata.
- Mitte sisse loginud kasutaja saab pileteid broneerida.
Projekt
Meie rühma analüüs on nähtav lingil.
Versioonihaldus https://ralohmus.visualstudio.com/Airport
Meie link koodile on siin.
Administraatori kasutaja on admin@eesti.ee ja parooliks Foobar.foobar1
XML
XML
<?xml version="1.0" encoding="utf-8" ?>
<people_in_seats>
<person_in_seat person_in_seat_id="3">
<person person_id="3">
<firstname>Peeter</firstname>
<lastname>Pakiraam</lastname>
<personal_code>345678912</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="2" type="regular" plane_id="3">1</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="2" takeoff="2017-03-13" landing="2017-03-13">2</flight>
</person_in_seat>
<person_in_seat person_in_seat_id="4">
<person person_id="4">
<firstname>Ants</firstname>
<lastname>Pakk</lastname>
<personal_code>312312321</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="4" type="VIP" plane_id="4">4</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="4" takeoff="2017-03-13" landing="2017-03-13">4</flight>
</person_in_seat>
<person_in_seat person_in_seat_id="5">
<person person_id="5">
<firstname>Tõnu</firstname>
<lastname>Raamat</lastname>
<personal_code>323123123</personal_code>
</person>
<!--Number between tags shows actual seat number-->
<seat seat_id="5" type="regular" plane_id="5">5</seat>
<!--Number between tags shows flight_id-->
<flight flight_line_id="5" takeoff="2017-03-13" landing="2017-03-13">5</flight>
</person_in_seat>
</people_in_seats>
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="people_in_seats">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="person_in_seat">
<xs:complexType>
<xs:sequence>
<xs:element name="person">
<xs:complexType>
<xs:sequence>
<xs:element name="firstname" type="xs:string" />
<xs:element name="lastname" type="xs:string" />
<xs:element name="personal_code" type="xs:unsignedInt" />
</xs:sequence>
<xs:attribute name="person_id" type="xs:unsignedInt" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="seat">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="seat_id" type="xs:unsignedInt" use="required" />
<xs:attribute name="type" type="xs:string" use="required" />
<xs:attribute name="plane_id" type="xs:unsignedInt" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="flight">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:unsignedInt">
<xs:attribute name="flight_line_id" type="xs:unsignedInt" use="required" />
<xs:attribute name="takeoff" type="xs:date" use="required" />
<xs:attribute name="landing" type="xs:date" use="required" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="person_in_seat_id" type="xs:unsignedInt" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
XSLT1
<?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="xml" indent="yes"/>
<xsl:template match="/">
<people_in_seat>
<xsl:for-each select="people_in_seat/person">
<person>
<firstname>
<xsl:value-of select="firstname"/>
</firstname>
<lastname>
<xsl:value-of select="lastname"/>
</lastname>
<personalcode>
<xsl:value-of select="personalcode"/>
</personalcode>
<seats>
<xsl:for-each select="people_in_seat/seat"/>
<seat>
<xsl:value-of select ="@seat_id"/>
<xsl:value-of select ="@type"/>
<xsl:value-of select ="@plane_id"/>
<xsl:value-of select ="."/>
</seat>
</seats>
<flights>
<xsl:for-each select="people_in_seat/flight"/>
<flight>
<xsl:value-of select ="@flight_line_id"/>
<xsl:value-of select ="@takeoff"/>
<xsl:value-of select ="@landing"/>
<xsl:value-of select ="."/>
</flight>
</flights>
</person>
</xsl:for-each>
</people_in_seat>
</xsl:template>
</xsl:stylesheet>
XSLT2
<?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="/people_in_seats">
<html>
<head>
<title>People in seats data</title>
</head>
<body>
<xsl:for-each select="person_in_seat">
<ul>
<xsl:for-each select="person_in_seat/person">
<xsl:value-of select="firstname"/>
<xsl:value-of select="lastname"/>
<xsl:value-of select="personal_code"/>
</xsl:for-each>
</ul>
<ul>
<xsl:for-each select="person_in_seat/seat">
<li>
<xsl:value-of select="@seat_id"/>
<xsl:value-of select="@type"/>
<xsl:value-of select="@plane_id"/>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
<ul>
<xsl:for-each select="person_in_seat/flight">
<li>
<xsl:value-of select="@flight_line_id"/>
<xsl:value-of select="@takeoff"/>
<xsl:value-of select="@landing"/>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Must have
- Lendude broneerimine
- Väljuvate ja saabuvate lendude graafikud
- Kasutaja loomine/autentimine
- Administraatorid saavad lisada/muuta/kustutada lennukeid/lennujaamu/lende/lennu liine
Nice to have
- Lennukite jälgimine õhuruumis
- Ilus kasutajaliides
XML retsensioon
Valisime XML retsensiooni tegemiseks tiimi nimega LTD töö. Tööle peale vaadates on näha, et loodud on kõik ülesandes nõutud failid: XML fail, selle skeemifail ja kaks XSL transformatsioonifaili. Dimensioonide puhul on kasutatud mitmeid erinevaid atribuute. Transformatsioonides on kasutatud nii tsükleid kui ka tingimuste kontrolle. Ülesehitus on failidel loogiline. Eesmärgiks on näidata andmeid selle kohta, millal inimesed viibivad autokooli sõidutundides. Kena on ka see, et kompileerimise vigade vältimiseks on kasutatud tekstiliste andmete korral CDATA-t. Transformatsioonid on loodud HTML ja XML jaoks ehk siis on tehtud nii nagu ülesandena oli nõutud. Transformatsioonifaile on kerge ja mugav lugeda. Lõppkokkuvõttes ilus töö.