diff --git a/AuswertungKlausur/move.sh b/AuswertungKlausur/move.sh index 9a237d3027b2cb1f6ad071d95dd7a9fe01808663..6854ac14f3101ca5f1655c3e501401a3c203f1f2 100755 --- a/AuswertungKlausur/move.sh +++ b/AuswertungKlausur/move.sh @@ -11,7 +11,7 @@ rm -rf ~/newUsers.txt for zip in $( ls *.zip); do userId=${zip%.zip} - destuser=~/C/Hdm/Fh/KlausurBewertung/$userId + destuser=~/C/HdM/Fh/KlausurBewertung/$userId if [ -d "$destuser" ] then diff --git a/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompress.png b/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompress.png index d0b73af0f30d41eb18186d2baa5c1a18a2987f45..bc1b63f1448fe2cf1293ac2e98ac7380c3bd4d94 100644 Binary files a/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompress.png and b/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompress.png differ diff --git a/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png b/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png index 6fe835bf86aa6ca60ed876ed0d3fc5a979b8d40c..a91ee92f6abe13423c6afc2674630f91b55ef105 100644 Binary files a/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png and b/Doc/Sd1/Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png differ diff --git a/Doc/Sd1/Ref/LangFundament/keycardFlatten.svg b/Doc/Sd1/Ref/LangFundament/keycardFlatten.svg new file mode 100644 index 0000000000000000000000000000000000000000..18f40657b9588df90fb9b8ce4149804f26232b55 --- /dev/null +++ b/Doc/Sd1/Ref/LangFundament/keycardFlatten.svg @@ -0,0 +1,1269 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:sozi="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="keycardFlatten.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + version="1.2" + id="svg2" + height="148.55078" + width="637.24609"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="2.4154124" + inkscape:cx="289.1805" + inkscape:cy="99.744958" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1052" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + inkscape:snap-others="true" + inkscape:snap-nodes="true" + inkscape:object-nodes="false" + inkscape:snap-midpoints="true" + inkscape:snap-intersection-paths="false" + inkscape:object-paths="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:snap-smooth-nodes="false" + inkscape:snap-bbox="true" + inkscape:bbox-nodes="false" + inkscape:snap-global="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0"> + <inkscape:grid + type="xygrid" + id="grid1569" + originx="-66.226562" + originy="-313.94921" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker2318" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path2316" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker4887" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4627" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6797" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6799" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6793" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6795" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6778" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6514" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lstart" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lstart" + style="overflow:visible"> + <path + id="path3841" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM"> + <path + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path3914" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend" + style="overflow:visible"> + <path + id="path3844" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM" + orient="auto" + refY="0" + refX="0" + id="DiamondM" + style="overflow:visible"> + <path + id="path3923" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMH" + orient="auto" + refY="0" + refX="0" + id="DiamondMH" + style="overflow:visible"> + <path + id="path4656" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendB" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendB" + style="overflow:visible"> + <path + id="path4659" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMU" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMU"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path5221" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend3" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend3" + style="overflow:visible"> + <path + id="path5224" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMo" + orient="auto" + refY="0" + refX="0" + id="DiamondMo" + style="overflow:visible"> + <path + id="path5799" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendO" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendO" + style="overflow:visible"> + <path + id="path5802" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM1" + orient="auto" + refY="0" + refX="0" + id="DiamondM1" + style="overflow:visible"> + <path + id="path6393" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendV" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendV" + style="overflow:visible"> + <path + id="path6396" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMN" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMN"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path7813" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartP" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartP" + style="overflow:visible"> + <path + id="path7816" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMb" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMb"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path9491" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendX" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendX" + style="overflow:visible"> + <path + id="path9494" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM8" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM8"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path10143" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendT" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendT" + style="overflow:visible"> + <path + id="path10146" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNT"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12195" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartPJ" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartPJ" + style="overflow:visible"> + <path + id="path12198" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNTL" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNTL"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12907" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lendx" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lendx" + style="overflow:visible"> + <path + id="path12910" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMoY" + orient="auto" + refY="0" + refX="0" + id="DiamondMoY" + style="overflow:visible"> + <path + id="path13187" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendOe" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendOe" + style="overflow:visible"> + <path + id="path13190" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + offset="0" + style="stop-color:#7c7c7c" + id="stop3930-2" /> + <stop + offset="1" + style="stop-color:#e6e3e3" + id="stop3932-0" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + style="stop-color:#cecece;stop-opacity:1;" + offset="0" + id="stop8879" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop8881" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + id="stop8871" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop8873" + offset="1" + style="stop-color:#000000;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + id="stop7423" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop7425" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7407" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7409" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + id="stop7380" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7382" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <inkscape:perspective + id="perspective6864" + inkscape:persp3d-origin="32 : 21.333333 : 1" + inkscape:vp_z="64 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 32 : 1" + sodipodi:type="inkscape:persp3d" /> + <filter + id="imagebot_16" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-6" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-1" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-8" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-7" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-9" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-2" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-2" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-8" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-9" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-73" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-6" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-1" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-0"> + <feGaussianBlur + id="imagebot_21-7" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-5" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_12-0" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215"> + <feGaussianBlur + id="imagebot_18-4" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-8" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-02" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-9" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-4" + y2="0.73097426" + xlink:href="#linearGradient3928-8" + x2="36.048218" + y1="43.90382" + x1="35.173683" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-3" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-5" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-17" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-66.226562,-660.01971)"> + <rect + id="rect4664" + width="190" + height="80" + x="310" + y="662.51971" + style="fill:#ac9d93;stroke-width:0.94006431" + ry="4.9999871" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764" + cx="320" + cy="672.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3" + cx="400" + cy="672.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6" + cx="380" + cy="672.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7" + cx="360" + cy="672.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5" + cx="340" + cy="672.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35" + cx="330" + cy="682.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2" + cx="390" + cy="682.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9" + cx="370" + cy="682.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1" + cx="350" + cy="682.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-2" + cx="320" + cy="692.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-7" + cx="400" + cy="692.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-0" + cx="380" + cy="692.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-93" + cx="360" + cy="692.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-6" + cx="340" + cy="692.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-0" + cx="330" + cy="702.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-6" + cx="390" + cy="702.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-2" + cx="370" + cy="702.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-6" + cx="350" + cy="702.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-1" + cx="320" + cy="712.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-8" + cx="400" + cy="712.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-7" + cx="380" + cy="712.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-92" + cx="360" + cy="712.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-0" + cx="340" + cy="712.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-2" + cx="330" + cy="722.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-3" + cx="390" + cy="722.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-7" + cx="370" + cy="722.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-5" + cx="350" + cy="722.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-9" + cx="320" + cy="732.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-2" + cx="400" + cy="732.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-28" + cx="380" + cy="732.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-97" + cx="360" + cy="732.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-3" + cx="340" + cy="732.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-61" + cx="75" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-29" + cx="155" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-3" + cx="135" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-1" + cx="115" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-9" + cx="95" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-4" + cx="180" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-7" + cx="240" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-8" + cx="220" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-4" + cx="200" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-2-5" + cx="260" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-7-0" + cx="340" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-0-3" + cx="320" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-93-6" + cx="300" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-6-1" + cx="280" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-0-0" + cx="360" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-6-6" + cx="420" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-2-3" + cx="400" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-6-2" + cx="380" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-1-0" + cx="440" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-8-6" + cx="520" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-7-1" + cx="500" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-92-5" + cx="480" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-0-5" + cx="460" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-2-4" + cx="540" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-3-7" + cx="600" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-7-6" + cx="580" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-5-5" + cx="560" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-9-6" + cx="620" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-2-9" + cx="700" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-28-3" + cx="680" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-97-7" + cx="660" + cy="782.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-3-4" + cx="640" + cy="782.51971" + r="2.5" /> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="694.76953" + y="808.35175" + id="text390"><tspan + sodipodi:role="line" + id="tspan388" + x="694.76953" + y="808.35175">1</tspan><tspan + sodipodi:role="line" + x="694.76953" + y="828.35175" + id="tspan392" /></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="65.007812" + y="808.34393" + id="text396"><tspan + sodipodi:role="line" + id="tspan394" + x="65.007812" + y="808.34393">32</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="554.91406" + y="808.34393" + id="text400"><tspan + sodipodi:role="line" + id="tspan398" + x="554.91406" + y="808.34393">8</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="389.44141" + y="808.34393" + id="text404"><tspan + sodipodi:role="line" + id="tspan402" + x="389.44141" + y="808.34393">16</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:16px;line-height:1.25;font-family:'DejaVu Sans';-inkscape-font-specification:'DejaVu Sans';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="229.67969" + y="808.45721" + id="text408"><tspan + sodipodi:role="line" + id="tspan406" + x="229.67969" + y="808.45721">24</tspan></text> + <text + xml:space="preserve" + style="font-style:normal;font-weight:normal;font-size:16px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none" + x="68.566406" + y="768.59784" + id="text4662"><tspan + sodipodi:role="line" + id="tspan4660" + x="68.566406" + y="768.59784">Bit</tspan></text> + </g> + <script + sozi:version="14.10-05142318" + id="sozi-script">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + sozi:version="14.10-05142318" + id="sozi-style">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="1" + sozi:title="Gcd implementation" + sozi:refid="rect10351" /> + <sozi:frame + sozi:refid="rect10841" + sozi:title="Gcd maven packaging" + sozi:sequence="2" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000.0" + sozi:transition-duration-ms="1000.0" + sozi:transition-zoom-percent="0.0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="3" + sozi:title="Using Math.getGcd()" + sozi:refid="rect11089" /> + <sozi:frame + sozi:refid="rect11381" + sozi:title="Fraction project" + sozi:sequence="4" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000.0" + sozi:transition-duration-ms="1000.0" + sozi:transition-zoom-percent="0.0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="5" + sozi:title="Maven dependency definition" + sozi:refid="rect11637" /> + <sozi:frame + sozi:refid="rect11895" + sozi:title="Fraction depends on Gcd" + sozi:sequence="6" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000" + sozi:transition-duration-ms="1000" + sozi:transition-zoom-percent="0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> +</svg> diff --git a/Doc/Sd1/Ref/LangFundament/keycardHint.svg b/Doc/Sd1/Ref/LangFundament/keycardHint.svg new file mode 100644 index 0000000000000000000000000000000000000000..ab1321f04e0234539f4240a88c1595f4fa3a75a6 --- /dev/null +++ b/Doc/Sd1/Ref/LangFundament/keycardHint.svg @@ -0,0 +1,1014 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:sozi="http://sozi.baierouge.fr" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + sodipodi:docname="keycard.svg" + inkscape:version="0.92.3 (2405546, 2018-03-11)" + version="1.2" + id="svg2" + height="21.166666mm" + width="50.270832mm"> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="3.415909" + inkscape:cx="114.70676" + inkscape:cy="39.098568" + inkscape:document-units="mm" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:window-width="1600" + inkscape:window-height="1052" + inkscape:window-x="0" + inkscape:window-y="25" + inkscape:window-maximized="1" + showguides="false" + inkscape:guide-bbox="true" + inkscape:snap-others="true" + inkscape:snap-nodes="true" + inkscape:object-nodes="false" + inkscape:snap-midpoints="true" + inkscape:snap-intersection-paths="false" + inkscape:object-paths="false" + inkscape:snap-object-midpoints="true" + inkscape:snap-center="true" + inkscape:snap-smooth-nodes="false" + inkscape:snap-bbox="true" + inkscape:bbox-nodes="false" + inkscape:snap-global="true" + fit-margin-top="0" + fit-margin-left="0" + fit-margin-right="0" + fit-margin-bottom="0" + units="mm"> + <inkscape:grid + type="xygrid" + id="grid1569" + originx="-265" + originy="-394.99998" /> + </sodipodi:namedview> + <defs + id="defs4"> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker11618" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Mend"> + <path + transform="matrix(-0.4,0,0,-0.4,-4,0)" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + id="path11616" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker2318" + style="overflow:visible" + inkscape:isstock="true"> + <path + inkscape:connector-curvature="0" + id="path2316" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker4887" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path4627" + d="M 0,0 5,-5 -12.5,0 5,5 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1" + transform="matrix(-0.8,0,0,-0.8,-10,0)" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6797" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6799" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:isstock="true" + style="overflow:visible" + id="marker6793" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="Arrow1Lend"> + <path + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + id="path6795" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="marker6778" + style="overflow:visible" + inkscape:isstock="true"> + <path + id="path6514" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt;stroke-opacity:1" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lstart" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lstart" + style="overflow:visible"> + <path + id="path3841" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM"> + <path + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path3914" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend" + style="overflow:visible"> + <path + id="path3844" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM" + orient="auto" + refY="0" + refX="0" + id="DiamondM" + style="overflow:visible"> + <path + id="path3923" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMH" + orient="auto" + refY="0" + refX="0" + id="DiamondMH" + style="overflow:visible"> + <path + id="path4656" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendB" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendB" + style="overflow:visible"> + <path + id="path4659" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMU" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMU"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path5221" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lend3" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lend3" + style="overflow:visible"> + <path + id="path5224" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMo" + orient="auto" + refY="0" + refX="0" + id="DiamondMo" + style="overflow:visible"> + <path + id="path5799" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendO" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendO" + style="overflow:visible"> + <path + id="path5802" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondM1" + orient="auto" + refY="0" + refX="0" + id="DiamondM1" + style="overflow:visible"> + <path + id="path6393" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendV" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendV" + style="overflow:visible"> + <path + id="path6396" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMN" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMN"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path7813" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartP" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartP" + style="overflow:visible"> + <path + id="path7816" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMb" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMb"> + <path + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path9491" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendX" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendX" + style="overflow:visible"> + <path + id="path9494" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareM8" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareM8"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path10143" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendT" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendT" + style="overflow:visible"> + <path + id="path10146" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNT" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNT"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12195" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LstartPJ" + orient="auto" + refY="0" + refX="0" + id="Arrow1LstartPJ" + style="overflow:visible"> + <path + id="path12198" + d="M 10.666667,0 14.933333,-4.2666667 0,0 14.933333,4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + style="overflow:visible" + id="SquareMNTL" + refX="0" + refY="0" + orient="auto" + inkscape:stockid="SquareMNTL"> + <path + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.42666668pt" + d="M -2.1333333,-2.1333333 V 2.1333333 H 2.1333333 V -2.1333333 Z" + id="path12907" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1Lendx" + orient="auto" + refY="0" + refX="0" + id="Arrow1Lendx" + style="overflow:visible"> + <path + id="path12910" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#ff0000;fill-rule:evenodd;stroke:#ff0000;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="DiamondMoY" + orient="auto" + refY="0" + refX="0" + id="DiamondMoY" + style="overflow:visible"> + <path + id="path13187" + d="M 0,-3.0169928 -3.0169981,0 0,3.0169851 3.0169797,0 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.42666668pt" + inkscape:connector-curvature="0" /> + </marker> + <marker + inkscape:stockid="Arrow1LendOe" + orient="auto" + refY="0" + refX="0" + id="Arrow1LendOe" + style="overflow:visible"> + <path + id="path13190" + d="M -10.666667,0 -14.933333,4.2666667 0,0 -14.933333,-4.2666667 Z" + style="fill:#00ff00;fill-rule:evenodd;stroke:#00ff00;stroke-width:0.85333335pt" + inkscape:connector-curvature="0" /> + </marker> + <linearGradient + id="linearGradient3928-8"> + <stop + offset="0" + style="stop-color:#7c7c7c" + id="stop3930-2" /> + <stop + offset="1" + style="stop-color:#e6e3e3" + id="stop3932-0" /> + </linearGradient> + <linearGradient + id="linearGradient8877"> + <stop + style="stop-color:#cecece;stop-opacity:1;" + offset="0" + id="stop8879" /> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="1" + id="stop8881" /> + </linearGradient> + <linearGradient + id="linearGradient8869"> + <stop + id="stop8871" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop8873" + offset="1" + style="stop-color:#000000;stop-opacity:1;" /> + </linearGradient> + <linearGradient + id="linearGradient7421"> + <stop + id="stop7423" + offset="0" + style="stop-color:#000000;stop-opacity:1;" /> + <stop + id="stop7425" + offset="1" + style="stop-color:#000000;stop-opacity:0;" /> + </linearGradient> + <linearGradient + id="linearGradient7405"> + <stop + style="stop-color:#9e9e9e;stop-opacity:1;" + offset="0" + id="stop7407" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop7409" /> + </linearGradient> + <linearGradient + id="linearGradient7378"> + <stop + id="stop7380" + offset="0" + style="stop-color:#9e9e9e;stop-opacity:1;" /> + <stop + id="stop7382" + offset="1" + style="stop-color:#ffffff;stop-opacity:1;" /> + </linearGradient> + <inkscape:perspective + id="perspective6864" + inkscape:persp3d-origin="32 : 21.333333 : 1" + inkscape:vp_z="64 : 32 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 32 : 1" + sodipodi:type="inkscape:persp3d" /> + <filter + id="imagebot_16" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-6" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-1" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-8" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-7" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-9" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-2" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-2" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-8" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-9" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-73" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-6" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-1" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_16-0"> + <feGaussianBlur + id="imagebot_21-7" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-5" + y2="-235.34229" + xlink:href="#linearGradient3928-8" + x2="33.162106" + y1="-192.16943" + x1="32.287571" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + style="color-interpolation-filters:sRGB" + id="imagebot_12-0" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215"> + <feGaussianBlur + id="imagebot_18-4" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-8" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_16-02" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_21-9" + stdDeviation="1.2625" /> + </filter> + <linearGradient + id="imagebot_14-4" + y2="0.73097426" + xlink:href="#linearGradient3928-8" + x2="36.048218" + y1="43.90382" + x1="35.173683" + gradientTransform="scale(0.90019155,1.1108747)" + gradientUnits="userSpaceOnUse" /> + <filter + id="imagebot_12-3" + width="1.0832" + y="-0.1075" + x="-0.041609999" + height="1.215" + style="color-interpolation-filters:sRGB"> + <feGaussianBlur + id="imagebot_18-5" + stdDeviation="0.5375" /> + </filter> + <linearGradient + id="imagebot_9-17" + y2="-245.02541" + xlink:href="#linearGradient3928-8" + x2="34.572056" + y1="-254.4969" + x1="43.709675" + gradientUnits="userSpaceOnUse" /> + </defs> + <metadata + id="metadata7"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-265,-647.51971)"> + <rect + id="rect4664" + width="190" + height="80" + x="265" + y="647.51971" + style="fill:#ac9d93;stroke-width:0.94006431" + ry="4.9999871" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-36" + cx="275" + cy="657.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-75" + cx="355" + cy="657.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-3" + cx="335" + cy="657.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-5" + cx="315" + cy="657.51971" + r="2.5" /> + <circle + style="fill:#ff0000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-62" + cx="295" + cy="657.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-9" + cx="285" + cy="667.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-1" + cx="345" + cy="667.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-27" + cx="325" + cy="667.51971" + r="2.5" /> + <circle + style="fill:#0000ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-0" + cx="305" + cy="667.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-2-9" + cx="275" + cy="677.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-7-3" + cx="355" + cy="677.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-0-6" + cx="335" + cy="677.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-93-0" + cx="315" + cy="677.51971" + r="2.5" /> + <circle + style="fill:#008000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-6-6" + cx="295" + cy="677.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-0-2" + cx="285" + cy="687.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-6-6" + cx="345" + cy="687.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-2-1" + cx="325" + cy="687.51971" + r="2.5" /> + <circle + style="fill:#ff00ff;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-6-8" + cx="305" + cy="687.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-1-7" + cx="275" + cy="697.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-8-9" + cx="355" + cy="697.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-7-2" + cx="335" + cy="697.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-92-0" + cx="315" + cy="697.51971" + r="2.5" /> + <circle + style="fill:#808000;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-0-2" + cx="295" + cy="697.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-35-2-3" + cx="285" + cy="707.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-2-3-7" + cx="345" + cy="707.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-9-7-5" + cx="325" + cy="707.51971" + r="2.5" /> + <circle + style="fill:#ffcc00;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-1-5-9" + cx="305" + cy="707.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-9-2" + cx="275" + cy="717.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-3-2-2" + cx="355" + cy="717.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-6-28-8" + cx="335" + cy="717.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-7-97-9" + cx="315" + cy="717.51971" + r="2.5" /> + <circle + style="fill:#008066;stroke-width:2.66666675;stroke-miterlimit:4;stroke-dasharray:none" + id="path764-5-3-7" + cx="295" + cy="717.51971" + r="2.5" /> + </g> + <script + sozi:version="14.10-05142318" + id="sozi-script">function namespace(b,d,a){var c=b;d.split(".").forEach(function(e){if(typeof c[e]==="undefined"){c[e]={}}c=c[e]});if(a){a(c,b)}return c}namespace(this,"sozi.events",function(b){var a={};b.listen=function(c,d){if(!a.hasOwnProperty(c)){a[c]=[]}a[c].push(d)};b.fire=function(d){var c=Array.prototype.slice.call(arguments,1);if(a.hasOwnProperty(d)){a[d].forEach(function(e){e.apply(null,c)})}}});namespace(this,"sozi.proto",function(a){a.Object={installConstructors:function(){function b(){}b.prototype=this;this.instance=function(){var c=new b();c.construct.apply(c,arguments);return c};this.subtype=function(d){var c=new b();c.augment(d);c.installConstructors();return c}},construct:function(){},augment:function(c){for(var b in c){if(c.hasOwnProperty(b)){this[b]=c[b]}}return this},bind:function(c){var b=this;return function(){return c.apply(b,arguments)}}};a.Object.installConstructors()});namespace(this,"sozi.actions",function(A,g){var u=namespace(g,"sozi.player");var v=namespace(g,"sozi.display");var n=g.document;var o=0;var w=1;var t=1.05;var y=5;var m=5;var r=false;var i=0;var h=0;function a(C,B,D){u.stop();v.viewPorts.player.zoom(C>0?t:1/t,B,D)}function x(B){u.stop();v.viewPorts.player.rotate(B>0?y:-y)}function s(){if(sozi.framelist.isVisible()){sozi.framelist.hide();u.restart()}else{u.stop();sozi.framelist.show()}}function d(B){return v.viewPorts.player.contains(B.clientX,B.clientY)}function f(B){if(!d(B)){return}if(B.button===o){n.documentElement.addEventListener("mousemove",q,false);r=false;i=B.clientX;h=B.clientY}else{if(B.button===w){s()}}B.stopPropagation();B.preventDefault()}function q(B){if(!d(B)){return}u.stop();if(!r&&(Math.abs(B.clientX-i)>m||Math.abs(B.clientY-h)>m)){r=true}if(r){sozi.events.fire("sozi.player.cleanup");v.viewPorts.player.drag(B.clientX-i,B.clientY-h);i=B.clientX;h=B.clientY}B.stopPropagation()}function c(B){if(!d(B)){return}if(B.button===o){n.documentElement.removeEventListener("mousemove",q,false)}B.stopPropagation();B.preventDefault()}function p(B){if(!d(B)){return}u.moveToPrevious();B.stopPropagation();B.preventDefault()}function e(B){if(!d(B)){return}if(!r&&B.button!==w){u.moveToNext()}B.stopPropagation();B.preventDefault()}function j(B){if(!d(B)){return}if(!B){B=g.event}var C=0;if(B.wheelDelta){C=B.wheelDelta}else{if(B.detail){C=-B.detail}}if(C!==0){if(B.shiftKey){x(C)}else{a(C,B.clientX,B.clientY)}}B.stopPropagation();B.preventDefault()}function l(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.charCode||B.which){case 43:a(1,g.innerWidth/2,g.innerHeight/2);break;case 45:a(-1,g.innerWidth/2,g.innerHeight/2);break;case 61:u.moveToCurrent();break;case 70:case 102:u.showAll();break;case 84:case 116:s();break;case 82:x(-1);break;case 114:x(1);break;default:return}B.stopPropagation();B.preventDefault()}function b(B){if(B.altKey||B.ctrlKey||B.metaKey){return}switch(B.keyCode){case 36:if(B.shiftKey){u.jumpToFirst()}else{u.moveToFirst()}break;case 35:if(B.shiftKey){u.jumpToLast()}else{u.moveToLast()}break;case 38:case 33:case 37:if(B.shiftKey){u.jumpToPrevious()}else{u.moveToPrevious()}break;case 40:case 34:case 39:case 13:case 32:if(B.shiftKey){u.jumpToNext()}else{u.moveToNext()}break;default:return}B.stopPropagation();B.preventDefault()}function z(B){B.stopPropagation()}function k(){var C=n.getElementsByTagName("a");for(var D=0;D<C.length;D+=1){C[D].addEventListener("click",z,false);C[D].addEventListener("contextmenu",z,false)}var B=n.documentElement;B.addEventListener("click",e,false);B.addEventListener("mousedown",f,false);B.addEventListener("mouseup",c,false);B.addEventListener("contextmenu",p,false);B.addEventListener("DOMMouseScroll",j,false);g.onmousewheel=j;B.addEventListener("keypress",l,false);B.addEventListener("keydown",b,false)}sozi.events.listen("sozi.display.ready",k)});namespace(this,"sozi.animation",function(d,g){var h=g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||g.oRequestAnimationFrame;var k=function(){return g.performance&&g.performance.now?g.performance.now():Date.now()};d.setAnimationFrameHandlers=function(l,m){h=l;k=m};var i=40;var c;var j=[];function e(){if(j.length>0){if(h){h(e)}j.forEach(function(l){l.step(k())})}else{if(!h){g.clearInterval(c)}}}function b(){if(h){h(e)}else{c=g.setInterval(function(){e(k())},i)}}function a(l){j.push(l);if(j.length===1){b()}}function f(l){j.splice(j.indexOf(l),1)}d.Animator=sozi.proto.Object.subtype({construct:function(){this.durationMs=0;this.data=null;this.initialTime=0;this.started=false},start:function(l,m){this.durationMs=l;this.data=m;this.initialTime=k();this.onStep(0);if(!this.started){this.started=true;a(this)}},stop:function(){if(this.started){f(this);this.started=false}},step:function(m){var l=m-this.initialTime;if(l>=this.durationMs){this.stop();this.onStep(1);this.onDone()}else{this.onStep(l/this.durationMs)}},onStep:function(l){},onDone:function(){}});d.profiles={linear:function(l){return l},accelerate:function(l){return Math.pow(l,3)},"strong-accelerate":function(l){return Math.pow(l,5)},decelerate:function(l){return 1-Math.pow(1-l,3)},"strong-decelerate":function(l){return 1-Math.pow(1-l,5)},"accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,3)/2;return l<=0.5?n:1-n},"strong-accelerate-decelerate":function(l){var m=l<=0.5?l:1-l,n=Math.pow(2*m,5)/2;return l<=0.5?n:1-n},"decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,2))/2;return l<=0.5?n:1-n},"strong-decelerate-accelerate":function(l){var m=l<=0.5?l:1-l,n=(1-Math.pow(1-2*m,3))/2;return l<=0.5?n:1-n},"immediate-beginning":function(l){return 1},"immediate-end":function(l){return l===1?1:0},"immediate-middle":function(l){return l>=0.5?1:0}}});namespace(this,"sozi.display",function(c,g){var f="http://www.w3.org/2000/svg";var b="http://www.w3.org/1999/xlink";var i=g.document;var k;var h;var j;c.viewPorts={};var e;c.CameraState=sozi.proto.Object.subtype({construct:function(){this.cx=this.cy=0;this.width=this.height=1;this.angle=0;this.clipped=true;this.transitionZoomPercent=0;this.transitionProfile=sozi.animation.profiles.linear;this.transitionPath=null},setCenter:function(l,m){this.cx=l;this.cy=m;return this},setSize:function(m,l){this.width=m;this.height=l;return this},setClipped:function(l){this.clipped=l;return this},setAngle:function(l){this.angle=(l+180)%360-180;return this},setRawAngle:function(l){this.angle=l;return this},setTransitionZoomPercent:function(l){this.transitionZoomPercent=l;return this},setTransitionProfile:function(l){this.transitionProfile=l;return this},setTransitionPath:function(l){this.transitionPath=l;return this},setAtElement:function(p){var s,o,t,m;if(p.nodeName==="rect"){s=p.x.baseVal.value;o=p.y.baseVal.value;t=p.width.baseVal.value;m=p.height.baseVal.value}else{var q=p.getBBox();s=q.x;o=q.y;t=q.width;m=q.height}var n=i.documentElement.createSVGPoint();n.x=s+t/2;n.y=o+m/2;var r=p.getCTM();n=n.matrixTransform(r);var l=Math.sqrt(r.a*r.a+r.b*r.b);return this.setCenter(n.x,n.y).setSize(t*l,m*l).setAngle(Math.atan2(r.b,r.a)*180/Math.PI)},setAtState:function(l){return this.setCenter(l.cx,l.cy).setSize(l.width,l.height).setAngle(l.angle).setClipped(l.clipped).setTransitionZoomPercent(l.transitionZoomPercent).setTransitionProfile(l.transitionProfile).setTransitionPath(l.transitionPath)},interpolatableAttributes:["width","height","angle"],interpolate:function(n,o,t,v,r){var p=1-t;for(var q=0;q<this.interpolatableAttributes.length;q+=1){var s=this.interpolatableAttributes[q];this[s]=o[s]*t+n[s]*p}var l=r?n.transitionPath:o.transitionPath;if(v&&l){var x=l.getTotalLength();if(r){var m=l.getPointAtLength(x);var u=l.getPointAtLength(0);var w=l.getPointAtLength(x*p)}else{var m=l.getPointAtLength(0);var u=l.getPointAtLength(x);var w=l.getPointAtLength(x*t)}this.cx=w.x+(o.cx-u.x)*t+(n.cx-m.x)*p;this.cy=w.y+(o.cy-u.y)*t+(n.cy-m.y)*p}else{this.cx=o.cx*t+n.cx*p;this.cy=o.cy*t+n.cy*p}}});c.Camera=c.CameraState.subtype({construct:function(n,o){c.CameraState.construct.call(this);this.viewPort=n;this.svgClipRect=i.createElementNS(f,"rect");var m=i.createElementNS(f,"clipPath");m.setAttribute("id","sozi-clip-path-"+n.id+"-"+o);m.appendChild(this.svgClipRect);n.svgGroup.appendChild(m);var l=i.createElementNS(f,"g");l.setAttribute("clip-path","url(#sozi-clip-path-"+n.id+"-"+o+")");n.svgGroup.appendChild(l);if(n.isPrimary){this.svgLayer=i.createElementNS(f,"g");this.svgLayer.appendChild(i.getElementById(o))}else{this.svgLayer=i.createElementNS(f,"use");this.svgLayer.setAttributeNS(b,"href","#"+o)}l.appendChild(this.svgLayer)},setAtState:function(l){return c.CameraState.setAtState.call(this,l).update()},getScale:function(){return Math.min(this.viewPort.width/this.width,this.viewPort.height/this.height)},rotate:function(l){return this.setAngle(this.angle+l).update()},zoom:function(m,l,n){return this.setSize(this.width/m,this.height/m).drag((1-m)*(l-this.viewPort.width/2),(1-m)*(n-this.viewPort.height/2))},drag:function(m,l){var q=this.getScale();var o=this.angle*Math.PI/180;var n=Math.sin(o);var p=Math.cos(o);return this.setCenter(this.cx-(m*p-l*n)/q,this.cy-(m*n+l*p)/q).setClipped(false).update()},update:function(){var q=this.getScale();var n=this.width*q;var m=this.height*q;var l=(this.viewPort.width-n)/2;var r=(this.viewPort.height-m)/2;this.svgClipRect.setAttribute("x",this.clipped?l:0);this.svgClipRect.setAttribute("y",this.clipped?r:0);this.svgClipRect.setAttribute("width",this.clipped?n:this.viewPort.width);this.svgClipRect.setAttribute("height",this.clipped?m:this.viewPort.height);var p=-this.cx+this.width/2+l/q;var o=-this.cy+this.height/2+r/q;this.svgLayer.setAttribute("transform","scale("+q+")translate("+p+","+o+")rotate("+(-this.angle)+","+this.cx+","+this.cy+")");return this}});c.ViewPort=sozi.proto.Object.subtype({construct:function(n,m,l){this.id=n;c.viewPorts[n]=this;this.isPrimary=!!l;if(this.isPrimary){if(e){throw"Failed to create a primary viewport. A primary viewport already exists."}else{e=this}}this.svgGroup=i.createElementNS(f,"g");this.svgGroup.setAttribute("class","sozi-viewport");this.svgGroup.setAttribute("id","sozi-viewport-"+n);i.documentElement.appendChild(this.svgGroup);this.setLocation(0,0).setSize(g.innerWidth,g.innerHeight);this.cameras={};m.forEach(function(o){this.cameras[o]=c.Camera.instance(this,o)},this)},setSize:function(m,l){this.width=m;this.height=l;return this},setLocation:function(l,m){this.x=l;this.y=m;return this},contains:function(l,m){return l>=this.x&&l<this.x+this.width&&m>=this.y&&m<this.y+this.height},getDocumentState:function(){var m=c.CameraState.instance().setCenter(k.x+k.width/2,k.y+k.height/2).setSize(k.width,k.height).setClipped(false);var l={};for(var n in this.cameras){l[n]=m}return l},update:function(){this.svgGroup.setAttribute("transform","translate("+this.x+","+this.y+")");for(var l in this.cameras){this.cameras[l].update()}return this},showFrame:function(l){for(var m in l.states){this.cameras[m].setAtState(l.states[m])}return this},drag:function(m,l){for(var n in this.cameras){this.cameras[n].drag(m,l)}return this},zoom:function(m,l,o){for(var n in this.cameras){this.cameras[n].zoom(m,l,o)}return this},rotate:function(l){for(var m in this.cameras){this.cameras[m].rotate(l)}return this},onWindowResize:function(m,l){this.setLocation(this.x*m,this.y*l).setSize(this.width*m,this.height*l).update()}});function d(){var l=i.documentElement;k=l.getBBox();h=g.innerWidth;j=g.innerHeight;l.setAttribute("width",h);l.setAttribute("height",j);sozi.events.fire("sozi.display.ready")}function a(){var l=i.documentElement;l.setAttribute("width",g.innerWidth);l.setAttribute("height",g.innerHeight);for(var m in c.viewPorts){c.viewPorts[m].onWindowResize(g.innerWidth/h,g.innerHeight/j)}h=g.innerWidth;j=g.innerHeight}sozi.events.listen("sozi.document.ready",d);g.addEventListener("resize",a,false)});namespace(this,"sozi.document",function(c,e){var g=e.document;var b="http://sozi.baierouge.fr";var d={title:"Untitled",sequence:"0",hide:"true",clip:"true","show-in-frame-list":"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear","transition-path-hide":"true"};var h=["g","image","path","rect","circle","ellipse","line","polyline","polygon","text","clippath"];c.frames=[];c.idLayerList=[];function j(l,k){return l.getAttributeNS(b,k)||d[k]}function i(o,p,k){var l=o.states[p]=o.states[p]||sozi.display.CameraState.instance();if(typeof l.transitionZoomPercent==="undefined"||k.hasAttributeNS(b,"transition-zoom-percent")){l.setTransitionZoomPercent(parseInt(j(k,"transition-zoom-percent"),10))}if(typeof l.transitionProfile==="undefined"||k.hasAttributeNS(b,"transition-profile")){l.setTransitionProfile(sozi.animation.profiles[j(k,"transition-profile")])}if(typeof l.transitionPath==="undefined"||k.hasAttributeNS(b,"transition-path")){var n=g.getElementById(k.getAttributeNS(b,"transition-path"));if(n&&n.nodeName==="path"){l.setTransitionPath(n);if(j(k,"transition-path-hide")==="true"){n.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"refid")){var m=g.getElementById(k.getAttributeNS(b,"refid"));if(m){l.setAtElement(m);if(j(k,"hide")==="true"){m.style.visibility="hidden"}}}if(k.hasAttributeNS(b,"clip")){l.setClipped(j(k,"clip")==="true")}}function a(){var l=[];var p=g.getElementsByTagNameNS(b,"layer");for(var n=0;n<p.length;n+=1){var s=p[n].getAttributeNS(b,"group");if(s&&l.indexOf(s)===-1){l.push(s)}}var r=g.documentElement;var o="http://www.w3.org/2000/svg";var q=g.createElementNS(o,"g");var k=Array.prototype.slice.call(r.childNodes);k.forEach(function(u,t){if(!u.getAttribute){r.removeChild(u)}else{if(l.indexOf(u.getAttribute("id"))!==-1){if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+t);c.idLayerList.push("sozi-wrapper-"+t);r.insertBefore(q,u);q=g.createElementNS(o,"g")}c.idLayerList.push(u.getAttribute("id"))}else{if(h.indexOf(u.localName.toLowerCase())!==-1){r.removeChild(u);q.appendChild(u)}}}});if(q.firstChild){q.setAttribute("id","sozi-wrapper-"+k.length);c.idLayerList.push("sozi-wrapper-"+k.length);r.appendChild(q)}var m=Array.prototype.slice.call(g.getElementsByTagNameNS(b,"frame"));m.sort(function(u,t){var w=parseInt(j(u,"sequence"),10);var v=parseInt(j(t,"sequence"),10);return w-v});m.forEach(function(v,u){var x={id:v.getAttribute("id"),title:j(v,"title"),showInFrameList:j(v,"show-in-frame-list")==="true",sequence:parseInt(j(v,"sequence"),10),timeoutEnable:j(v,"timeout-enable")==="true",timeoutMs:parseInt(j(v,"timeout-ms"),10),transitionDurationMs:parseInt(j(v,"transition-duration-ms"),10),states:{}};c.idLayerList.forEach(function(A){if(u===0||A.search("sozi-wrapper-[0-9]+")!==-1){i(x,A,v)}else{var z=x.states[A]=sozi.display.CameraState.instance();var y=c.frames[c.frames.length-1].states[A];z.setAtState(y)}});var t=Array.prototype.slice.call(v.getElementsByTagNameNS(b,"layer"));t.forEach(function(y){var z=y.getAttributeNS(b,"group");if(z&&c.idLayerList.indexOf(z)!==-1){i(x,z,y)}});for(var w in x.states){if(x.states.hasOwnProperty(w)){c.frames.push(x);break}}})}c.getFrameIndexForId=function(l){for(var k=0;k<c.frames.length;k+=1){if(c.frames[k].id===l){return k}}return -1};function f(){g.documentElement.removeAttribute("viewBox");a();sozi.events.fire("sozi.document.ready")}e.addEventListener("load",f,false)});namespace(this,"sozi.framelist",function(u,k){var o=k.document;var c=5;var i;var p;var j=0;var h;var s;var b;var v;var w;var t;var e=300;var f="decelerate";var a="http://www.w3.org/2000/svg";function n(z){var x=z.relatedTarget,y=o.documentElement;while(x&&x!==i&&x!==y){x=x.parentNode}if(x!==i){u.hide();sozi.player.restart();z.stopPropagation()}}function r(y){var x=p.getCTM().f;if(x<=-k.innerHeight/2){x+=k.innerHeight/2}else{if(x<0){x=0}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function d(y){var x=p.getCTM().f;if(x+j>=k.innerHeight*3/2){x-=k.innerHeight/2}else{if(x+j>k.innerHeight+2*c){x=k.innerHeight-j-4*c}}p.setAttribute("transform","translate(0,"+x+")");y.stopPropagation()}function g(x){return function(y){sozi.player.previewFrame(x);y.stopPropagation()}}function l(x){x.stopPropagation()}function q(){i=o.createElementNS(a,"g");i.setAttribute("id","sozi-toc");o.documentElement.appendChild(i);p=o.createElementNS(a,"g");i.appendChild(p);var y=o.createElementNS(a,"rect");y.setAttribute("id","sozi-toc-background");y.setAttribute("x",c);y.setAttribute("y",c);y.setAttribute("rx",c);y.setAttribute("ry",c);y.addEventListener("click",l,false);y.addEventListener("mousedown",l,false);y.addEventListener("mouseout",n,false);p.appendChild(y);var A=0;sozi.document.frames.forEach(function(D,E){if(D.showInFrameList){var C=o.createElementNS(a,"text");C.appendChild(o.createTextNode(D.title));C.setAttribute("id","sozi-toc-"+D.id);p.appendChild(C);if(E===sozi.player.currentFrameIndex){C.setAttribute("class","sozi-toc-current")}var B=C.getBBox().width;j+=C.getBBox().height;if(B>A){A=B}C.setAttribute("x",2*c);C.setAttribute("y",j+c);C.addEventListener("click",g(E),false);C.addEventListener("mousedown",l,false)}});var x=o.createElementNS(a,"path");x.setAttribute("class","sozi-toc-arrow");x.setAttribute("d","M"+(A+3*c)+","+(5*c)+" l"+(4*c)+",0 l-"+(2*c)+",-"+(3*c)+" z");x.addEventListener("click",r,false);x.addEventListener("mousedown",l,false);i.appendChild(x);var z=o.createElementNS(a,"path");z.setAttribute("class","sozi-toc-arrow");z.setAttribute("d","M"+(A+3*c)+","+(7*c)+" l"+(4*c)+",0 l-"+(2*c)+","+(3*c)+" z");z.addEventListener("click",d,false);z.addEventListener("mousedown",l,false);i.appendChild(z);y.setAttribute("width",A+7*c);y.setAttribute("height",j+2*c);h=-A-9*c;s=0;w=v=h;i.setAttribute("transform","translate("+h+",0)");t=sozi.animation.Animator.instance().augment({onStep:function(B){var D=sozi.animation.profiles[f](B),C=1-D;w=v*D+b*C;i.setAttribute("transform","translate("+w+",0)")}})}function m(x){var y=Array.prototype.slice.call(o.getElementsByClassName("sozi-toc-current"));y.forEach(function(A){A.removeAttribute("class")});var z=sozi.document.frames[x];if(z.showInFrameList){o.getElementById("sozi-toc-"+z.id).setAttribute("class","sozi-toc-current")}}u.show=function(){o.documentElement.appendChild(i);b=w;v=s;t.start(e)};u.hide=function(){b=w;v=h;t.start(e)};u.isVisible=function(){return v===s};sozi.events.listen("sozi.player.ready",q);sozi.events.listen("sozi.player.cleanup",u.hide);sozi.events.listen("sozi.player.framechange",m)});namespace(this,"sozi.framenumber",function(a,d){var g=d.document;var e;var k,i;var f;var b="http://www.w3.org/2000/svg";function h(){var m=k.getBBox(),n=Math.max(m.width,m.height)*0.75,l=n*1.25;f.setAttribute("r",n);e.setAttribute("transform","translate("+l+","+l+")")}function c(){e=g.createElementNS(b,"g");k=g.createElementNS(b,"text");f=g.createElementNS(b,"circle");e.setAttribute("id","sozi-framenumber");f.setAttribute("cx",0);f.setAttribute("cy",0);e.appendChild(f);i=g.createTextNode(sozi.player.currentFrameIndex+1);k.setAttribute("text-anchor","middle");k.setAttribute("dominant-baseline","central");k.setAttribute("x",0);k.setAttribute("y",0);k.appendChild(i);e.appendChild(k);g.documentElement.appendChild(e);h()}function j(l){i.nodeValue=l+1}sozi.events.listen("sozi.player.ready",c);sozi.events.listen("sozi.player.framechange",j)});namespace(this,"sozi.links",function(c,e){var b="http://www.w3.org/2000/svg";var a="http://www.w3.org/1999/xlink";function f(g){return function(h){sozi.player.moveToFrame(g);h.preventDefault();h.stopPropagation()}}function d(){var h=e.document.getElementsByTagNameNS(b,"a");for(var j=0;j<h.length;j+=1){var g=h[j].getAttributeNS(a,"href");if(g&&g[0]==="#"){h[j].addEventListener("click",f(sozi.location.getFrameIndexForHash(g)),false)}}}sozi.events.listen("sozi.document.ready",d)});namespace(this,"sozi.location",function(a,d){var b=false;a.getFrameIndex=function(){return a.getFrameIndexForHash(d.location.hash)};a.getFrameIndexForHash=function(g){var h=g?g.slice(1):"1";var f;if(/^[0-9]+$/.test(h)){f=parseInt(h,10)-1}else{f=sozi.document.getFrameIndexForId(h)}if(f<0){return 0}else{if(f>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return f}}};function e(){var f=a.getFrameIndex();if(!b){sozi.player.moveToFrame(f)}b=false}function c(f){b=true;d.location.hash="#"+sozi.document.frames[f].id}d.addEventListener("hashchange",e,false);sozi.events.listen("sozi.player.framechange",c)});namespace(this,"sozi.player",function(d,g){var l;var c;var i;var e=500;var n=-10;var j="linear";var f=0;d.currentFrameIndex=0;var k=false;var m=false;function h(){if(sozi.document.frames[d.currentFrameIndex].timeoutEnable){m=true;var o=(d.currentFrameIndex+1)%sozi.document.frames.length;i=g.setTimeout(function(){d.moveToFrame(o)},sozi.document.frames[d.currentFrameIndex].timeoutMs)}}d.startFromIndex=function(o){k=true;m=false;f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);h()};d.restart=function(){d.startFromIndex(d.currentFrameIndex)};d.stop=function(){c.stop();if(m){g.clearTimeout(i);m=false}k=false;f=d.currentFrameIndex};function b(o,y,w){var z={ss:((o<0)?Math.max(y,w):Math.min(y,w))*(100-o)/100,ts:0.5,k:0};if(o!==0){var s=y-w;var r=y-z.ss;var q=w-z.ss;if(s!==0){var p=Math.sqrt(r*q);var x=(r-p)/s;var t=(r+p)/s;z.ts=(x>0&&x<=1)?x:t}z.k=r/z.ts/z.ts}return z}d.jumpToFrame=function(o){d.stop();sozi.events.fire("sozi.player.cleanup");f=o;d.currentFrameIndex=o;l.showFrame(sozi.document.frames[o]);sozi.events.fire("sozi.player.framechange",o)};d.getAnimationData=function(o,q,s,p,v,t){var r={};for(var w in o){r[w]={initialState:sozi.display.CameraState.instance(),finalState:sozi.display.CameraState.instance(),useTransitionPath:v,reverseTransitionPath:t};r[w].profile=p||q[w].transitionProfile;r[w].initialState.setAtState(o[w]);if(q.hasOwnProperty(w)){r[w].finalState.setAtState(q[w])}else{r[w].finalState.setAtState(o[w])}if(r[w].finalState.angle-r[w].initialState.angle>180){r[w].finalState.setRawAngle(r[w].finalState.angle-360)}else{if(r[w].finalState.angle-r[w].initialState.angle<-180){r[w].initialState.setRawAngle(r[w].initialState.angle-360)}}var u=s||q[w].transitionZoomPercent;if(u&&q.hasOwnProperty(w)){r[w].zoomWidth=b(u,o[w].width,q[w].width);r[w].zoomHeight=b(u,o[w].height,q[w].height)}}return r};d.previewFrame=function(o){d.currentFrameIndex=o;c.start(e,d.getAnimationData(l.cameras,sozi.document.frames[o].states,n,sozi.animation.profiles[j]),false,false);sozi.events.fire("sozi.player.framechange",o)};d.moveToFrame=function(r){if(m){g.clearTimeout(i);m=false}var q,t,s,p,o;if(r===(d.currentFrameIndex-1)%sozi.document.frames.length){q=sozi.document.frames[d.currentFrameIndex].transitionDurationMs;t=undefined;s=undefined;p=true;o=true}else{if(r===(d.currentFrameIndex+1)%sozi.document.frames.length){q=sozi.document.frames[r].transitionDurationMs;t=undefined;s=undefined;p=true;o=false}else{q=e;t=n;s=sozi.animation.profiles[j];p=false;o=false}}sozi.events.fire("sozi.player.cleanup");k=true;d.currentFrameIndex=r;c.start(q,d.getAnimationData(l.cameras,sozi.document.frames[r].states,t,s,p,o));sozi.events.fire("sozi.player.framechange",r)};d.jumpToFirst=function(){d.jumpToFrame(0)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var o=d.currentFrameIndex;if(!c.started||f<=d.currentFrameIndex){o-=1}if(o>=0){d.jumpToFrame(o)}};d.moveToPrevious=function(){for(var o=d.currentFrameIndex-1;o>=0;o-=1){var p=sozi.document.frames[o];if(!p.timeoutEnable||p.timeoutMs!==0){d.moveToFrame(o);break}}};d.jumpToNext=function(){var o=d.currentFrameIndex;if(!c.started||f>=d.currentFrameIndex){o+=1}if(o<sozi.document.frames.length){d.jumpToFrame(o)}};d.moveToNext=function(){if(d.currentFrameIndex<sozi.document.frames.length-1||sozi.document.frames[d.currentFrameIndex].timeoutEnable){d.moveToFrame((d.currentFrameIndex+1)%sozi.document.frames.length)}};d.jumpToLast=function(){d.jumpToFrame(sozi.document.frames.length-1)};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(d.currentFrameIndex)};d.showAll=function(){d.stop();sozi.events.fire("sozi.player.cleanup");c.start(e,d.getAnimationData(l.cameras,l.getDocumentState(),n,sozi.animation.profiles[j],false,false))};function a(){l=sozi.display.ViewPort.instance("player",sozi.document.idLayerList,true);d.startFromIndex(sozi.location.getFrameIndex());g.setTimeout(l.bind(l.update),1);sozi.events.fire("sozi.player.ready")}d.onAnimationStep=function(o,q){for(var s in q){var p=l.cameras[s];p.interpolate(q[s].initialState,q[s].finalState,q[s].profile(o),q[s].useTransitionPath,q[s].reverseTransitionPath);var r;if(q[s].zoomWidth&&q[s].zoomWidth.k!==0){r=o-q[s].zoomWidth.ts;p.width=q[s].zoomWidth.k*r*r+q[s].zoomWidth.ss}if(q[s].zoomHeight&&q[s].zoomHeight.k!==0){r=o-q[s].zoomHeight.ts;p.height=q[s].zoomHeight.k*r*r+q[s].zoomHeight.ss}p.setClipped(q[s].finalState.clipped)}l.update()};c=sozi.animation.Animator.instance().augment({onStep:function(o){d.onAnimationStep(o,this.data)},onDone:function(){for(var o in this.data){l.cameras[o].setAtState(this.data[o].finalState)}l.update();f=d.currentFrameIndex;if(k){h()}}});sozi.events.listen("sozi.display.ready",a)});</script> + <style + sozi:version="14.10-05142318" + id="sozi-style">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}#sozi-framenumber circle{stroke:#222;stroke-opacity:.1;stroke-width:4;fill:#222;fill-opacity:.9}#sozi-framenumber text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}</style> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="1" + sozi:title="Gcd implementation" + sozi:refid="rect10351" /> + <sozi:frame + sozi:refid="rect10841" + sozi:title="Gcd maven packaging" + sozi:sequence="2" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000.0" + sozi:transition-duration-ms="1000.0" + sozi:transition-zoom-percent="0.0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="3" + sozi:title="Using Math.getGcd()" + sozi:refid="rect11089" /> + <sozi:frame + sozi:refid="rect11381" + sozi:title="Fraction project" + sozi:sequence="4" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000.0" + sozi:transition-duration-ms="1000.0" + sozi:transition-zoom-percent="0.0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> + <sozi:frame + sozi:transition-path-hide="true" + sozi:transition-profile="linear" + sozi:transition-zoom-percent="0.0" + sozi:transition-duration-ms="1000.0" + sozi:timeout-ms="5000.0" + sozi:timeout-enable="false" + sozi:show-in-frame-list="true" + sozi:clip="true" + sozi:hide="true" + sozi:sequence="5" + sozi:title="Maven dependency definition" + sozi:refid="rect11637" /> + <sozi:frame + sozi:refid="rect11895" + sozi:title="Fraction depends on Gcd" + sozi:sequence="6" + sozi:hide="true" + sozi:clip="true" + sozi:show-in-frame-list="true" + sozi:timeout-enable="false" + sozi:timeout-ms="5000" + sozi:transition-duration-ms="1000" + sozi:transition-zoom-percent="0" + sozi:transition-profile="linear" + sozi:transition-path-hide="true" /> +</svg> diff --git a/Doc/Sd1/gettingStarted.xml b/Doc/Sd1/gettingStarted.xml index e668bc896ce75af2fa626ace9650cc4118f00aa7..77cd9e36aee37ea77d8e2ac23c3414d0770c7453 100644 --- a/Doc/Sd1/gettingStarted.xml +++ b/Doc/Sd1/gettingStarted.xml @@ -1346,14 +1346,14 @@ public class App { <section xml:id="sd1_sect_ideaMavenImport"> <title>Examination <xref linkend="glo_Maven"/> <xref - linkend="glo_Soft_IntellijIDEA"/> import.</title> + linkend="glo_Soft_IntellijIDEA"/> import and project upload.</title> <para>Lecture notes exercise solutions are being provided as <xref linkend="glo_Maven"/> projects below <link xlink:href="https://gitlab.mi.hdm-stuttgart.de/goik/GoikLectures/tree/master/P/Sd1">P/Sd1</link> by the <link xlink:href="https://gitlab.mi.hdm-stuttgart.de">MI Gitlab</link> repository. Comparing them to your own solution requires - an import to your <xref linkend="glo_IDE"/>.</para> + importing into your <xref linkend="glo_IDE"/>.</para> <para>Moreover the final examination and some exercises require importing <xref linkend="glo_Maven"/> skeleton projects to start from. @@ -1397,452 +1397,495 @@ public class App { </orderedlist> </figure> - <para>The subsequent screenshots assist in gaining the technical skills - to do so. They describe importing a skeleton project during the - examination but apply for exercises as well.</para> + <para>The subsequent screenshots describe these steps in detail.</para> - <figure xml:id="sd1_fig_ideaMavenImportDownloadZipArchive"> - <title>Download zipped <xref linkend="glo_Maven"/> project</title> + <section xml:id="sd1_sect_exam_skeletonImport"> + <title>Downloading and importing skeleton projects</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/downloadProjectArchive.png"/> - </imageobject> - </mediaobject> - </figure> - - <figure xml:id="sd1_fig_ideaMavenImportSelectProjectArchive"> - <title>Select project archive</title> - - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectArchive.png"/> - </imageobject> - </mediaobject> - </figure> - - <figure xml:id="sd1_fig_ideaMavenImportLocateArchive"> - <title>Locate archive and hit »Open With Archive Manager...«</title> - - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractProjectArchive.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportDownloadZipArchive"> + <title>Download zipped <xref linkend="glo_Maven"/> project</title> - <figure xml:id="sd1_fig_ideaMavenImportExtractZipArchive"> - <title>Extract <filename>Exam</filename> folder</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/downloadProjectArchive.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractArchive.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportSelectProjectArchive"> + <title>Select project archive</title> - <figure xml:id="sd1_fig_ideaMavenImportFolderToBeImported"> - <title>Folder to be imported in next step</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectArchive.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractProjectArchiveSuccess.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportLocateArchive"> + <title>Locate archive and hit »Open With Archive Manager...«</title> - <figure xml:id="sd1_fig_ideaMavenImportIdeaImportProject"> - <title>Start project import</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractProjectArchive.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/intellijImportProject.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportExtractZipArchive"> + <title>Extract <filename>Exam</filename> folder</title> - <figure xml:id="sd1_fig_ideaMavenImportSelectProjectFolder"> - <title>Select previously extracted Folder</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractArchive.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectArchiveOk.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportFolderToBeImported"> + <title>Folder to be imported in next step</title> - <figure xml:id="sd1_fig_ideaMavenImportModel"> - <title>Select <xref linkend="glo_Maven"/> project model</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/extractProjectArchiveSuccess.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobjectco> - <areaspec otherunits="imagemap" units="other"> - <area coords="-1,61,291,113" - linkends="sd1_fig_ideaMavenImportModel-1" - xml:id="_sd1_fig_ideaMavenImportModel_area-import"/> + <figure xml:id="sd1_fig_ideaMavenImportIdeaImportProject"> + <title>Start project import</title> - <area coords="18,157,135,192" - linkends="sd1_fig_ideaMavenImportModel-2" - xml:id="_sd1_fig_ideaMavenImportModel_areaMaven"/> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/intellijImportProject.png"/> + </imageobject> + </mediaobject> + </figure> - <area coords="485,678,603,750" - linkends="sd1_fig_ideaMavenImportModel-3" - xml:id="_sd1_fig_ideaMavenImportModel_areaNext"/> - </areaspec> + <figure xml:id="sd1_fig_ideaMavenImportSelectProjectFolder"> + <title>Select previously extracted Folder</title> + <mediaobject> <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectMavenModel.png.marked.svg"/> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectArchiveOk.png"/> </imageobject> - </imageobjectco> - </mediaobject> + </mediaobject> + </figure> - <calloutlist> - <callout arearefs="_sd1_fig_ideaMavenImportModel_area-import" - xml:id="sd1_fig_ideaMavenImportModel-1"> - <para>Change »Create« to »Import ...«</para> - </callout> - - <callout arearefs="_sd1_fig_ideaMavenImportModel_areaMaven" - xml:id="sd1_fig_ideaMavenImportModel-2"> - <para>Choose Maven model.</para> - </callout> - - <callout arearefs="_sd1_fig_ideaMavenImportModel_areaNext" - xml:id="sd1_fig_ideaMavenImportModel-3"> - <para>Hit next and accept the subsequent defaults.</para> - </callout> - </calloutlist> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportModel"> + <title>Select <xref linkend="glo_Maven"/> project model</title> - <figure xml:id="sd1_fig_ideaMavenImport"> - <title>Accept <quote>Enable Auto-import</quote></title> + <mediaobject> + <imageobjectco> + <areaspec otherunits="imagemap" units="other"> + <area coords="-1,61,291,113" + linkends="sd1_fig_ideaMavenImportModel-1" + xml:id="_sd1_fig_ideaMavenImportModel_area-import"/> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/enableMavenAutoImport.png"/> - </imageobject> - </mediaobject> - </figure> + <area coords="18,157,135,192" + linkends="sd1_fig_ideaMavenImportModel-2" + xml:id="_sd1_fig_ideaMavenImportModel_areaMaven"/> - <figure xml:id="sd1_fig_ideaMavenImportShowPackages"> - <title>Optional: Show packages</title> + <area coords="485,678,603,750" + linkends="sd1_fig_ideaMavenImportModel-3" + xml:id="_sd1_fig_ideaMavenImportModel_areaNext"/> + </areaspec> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectShowPackages.png"/> - </imageobject> - </mediaobject> - </figure> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/selectProjectMavenModel.png.marked.svg"/> + </imageobject> + </imageobjectco> + </mediaobject> - <figure xml:id="sd1_fig_ideaMavenImportExecCompleteTestClass"> - <title>Execute complete test class</title> + <calloutlist> + <callout arearefs="_sd1_fig_ideaMavenImportModel_area-import" + xml:id="sd1_fig_ideaMavenImportModel-1"> + <para>Change »Create« to »Import ...«</para> + </callout> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/executeIndividualTest.png"/> - </imageobject> - </mediaobject> - </figure> + <callout arearefs="_sd1_fig_ideaMavenImportModel_areaMaven" + xml:id="sd1_fig_ideaMavenImportModel-2"> + <para>Choose Maven model.</para> + </callout> - <figure xml:id="sd1_fig_ideaMavenImportExecTestclassResults"> - <title>Results yet negative</title> + <callout arearefs="_sd1_fig_ideaMavenImportModel_areaNext" + xml:id="sd1_fig_ideaMavenImportModel-3"> + <para>Hit next and accept the subsequent defaults.</para> + </callout> + </calloutlist> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/executeIndividualTestResult.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImport"> + <title>Accept <quote>Enable Auto-import</quote></title> - <figure xml:id="sd1_fig_ideaMavenImportBreakInMethod"> - <title>Set breakpoint in method.</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/enableMavenAutoImport.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugSetBreak.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportShowPackages"> + <title>Optional: Show packages</title> - <figure xml:id="sd1_fig_ideaMavenImportDebugTestMethod"> - <title>Debug individual test method</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectShowPackages.png"/> + </imageobject> + </mediaobject> + </figure> + </section> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugIndividualTest.png"/> - </imageobject> - </mediaobject> - </figure> + <section xml:id="sd1_sect_exam_runTestsDebug"> + <title>Run tests, hunt for errors</title> - <figure xml:id="sd1_fig_ideaMavenImportStepTrough"> - <title>Step through hunting for errors</title> + <figure xml:id="sd1_fig_ideaMavenImportExecCompleteTestClass"> + <title>Execute complete test class</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugIndividualTestStep.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/executeIndividualTest.png"/> + </imageobject> + </mediaobject> + </figure> - <figure xml:id="sd1_fig_ideaMavenImportShowPoints"> - <title>Show overall results</title> + <figure xml:id="sd1_fig_ideaMavenImportExecTestclassResults"> + <title>Results yet negative</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPoints.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/executeIndividualTestResult.png"/> + </imageobject> + </mediaobject> + </figure> - <figure xml:id="sd1_fig_ideaMavenImportRunShowReachedPoints"> - <title>Hit Run 'ShowReachedPoints'</title> + <figure xml:id="sd1_fig_ideaMavenImportBreakInMethod"> + <title>Set breakpoint in method.</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPoints2.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugSetBreak.png"/> + </imageobject> + </mediaobject> + </figure> - <figure xml:id="sd1_fig_ideaMavenImportResults"> - <title>Your results so far</title> + <figure xml:id="sd1_fig_ideaMavenImportDebugTestMethod"> + <title>Debug individual test method</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPointsResult.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugIndividualTest.png"/> + </imageobject> + </mediaobject> + </figure> - <figure xml:id="sd1_fig_projectIliasCompressToArchive"> - <title>Zip up your project into an archive</title> + <figure xml:id="sd1_fig_ideaMavenImportStepTrough"> + <title>Step through hunting for errors</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectCompress.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/debugIndividualTestStep.png"/> + </imageobject> + </mediaobject> + </figure> + </section> - <figure xml:id="sd1_fig_projectIliasChooseArchiveName"> - <title>Choose an archive name</title> + <section xml:id="sd1_sect_exam_showPoints"> + <title>Display my achievements</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportShowPoints"> + <title>Show overall results</title> - <figure xml:id="sd1_fig_projectIliasResultNewArchive"> - <title>Newly created archive</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPoints.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasSelect.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportRunShowReachedPoints"> + <title>Hit Run 'ShowReachedPoints'</title> - <figure xml:id="sd1_fig_projectIliasHitChooseFile"> - <title>Hit »Choose File« in <productname>ILIAS</productname></title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPoints2.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasChoose.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_ideaMavenImportResults"> + <title>Your results so far</title> - <figure xml:id="sd1_fig_projectIliasHitUpload"> - <title>Hit »Upload«</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/showReachedPointsResult.png"/> + </imageobject> + </mediaobject> + </figure> + </section> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasUpload.png"/> - </imageobject> - </mediaobject> - </figure> + <section xml:id="sd1_sect_exam_exportProject"> + <title>Export your project</title> - <figure xml:id="sd1_fig_projectIliasArchiveVisible"> - <title>Archive is visible ...</title> + <figure xml:id="sd1_fig_projectIliasCompressToArchive"> + <title>Zip up your project into an archive</title> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasResult.png"/> - </imageobject> - </mediaobject> - </figure> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectCompress.png"/> + </imageobject> + </mediaobject> + </figure> - <figure xml:id="sd1_fig_projectIliasNotYetSaved"> - <title>... but not yet saved!</title> + <figure xml:id="sd1_fig_projectIliasChooseArchiveName"> + <title>Choose an archive name</title> - <mediaobject> - <imageobjectco> - <areaspec otherunits="imagemap" units="other"> - <area coords="112,182,313,228" - linkends="sd1_fig_projectIliasNotYetSaved-1" - xml:id="sd1_fig_projectIliasNotYetSaved-1.2-co"/> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectCompressChooseName.png"/> + </imageobject> + </mediaobject> + </figure> + </section> - <area coords="1,34,57,102" - linkends="sd1_fig_projectIliasNotYetSaved-2" - xml:id="sd1_fig_projectIliasNotYetSaved-2.2-co"/> + <section xml:id="sd1_sect_exam_uploadProject"> + <title>Uploading your project.</title> - <area coords="512,67,626,118" - linkends="sd1_fig_projectIliasNotYetSaved-3" - xml:id="sd1_fig_projectIliasNotYetSaved-3-co"/> - </areaspec> + <figure xml:id="sd1_fig_projectIliasHitChooseFile"> + <title>Hit »Choose File« in <productname>ILIAS</productname></title> + <mediaobject> <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasNotYetAnswered.png.marked.svg"/> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasChoose.png"/> </imageobject> - </imageobjectco> - </mediaobject> + </mediaobject> + </figure> - <calloutlist> - <callout arearefs="sd1_fig_projectIliasNotYetSaved-1.2-co" - xml:id="sd1_fig_projectIliasNotYetSaved-1"> - <para>Question yet marked as »not answered«.</para> - </callout> - - <callout arearefs="sd1_fig_projectIliasNotYetSaved-2.2-co" - xml:id="sd1_fig_projectIliasNotYetSaved-2"> - <para>»Hollow« bullet point also indicating unanswered - question.</para> - </callout> - - <callout arearefs="sd1_fig_projectIliasNotYetSaved-3-co" - xml:id="sd1_fig_projectIliasNotYetSaved-3"> - <para>Hit »Next« to save your answer.</para> - </callout> - </calloutlist> - </figure> + <figure xml:id="sd1_fig_projectIliasResultNewArchive"> + <title>Select newly created archive</title> - <figure xml:id="sd1_fig_projectIlias"> - <title>Confirm saving / next exercise</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasSelect.png"/> + </imageobject> + </mediaobject> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasCompleteAnswer.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_projectIliasHitUpload"> + <title>Hit »Upload«</title> - <figure xml:id="sd1_fig_projectIliasAnswerSaved"> - <title>Answer saved!</title> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasUpload.png"/> + </imageobject> + </mediaobject> + </figure> - <informaltable border="0"> - <colgroup width="23%"/> + <figure xml:id="sd1_fig_projectIliasArchiveVisible"> + <title>Archive is visible ...</title> - <colgroup width="77%"/> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasResult.png"/> + </imageobject> + </mediaobject> + </figure> - <tr> - <td valign="top"><calloutlist> - <callout arearefs="sd1_fig_projectIliasAnswerSaved-1-co" - xml:id="sd1_fig_projectIliasAnswerSaved-1"> - <para>Marked as »Answered«.</para> - </callout> + <figure xml:id="sd1_fig_projectIliasNotYetSaved"> + <title>... but not yet saved!</title> - <callout arearefs="sd1_fig_projectIliasAnswerSaved-2-co" - xml:id="sd1_fig_projectIliasAnswerSaved-2"> - <para>Solid bullet point indicating presence of an - answer.</para> - </callout> - </calloutlist></td> + <mediaobject> + <imageobjectco> + <areaspec otherunits="imagemap" units="other"> + <area coords="112,182,313,228" + linkends="sd1_fig_projectIliasNotYetSaved-1" + xml:id="sd1_fig_projectIliasNotYetSaved-1.2-co"/> - <td valign="top"><mediaobject> - <imageobjectco> - <areaspec otherunits="imagemap" units="other"> - <area coords="114,386,241,440" - linkends="sd1_fig_projectIliasAnswerSaved-1" - xml:id="sd1_fig_projectIliasAnswerSaved-1-co"/> + <area coords="1,34,57,102" + linkends="sd1_fig_projectIliasNotYetSaved-2" + xml:id="sd1_fig_projectIliasNotYetSaved-2.2-co"/> - <area coords="-1,241,65,304" - linkends="sd1_fig_projectIliasAnswerSaved-2" - xml:id="sd1_fig_projectIliasAnswerSaved-2-co"/> - </areaspec> + <area coords="512,67,626,118" + linkends="sd1_fig_projectIliasNotYetSaved-3" + xml:id="sd1_fig_projectIliasNotYetSaved-3-co"/> + </areaspec> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinal.png.marked.svg"/> - </imageobject> - </imageobjectco> - </mediaobject></td> - </tr> - </informaltable> - </figure> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasNotYetAnswered.png.marked.svg"/> + </imageobject> + </imageobjectco> + </mediaobject> - <figure xml:id="sd1_fig_projectIliasFinishExam"> - <title>Finish your examination</title> + <calloutlist> + <callout arearefs="sd1_fig_projectIliasNotYetSaved-1.2-co" + xml:id="sd1_fig_projectIliasNotYetSaved-1"> + <para>Question yet marked as »not answered«.</para> + </callout> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExam.png"/> - </imageobject> - </mediaobject> - </figure> + <callout arearefs="sd1_fig_projectIliasNotYetSaved-2.2-co" + xml:id="sd1_fig_projectIliasNotYetSaved-2"> + <para>»Hollow« bullet point also indicating unanswered + question.</para> + </callout> - <figure xml:id="sd1_fig_projectIliasRecheck"> - <title>Check your answers again!</title> + <callout arearefs="sd1_fig_projectIliasNotYetSaved-3-co" + xml:id="sd1_fig_projectIliasNotYetSaved-3"> + <para>Hit »Next« to save your answer.</para> + </callout> + </calloutlist> + </figure> - <mediaobject> - <imageobjectco> - <areaspec otherunits="imagemap" units="other"> - <area coords="40,183,157,229" - linkends="sd1_fig_projectIliasRecheck-1" - xml:id="sd1_fig_projectIliasRecheck-1-co"/> + <figure xml:id="sd1_fig_projectIlias"> + <title>Confirm saving / next exercise</title> - <area coords="410,189,551,230" - linkends="sd1_fig_projectIliasRecheck-2" - xml:id="sd1_fig_projectIliasRecheck-2-co"/> - </areaspec> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasCompleteAnswer.png"/> + </imageobject> + </mediaobject> + </figure> + + <figure xml:id="sd1_fig_projectIliasAnswerSaved"> + <title>Answer saved!</title> + + <informaltable border="0"> + <colgroup width="23%"/> + + <colgroup width="77%"/> + + <tr> + <td valign="top"><calloutlist> + <callout arearefs="sd1_fig_projectIliasAnswerSaved-1-co" + xml:id="sd1_fig_projectIliasAnswerSaved-1"> + <para>Marked as »Answered«.</para> + </callout> + + <callout arearefs="sd1_fig_projectIliasAnswerSaved-2-co" + xml:id="sd1_fig_projectIliasAnswerSaved-2"> + <para>Solid bullet point indicating presence of an + answer.</para> + </callout> + </calloutlist></td> + + <td valign="top"><mediaobject> + <imageobjectco> + <areaspec otherunits="imagemap" units="other"> + <area coords="114,386,241,440" + linkends="sd1_fig_projectIliasAnswerSaved-1" + xml:id="sd1_fig_projectIliasAnswerSaved-1-co"/> + + <area coords="-1,241,65,304" + linkends="sd1_fig_projectIliasAnswerSaved-2" + xml:id="sd1_fig_projectIliasAnswerSaved-2-co"/> + </areaspec> + + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinal.png.marked.svg"/> + </imageobject> + </imageobjectco> + </mediaobject></td> + </tr> + </informaltable> + </figure> + </section> + + <section xml:id="sd1_exam_sect_verifyInputs"> + <title>Finish an examination</title> + <figure xml:id="sd1_fig_projectIliasFinishExam"> + <title>Finish your examination</title> + + <mediaobject> <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamCheck.png.marked.svg"/> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExam.png"/> </imageobject> - </imageobjectco> - </mediaobject> + </mediaobject> + </figure> - <calloutlist> - <callout arearefs="sd1_fig_projectIliasRecheck-1-co" - xml:id="sd1_fig_projectIliasRecheck-1"> - <itemizedlist> - <listitem> - <para>Is this the correct archive?</para> - </listitem> + <figure xml:id="sd1_fig_projectIliasProceedFinishPrepare"> + <title>Prepare finishing</title> - <listitem> - <para>Does it contain the correct files?</para> - </listitem> - </itemizedlist> - </callout> - - <callout arearefs="sd1_fig_projectIliasRecheck-2-co" - xml:id="sd1_fig_projectIliasRecheck-2"> - <para>Is the upload timestamp consistent with your recent - activities?</para> - </callout> - </calloutlist> - </figure> + <para>When finishing an examination you are strongly advised to + verify your inputs e.g.:</para> - <figure xml:id="sd1_fig_projectIliasProceedFinish"> - <title>Proceed finishing ...</title> + <itemizedlist> + <listitem> + <para>File uploads.</para> + </listitem> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamContinue.png"/> - </imageobject> - </mediaobject> - </figure> + <listitem> + <para>Essay question inputs.</para> + </listitem> - <figure xml:id="sd1_fig_projectIliasFinalFinish"> - <title>Finish the test</title> + <listitem> + <para>Selections in single or multiple choice tests.</para> + </listitem> + </itemizedlist> + </figure> - <mediaobject> - <imageobject> - <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamCommit.png"/> - </imageobject> - </mediaobject> - </figure> + <figure xml:id="sd1_fig_projectIliasRecheck"> + <title>Check your answers again!</title> + + <mediaobject> + <imageobjectco> + <areaspec otherunits="imagemap" units="other"> + <area coords="40,183,157,229" + linkends="sd1_fig_projectIliasRecheck-1" + xml:id="sd1_fig_projectIliasRecheck-1-co"/> + + <area coords="410,189,551,230" + linkends="sd1_fig_projectIliasRecheck-2" + xml:id="sd1_fig_projectIliasRecheck-2-co"/> + </areaspec> + + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamCheck.png.marked.svg"/> + </imageobject> + </imageobjectco> + </mediaobject> + + <calloutlist> + <callout arearefs="sd1_fig_projectIliasRecheck-1-co" + xml:id="sd1_fig_projectIliasRecheck-1"> + <itemizedlist> + <listitem> + <para>Is this the correct archive?</para> + </listitem> + + <listitem> + <para>Does it contain the correct files?</para> + </listitem> + </itemizedlist> + </callout> + + <callout arearefs="sd1_fig_projectIliasRecheck-2-co" + xml:id="sd1_fig_projectIliasRecheck-2"> + <para>Is the upload timestamp consistent with your recent + activities?</para> + </callout> + </calloutlist> + </figure> + + <figure xml:id="sd1_fig_projectIliasProceedFinish"> + <title>Proceed finishing ...</title> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamContinue.png"/> + </imageobject> + </mediaobject> + </figure> + + <figure xml:id="sd1_fig_projectIliasFinalFinish"> + <title>Finish the test</title> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/GettingStarted/IdeaMavenImport/projectIliasFinishExamCommit.png"/> + </imageobject> + </mediaobject> + </figure> + </section> </section> <section xml:id="sd1SectMoreEclipseFeatures"> diff --git a/Doc/Sd1/languageFundamentals.xml b/Doc/Sd1/languageFundamentals.xml index 4ee5c3ab5414d7a0195469721a1dbf1e6b7c351c..17f555452a21257a836690be0c0911ce10da932a 100644 --- a/Doc/Sd1/languageFundamentals.xml +++ b/Doc/Sd1/languageFundamentals.xml @@ -195,19 +195,26 @@ <para>Discuss this argument by estimating the number of distinct patterns.</para> + + <para>Hint: Consider a keycard's (likely?) grid of possible punch + positions:</para> + + <mediaobject> + <imageobject> + <imagedata fileref="Ref/LangFundament/keycardHint.svg"/> + </imageobject> + </mediaobject> </question> <answer> - <para>No need to be worried: Judging the image a card probably - offers 32 grid positions:</para> + <para>No need to be worried: The 32 possible punch positions may + be arranged in a linear fashion:</para> - <programlisting language="none">X X X X X - X X X X -X X X X X - X X X X -X X X X X - X X X X -X X X X X</programlisting> + <mediaobject> + <imageobject> + <imagedata fileref="Ref/LangFundament/keycardFlatten.svg"/> + </imageobject> + </mediaobject> <para>Since each position may either contain a hole or be solid we have <inlineequation> @@ -224,7 +231,9 @@ X X X X X</programlisting> <m:mi>4294967296</m:mi> </m:mrow> </m:math> - </inlineequation> distinct possibilities.</para> + </inlineequation> distinct possibilities. Thus a lot of keycards + may get lost before the hotel manager has reason to start + worrying.</para> </answer> </qandaentry> </qandadiv> @@ -1025,16 +1034,30 @@ double d = i;</programlisting> <programlisting language="java">double d = 2.4; int i = d; // Error: Incompatible types</programlisting> - <para>Why is this? Make an educated guess.</para> + <para>Questions to answer:</para> + + <orderedlist> + <listitem> + <para>Explain on syntax level why is <code language="java">d = + i</code> is allowed but <code language="java">i = d</code> + causes an error? Hint: Read about widening and narrowing + conventions.</para> + </listitem> + + <listitem> + <para>Whats the ratio behind this design decision? Hint: What + would happen for larger <code>double</code> values?</para> + </listitem> + </orderedlist> </question> <answer> - <para>The first snippet compiles by using the <emphasis + <para>The first code snippet uses the <emphasis role="bold">widening conversion</emphasis>: When assigning <code language="java">d = i</code> the <xref linkend="glo_Java"/> - compiler implicitly converts the <code language="java" + compiler implicitly converts a four byte <code language="java" xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.1-100-C">int</code> - into a <code language="java" + into an eight byte <code language="java" xlink:href="https://docs.oracle.com/javase/specs/jls/se7/html/jls-4.html#jls-4.2.3-100">double</code> value.</para> @@ -1066,8 +1089,44 @@ int i = d; // Error: Incompatible types</programlisting> int assignments unless using a so called cast (explicit type conversion):</para> - <programlisting language="java">double d = 2.4; -int i = (int) d; // Explicit cast double to int</programlisting> + <para>Caveats using explicit casts:</para> + + <orderedlist> + <listitem> + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">double d = 2.6; +int i = (int) d; // Explicit cast double to int +System.out.println("Result: " + i);</programlisting></td> + + <td valign="top"><screen>Result: 2</screen></td> + </tr> + </informaltable> + + <para>Notice the result of 2 rather than 3 as you might have + expected assuming some common rounding convention. This does + not happen unless you explicitly use methods like e.g. + <methodname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Math.html#round(double)">Math.round()</methodname>.</para> + </listitem> + + <listitem> + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">double d = 3_000_000_000.; +int i = (int) d; // Explicit cast double to int +System.out.println("Result: " + i);</programlisting></td> + + <td valign="top"><screen>Result: 2147483647</screen></td> + </tr> + </informaltable> + + <para>This truncation of 3 billion to 2147483647 is due to the + latter being the largest possible <code + language="java">int</code> value to je represented in <xref + linkend="glo_Java"/>.</para> + </listitem> + </orderedlist> </answer> </qandaentry> </qandadiv> @@ -1280,8 +1339,8 @@ int i = (int) d; // Explicit cast double to int</programlisting> <qandadiv> <qandaentry> <question> - <para>Suppose <xref linkend="glo_Java"/> was offering a signed - integer type <code>tinyint</code> using 3-bit 2-complement + <para>Suppose <xref linkend="glo_Java"/> was offering a hypothetic + signed integer type <code>tinyint</code> using 3-bit 2-complement representation.</para> <orderedlist> @@ -1310,6 +1369,16 @@ int i = (int) d; // Explicit cast double to int</programlisting> <para>3 + 1</para> </listitem> </itemizedlist> + + <para>Hint by example: -4 + 3 is:</para> + + <screen> 1 100 + 2 +011 +-- ---- + <emphasis role="red">?</emphasis> 111 </screen> + + <para>What is 3-bit two complement <code + language="java">111</code> in decimal?</para> </listitem> </orderedlist> </question> @@ -1317,14 +1386,117 @@ int i = (int) d; // Explicit cast double to int</programlisting> <answer> <orderedlist> <listitem> - <programlisting language="none"> 3 011 - 2 010 - 1 001 - 0 000 --1 111 --2 110 --3 101 --4 100</programlisting> + <para>Given n=3 in three bit two complement notation as usual + possible values range from <inlineequation> + <m:math display="inline"> + <m:mrow> + <m:mo>-</m:mo> + + <m:msup> + <m:mi>2</m:mi> + + <m:mrow> + <m:mo>(</m:mo> + + <m:mrow> + <m:mi>3</m:mi> + + <m:mo>-</m:mo> + + <m:mi>1</m:mi> + </m:mrow> + + <m:mo>)</m:mo> + </m:mrow> + </m:msup> + </m:mrow> + </m:math> + </inlineequation> to <inlineequation> + <m:math display="inline"> + <m:mrow> + <m:msup> + <m:mi>2</m:mi> + + <m:mrow> + <m:mo>(</m:mo> + + <m:mrow> + <m:mi>3</m:mi> + + <m:mo>-</m:mo> + + <m:mi>1</m:mi> + </m:mrow> + + <m:mo>)</m:mo> + </m:mrow> + </m:msup> + + <m:mo>-</m:mo> + + <m:mi>1</m:mi> + </m:mrow> + </m:math> + </inlineequation>:</para> + + <informaltable border="1"> + <tr> + <th>Decimal</th> + + <th>Two-complement</th> + </tr> + + <tr> + <td valign="top">3</td> + + <td valign="top"><code language="java">011</code></td> + </tr> + + <tr> + <td valign="top">2</td> + + <td valign="top"><code language="java">010</code></td> + </tr> + + <tr> + <td valign="top">1</td> + + <td valign="top"><code language="java">001</code></td> + </tr> + + <tr> + <td valign="top">0</td> + + <td valign="top"><code language="java">000</code></td> + </tr> + + <tr> + <td valign="top">-1</td> + + <td valign="top"><code language="java">111</code></td> + </tr> + + <tr> + <td valign="top">-2</td> + + <td valign="top"><code language="java">110</code></td> + </tr> + + <tr> + <td valign="top">-3</td> + + <td valign="top"><code language="java">101</code></td> + </tr> + + <tr> + <td valign="top">-4</td> + + <td valign="top"><code language="java">100</code></td> + </tr> + </informaltable> + + <para>Thus the example hint value 111 is indeed decimal -1 + equalling -4 + 3 as expected.</para> </listitem> <listitem> @@ -1333,10 +1505,10 @@ int i = (int) d; // Explicit cast double to int</programlisting> <glossterm>1 + 2</glossterm> <glossdef> - <para><screen> 1 001 + <screen> 1 001 2 +010 -- ---- - 3 011</screen></para> + 3 011</screen> </glossdef> </glossentry> @@ -1358,11 +1530,11 @@ int i = (int) d; // Explicit cast double to int</programlisting> <screen>-1 111 -2 +110 -- ------ --3 <emphasis role="red">1_</emphasis>101 (See comment below)</screen> +-3 <emphasis role="red">1</emphasis>101 (See comment below)</screen> <para>In 3-bit two complement representation the - leftmost bit will be discarded. Thus the actual result - is <code language="java">101</code> as being + leftmost bit at position 4 will be discarded. The actual + result is thus <code language="java">101</code> as expected.</para> </glossdef> </glossentry> @@ -1374,11 +1546,11 @@ int i = (int) d; // Explicit cast double to int</programlisting> <screen> 3 011 1 +001 -- ---- --4 100 Surprise! See comment below</screen> +-4 100 <emphasis role="red">Surprise!</emphasis> See comment below</screen> <para>This is actually an overflow: In 3-bit two - complement representation the highest possible value is - 3 being equal to <inlineequation> + complement representation the highest representable + decimal value is 3 being equal to <inlineequation> <m:math display="inline"> <m:mrow> <m:msup> @@ -1442,7 +1614,7 @@ int i = (int) d; // Explicit cast double to int</programlisting> linkend="glo_byte">bytes</link>. <inlineequation> <m:math display="inline"> <m:msub> - <m:mi>00000000000000000000000000000101</m:mi> + <m:mi>00000000_00000000_00000000_00000101</m:mi> <m:mi>2</m:mi> </m:msub> diff --git a/Doc/Sda1/prerequisites.xml b/Doc/Sda1/prerequisites.xml index afc8f8e31cd7736fdd6692365af19aa309f0ead4..8e4ef29d504ba15c8b4c051f30ee38740bfbfc62 100644 --- a/Doc/Sda1/prerequisites.xml +++ b/Doc/Sda1/prerequisites.xml @@ -11,7 +11,7 @@ xmlns:db="http://docbook.org/ns/docbook"> <title>Prerequisites</title> - <figure xml:id="sd1_fig_examCheatSheet"> + <figure xml:id="sda1_fig_examCheatSheet"> <title>Personal examination cheat sheets</title> <itemizedlist> @@ -22,7 +22,7 @@ <listitem> <para>Upload to <link - xlink:href="https://cloud.mi.hdm-stuttgart.de/index.php/s/YJcTqddMLjmo6qM">MI + xlink:href="https://cloud.mi.hdm-stuttgart.de/index.php/s/rHXmp3zymrDoaBR">MI Sda1 cloud folder</link>.</para> </listitem> diff --git a/Klausuren/Sd1/2017Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Ersatzteil.java b/Klausuren/Sd1/2017Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Ersatzteil.java index eee9f4858771b1124b17b02ca01c5620af1d5c92..8fb5f5e6513cb9fffb2426aca4233c29a60dd9b8 100644 --- a/Klausuren/Sd1/2017Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Ersatzteil.java +++ b/Klausuren/Sd1/2017Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Ersatzteil.java @@ -20,8 +20,6 @@ import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.greaterThan; - - /** * Teste Ersatzteile. * @@ -201,8 +199,8 @@ public class Test_Ersatzteil extends ExaminationTestDefaults { @Test @Marking(points = 2) public void test_400_konstruktorReifen() { - Assert.assertThat(rHelper.reifenKlasse.msg, is(nullValue())); - Assert.assertThat(rHelper.reifen_constructor_int_int.getRecursiveMsg(), is(nullValue())); + Assert.assertThat(rHelper.reifenKlasse.msg, is(nullValue())); + Assert.assertThat(rHelper.reifen_constructor_int_int.getRecursiveMsg(), is(nullValue())); Object reifen; try { @@ -216,9 +214,9 @@ public class Test_Ersatzteil extends ExaminationTestDefaults { try { Assert.assertThat( rHelper.reifen_toString.method.invoke(reifen), - equalTo("Reifen, Teilenummer:1132, Maximalgeschwindigkeit:160 Kmh")); + equalTo("Reifen, Teilenummer:1132, Maximalgeschwindigkeit:160 Kmh")); } catch (final IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { Assert.fail("Konnte 'toString()' für 'new Reifen(1132, 160)' nicht aufrufen."); } } -} \ No newline at end of file +} diff --git a/Klausuren/Sd1/2017winter/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java b/Klausuren/Sd1/2017winter/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java index eca4abb3e9f1bc4b6f2c011e7735a19e25f57a59..7800007165f8b76592775c7a9eaf9959b635af52 100644 --- a/Klausuren/Sd1/2017winter/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java +++ b/Klausuren/Sd1/2017winter/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java @@ -25,20 +25,10 @@ public class MaexleWurf { * <th>Mäxle</th> * </tr> * <tr> - * <td>(1|3)</td> - * <td>(1|4)</td> - * <td>(1|5)</td> - * <td>(1|6)</td> - * <td>(2|3)</td> - * <td>(2|4)</td> - * <td>(2|5)</td> - * <td>(2|6)</td> - * <td>(3|4)</td> - * <td>(3|5)</td> - * <td>(3|6)</td> - * <td>(4|5)</td> - * <td>(4|6)</td> - * <td>(5|6)</td> + * <td>(3|1)</td><td>(3|2)</td> + * <td>(4|1)</td><td>(4|2)</td><td>(4|3)</td> + * <td>(5|1)</td><td>(5|2)</td><td>(5|3)</td><td>(5|4)</td> + * <td>(6|1)</td><td>(6|2)</td><td>(6|3)</td><td>(6|4)</td><td>(6|5)</td> * * <td>(1|1)</td> * <td>(2|2)</td> diff --git a/Klausuren/Sd1/2017winter/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java b/Klausuren/Sd1/2017winter/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java index 61cef631d64fc9d9a781ca4a7f9109f769b9adc2..9a2ba0b287926c50c98cfdee665fa9fa056abc89 100644 --- a/Klausuren/Sd1/2017winter/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java +++ b/Klausuren/Sd1/2017winter/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/MaexleWurf.java @@ -29,20 +29,10 @@ public class MaexleWurf { * <th>Mäxle</th> * </tr> * <tr> - * <td>(1|3)</td> - * <td>(1|4)</td> - * <td>(1|5)</td> - * <td>(1|6)</td> - * <td>(2|3)</td> - * <td>(2|4)</td> - * <td>(2|5)</td> - * <td>(2|6)</td> - * <td>(3|4)</td> - * <td>(3|5)</td> - * <td>(3|6)</td> - * <td>(4|5)</td> - * <td>(4|6)</td> - * <td>(5|6)</td> + * <td>(3|1)</td><td>(3|2)</td> + * <td>(4|1)</td><td>(4|2)</td><td>(4|3)</td> + * <td>(5|1)</td><td>(5|2)</td><td>(5|3)</td><td>(5|4)</td> + * <td>(6|1)</td><td>(6|2)</td><td>(6|3)</td><td>(6|4)</td><td>(6|5)</td> * * <td>(1|1)</td> * <td>(2|2)</td> @@ -104,4 +94,4 @@ public class MaexleWurf { public String toString() { return "(" + obereAugenzahl + "|" + untereAugenzahl +")"; } -} \ No newline at end of file +} diff --git a/Klausuren/Sd1/2018summer/Exam/.gitignore b/Klausuren/Sd1/2018summer/Exam/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a2fa20469808363ab656f8206d63c6b2e92a83b8 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/.gitignore @@ -0,0 +1,5 @@ +/.classpath +/.project +/.settings +/.idea +/*.iml diff --git a/Klausuren/Sd1/2018summer/Exam/pom.xml b/Klausuren/Sd1/2018summer/Exam/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..121ca07aad1d8b8fb7ed8b2d5cd408816b137c1f --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/pom.xml @@ -0,0 +1,99 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm-stuttgart.mi.sd1</groupId> + <artifactId>sd1_2018summer_exam</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>sd1_2018summer_exam</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <repositories> + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5.1</version> + <configuration> + <source>1.9</source> + <target>1.9</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.1</version> + <configuration> + <links> + <link>https://docs.oracle.com/javase/10/docs/api</link> + </links> + <additionalJOptions> + <additionalJOption>-html5</additionalJOption> + </additionalJOptions> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sd1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/assembly/assembly.xml b/Klausuren/Sd1/2018summer/Exam/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..9b503d8281d747828593dc9c7e106fff6c5ea118 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java @@ -0,0 +1,49 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +import java.util.Arrays; + +/** + * Hilfsmethoden für Arrays. + */ +public class ArrayHelper { + + /** + * <p>Enthält ein Array ganzzahliger Werte mindestens einen mehrfach auftretenden Wert? Beispiele:</p> + * + * <ul> + * <li>In <code>{1, -5, 3, 1, 17, 6, 1}</code> ist der Wert 1 dreifach enthalten.</li> + * <li><code>{-5, 5, 4, 9}</code> enthält keinen mehrfach auftretenden Wert.</li> + * </ul> + * + * <p>Praktische Verwendung:</p> + * <pre>final int[] werte = {2, 4, 3, 0, 1, 2}; + * final boolean result = ArrayHelper.enthaeltDuplikate(werte);</pre> + * + * <p>Wegen des doppelten Auftretens des Werts »2« hat <code>result</code> den Wert <code>true</code>.</p> + * + * @param werte null oder ein Array beliebiger Ganzzahlen + * @return <code>true</code>, falls mindestens ein Wert doppelt vorkommt, ansonsten <code>false</code>. + */ + static public boolean enthaeltDuplikate(final int[] werte) { + return false; // TODO: Implementiere mich! + } + + /** + * <p>Analog zu {@link #enthaeltDuplikate(int[])} in Bezug auf Wertgleichheit von Objekten. </p> + * + * <p>Praktische Verwendung:</p> + * + * <pre>final String[] werte = {"One", null, "true", null}; + * final boolean result = ArrayHelper.enthaeltDuplikate(werte);</pre> + * + * <p>Da es keinen doppelt auftretenden String gibt und <code>null</code> Werte ignoriert werden, erhält + * <code>result</code> den Wert <code>false</code>.</p> + * + * @param werte <code>null</code> oder ein Array aus Object Instanzen und/oder <code>null</code> Werten. + * @return <code>true</code>, falls mindestens ein String doppelt vorkommt, ansonsten <code>false</code>, + * wobei enthaltene <code>null</code> Werte in Bezug auf Duplikate ignoriert werden. + */ + static public boolean enthaeltDuplikate(final Object[] werte) { + return false; // TODO: Implementiere mich! + } +} diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..458b45de9c08d76e3dc3fe43bcb8e0ef81f2cb8d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java @@ -0,0 +1,46 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + + +/** + * Spezielle Berechnungsmethoden. + */ +public class MathHelper { + + /** + * <p>Die Summe aller ungeraden Werte zweier Argumente. Gerade Werte werden + * bei der Summenbildung ignoriert. Beispiele:</p> + * + * <ul> + * <li>summeUngeraderWerte(3, 4) ergibt 3, weil 4 als gerader Wert ignoriert wird.</li> + * <li>summeUngeraderWerte(1, 5) ergibt 1 + 5 == 6, da beide Werte ungerade sind.</li> + * <li>summeUngeraderWerte(-4, 10) ergibt 0, weil beide Werte gerade sind und somit ignoriert werden.</li> + * + * </ul> + * + * @param a Erster Wert. + * @param b Zweiter Wert + * @return Die Summe aller ungeraden Werte beider Argumente. + */ + static public int summeUngeraderWerte(final int a, final int b) { + /* Tip: Der »%« Operator ist Ihr Freund! */ + return 12345; // TODO: Implementiere mich! + } + /** + * <p>Die harmonische Reihe H(n) zu einer natürlichen Zahl 0 < n ist definiert als:</p> + * + * <p>H(n) = 1/1 + 1/2 + 1/3 + ... + 1/n</p> + * + * <p>Also beispielsweise:</p> + * <ul> + * <li>H(2) = 1 + 1/2 = 1 + 0.5 = 1.5</li> + * <li>H(3) = 1 + 1./2 + 1./3 = 11./6 = 1.8333333...</li> + * </ul> + * + * @param n Anzahl der Terme der harmonischen Reihe, mindestens 1. + * @return Der Wert H(n). + */ + static public double harmonisch(final int n) { + /* Tip: Beachten Sie mögliche Probleme bei der Division zweier int Werte. */ + return 12345; // TODO: Implementiere mich! + } +} diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..8d92a4c1aa67c6e7fa2660cdebec9591a98e8620 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java @@ -0,0 +1,53 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +/** + * Hilfsmethode für String Operationen. + */ +public class StringHelper { + + /** + * <p>Berechne den Stundenlohn gemäß den nachfolgenden Regeln in der angegebenen Reihenfolge:</p> + * + * <ol> + * <li>Bei falscher Wochentagsangabe (z.B. "Fr." statt "Freitag" oder null wird der Wert -1 zur + * Fehlererkennung zurückgeliefert.</li> + * <li>An einem Feiertag gilt unabhängig vom Wochentag ein Grundlohn von 25.-€.</li> + * <li>An einem Wochentag ("Montag" bis "Freitag") wird ein Grundlohn von 15.-€ gezahlt.</li> + * <li>Am Wochenende ("Samstag"/"Sonntag") werden 20.-€ Grundlohn gezahlt.</li> + * <li>An Feiertagen werden in einer Nachtschicht 10€ zusätzlich zum Grundlohn gezahlt.</li> + * <li>An nicht-Feiertagen verdoppelt sich der Grundlohn einer Nachtschicht.</li> + * </ol> + * + * @param wochentag Genau ein Wert aus {"Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", + * "Samstag", "Sonntag"} + * @param nachtschicht true, falls Nachtschicht, sonst false. + * @param feiertag true, falls Feiertag, sonst false. + * @return -1, falls der angegebene Wochentag null oder ungültig ist. Ansonsten der Stundenlohn gemäß Beschreibung. + */ + static public int berechneStundenlohn(final String wochentag, final boolean nachtschicht, boolean feiertag) { + return 123; // TODO: Implementiere mich! + } + + /** + * <p>Hat eine Zeichenkette mindestens eine vorgegebene Länge? Beispiele:</p> + * + * <ul> + * <li>"Kurt" hat mindestens die Länge 2.</li> + * <li>"Eva" hat nicht die Mindestlänge 4.</li> + * </ul> + * + * <p>Praktische Verwendung:</p> + * <pre>boolean result = StringHelper.hatMindestlaenge("Eva", 4);</pre> + * + * <p>Die Zeichenkette "Eva" hat lediglich die Länge 3, daher erhält die Variable + * <code>result</code> den Wert <code>false</code>.</p> + * + * @param s Eine Zeichenkette oder <code>null</code>. + * @param mindestlaenge Eine geforderte, nicht-negative, Mindestlänge. + * @return true, falls die Zeichenkette mindestens die vorgegebene Länge aufweist. Der Wert <code>null</code> + * wird als leere Zeichenkette ("") behandelt. + */ + static public boolean hatMindestlaenge(final String s, final int mindestlaenge) { + return false; // TODO: Implementiere mich! + } +} diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java new file mode 100644 index 0000000000000000000000000000000000000000..5a1684a2d34a808a1bd4b5994d276ef8efa2a02d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java @@ -0,0 +1,8 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe2; + +/** + * Darstellung von Verkaufsartikeln + */ +public class Artikel { + // TODO: Implementiere mich gemäß Aufgabenbeschreibung! +} diff --git a/Klausuren/Sd1/2018summer/Exam/src/main/resources/log4j2.xml b/Klausuren/Sd1/2018summer/Exam/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..130f87a144c4eb0107a846e580c8fa7f5e819fc1 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/main/resources/log4j2.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="de.hdm_stuttgart.mi.sd1.App" level="debug"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="info"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..354714e4dbbeea7f0406c0de609e987699fd6ca1 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sd1.test; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_ArrayHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_MathHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_StringHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe2.Test_Artikel; + +public class ShowReachedPoints { + + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1" + , Test_StringHelper.class + , Test_MathHelper.class + , Test_ArrayHelper.class + ); + + RunTests.exec("Aufgabe 2", Test_Artikel.class); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..c8517d6392ed98bb9097e6ce5d7757f199bf186f --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java @@ -0,0 +1,58 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.ArrayHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_ArrayHelper extends ExaminationTestDefaults { + + // Teste int[] Parameter + @Test public void test_380_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((int[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 1})); + } + @Test public void test_400_testKeinDuplikat_0() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{0})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 1})); + } + @Test @Marking(points = 3) public void test_410_testKeinDuplikat_1() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{1})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 4, 1})); + } + @Test @Marking(points = 2) public void test_420_testKeinDuplikat_2() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{-1, 2})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 4, 4})); + } + + @Test @Marking(points = 2) public void test_430_testKeinDuplikat_6() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{-1, 2, 5, 9, -30, 0})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{2, 4, 3, 0, 1, 2})); + } + @Test @Marking(points = 2) public void test_440_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((int[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{0, 0})); + } + + // Teste Object[] parameter + @Test @Marking(points = 2) public void test_500_string_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((String[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new String[]{ + new String("ab"), "ab"})); + } + + @Test @Marking(points = 2) public void test_520_string_testNullEnthalten() { + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new String[]{ + new String("ab"), null, "ab"})); + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new String[]{null, null, null})); + } + + @Test @Marking(points = 2) public void test_530_string_testHeterogen() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new Object[]{"test", new StringBuffer("test")})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new Object[]{new String("test"), new String("test")})); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..ff17c91208f6e67b9c42bf56324b9d1e0e71f72d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java @@ -0,0 +1,50 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.MathHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_MathHelper extends ExaminationTestDefaults { + /** + * Zwei gerade Werte. + */ + @Test @Marking(points = 4) public void test_100_nullUngeradeWerte() { + Assert.assertEquals(0, MathHelper.summeUngeraderWerte(224, -418)); + Assert.assertEquals(0, MathHelper.summeUngeraderWerte(-418, 224)); + } + /** + * Gerade und ungerade gemischt. + */ + @Test @Marking(points = 4) public void test_110_einUngeraderWert() { + Assert.assertEquals(-419, MathHelper.summeUngeraderWerte(224, -419)); + Assert.assertEquals(-3, MathHelper.summeUngeraderWerte(-3, 224)); + } + /** + * Zwei ungerade Werte. + */ + @Test @Marking(points = 4) public void test_120_zweiUngeradeWerte() { + Assert.assertEquals(-14, MathHelper.summeUngeraderWerte(-17, 3)); + Assert.assertEquals(-4, MathHelper.summeUngeraderWerte(3, -7)); + } + + @Test @Marking(points = 3) public void test_200_testHarmonisch() { + Assert.assertEquals(1., MathHelper.harmonisch(1), 1.E-14); + } + @Test @Marking(points = 3) public void test_210_testHarmonisch() { + Assert.assertEquals(1.5, MathHelper.harmonisch(2), 1.E-14); + Assert.assertEquals(1.8333333333333333, MathHelper.harmonisch(3), 1.E-14); + + Assert.assertEquals(2.9289682539682538, MathHelper.harmonisch(10), 1.E-14); + Assert.assertEquals(3.597739657143682, MathHelper.harmonisch(20), 1.E-14); + Assert.assertEquals(4.499205338329425, MathHelper.harmonisch(50), 1.E-14); + Assert.assertEquals(10.480728217229327, MathHelper.harmonisch(20000),1.E-14); + } + @Test public void test_220_testHarmonisch() { + Assert.assertEquals(10.480728217229327, MathHelper.harmonisch(20000),1.E-14); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..82e0c493e9394fced4c745b49c5ef51838316234 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java @@ -0,0 +1,82 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.StringHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_StringHelper extends ExaminationTestDefaults { + + @Test @Marking(points = 4) public void test_050_testMindestlaengeNull() { + try { + Assert.assertTrue(StringHelper.hatMindestlaenge(null, 0)); + for (int i = 1; i <= 100; i++) { + Assert.assertFalse(StringHelper.hatMindestlaenge(null, i)); + } + } catch (final NullPointerException e) { + Assert.fail("Ein null String darf nicht zu einer NullPointerException führen"); + } + + } + + @Test @Marking(points = 5) public void test_060_mindestLaenge() { + + final String[] tests = {"", "Eva", "Anton", "Mal sehen!", "Und noch ein wenig länger als alle Anderen!!"}; + + for (final String s: tests) { + for (int i = 0; i <= s.length(); i++) { + Assert.assertTrue(StringHelper.hatMindestlaenge(s, i)); + } + for (int i = 1 + s.length(); i < s.length() + 300; i++) { + Assert.assertFalse(StringHelper.hatMindestlaenge(s, i)); + } + } + } + + @Test public void test_100_stundenlohn_null() { + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, false, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, true, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, false, true)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, true, true)); + } + + @Test public void test_120_stundenlohn_invalid() { + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Do.", false, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Sa", true, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Monday", false, true)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Phantasie", true, true)); + } + + @Test public void test_130_stundenlohn_standard() { + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Montag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Dienstag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Mittwoch", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Donnerstag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Freitag", false, false)); + Assert.assertEquals(20, StringHelper.berechneStundenlohn("Samstag", false, false)); + Assert.assertEquals(20, StringHelper.berechneStundenlohn("Sonntag", false, false)); + } + + @Test public void test_140_stundenlohn_Feiertag_Tagschicht() { + Assert.assertEquals(25, StringHelper.berechneStundenlohn("Montag", false, true)); + Assert.assertEquals(25, StringHelper.berechneStundenlohn("Sonntag", false, true)); + + Assert.assertEquals(25 + 10, StringHelper.berechneStundenlohn("Montag", true, true)); + Assert.assertEquals(25 + 10, StringHelper.berechneStundenlohn("Sonntag", true, true)); + } + + @Test public void test_140_stundenlohn_normal_Nachtschicht() { + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Montag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Dienstag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Mittwoch", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Donnerstag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Freitag", true, false)); + Assert.assertEquals(2 * 20, StringHelper.berechneStundenlohn("Samstag", true, false)); + Assert.assertEquals(2 * 20, StringHelper.berechneStundenlohn("Sonntag", true, false)); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java new file mode 100644 index 0000000000000000000000000000000000000000..c80a827f094e2a0d5f4e340e57dc250332347a75 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java @@ -0,0 +1,109 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe2; + + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Artikel; +import de.hdm_stuttgart.mi.sd1.test.helper.ReflectionHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; + +import java.lang.reflect.InvocationTargetException; + +/** + * . + * + */ + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_Artikel extends ExaminationTestDefaults { + + private final ReflectionHelper rHelper = new ReflectionHelper(); + + private Artikel fussBall, ball, puzzle, flummi; + + private void init() { + fussBall = newArtikel("Fußball", 234, 2250); + ball = newArtikel("Ball", 234, 1030); + puzzle = newArtikel("250 Teile Puzzle", 400, 780); + flummi = newArtikel("Flummi", 420, 89); + + } + + private Artikel newArtikel(final String artikelBezeichnung, final int artikelNummer, final int preis) { + try { + final String msg = rHelper.artikel_new_Bez_id_preis.getRecursiveMsg(); + Assert.assertNull(msg, msg); + + return rHelper.artikel_new_Bez_id_preis.constructor. + newInstance(artikelBezeichnung, artikelNummer, preis); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + Assert.fail("Konnte »new Artikel(\"" + artikelBezeichnung + "\", " + artikelNummer + ", " + + preis + ")« nicht aufrufen."); + } + return null; + } + + @Test @Marking(points = 4) public void test_100_constructorDefined() { + final String msg = rHelper.artikel_new_Bez_id_preis.getRecursiveMsg(); + Assert.assertNull(msg, msg); + } + + @Test @Marking(points = 4) public void test_200_erzeugeArtikel() { + init(); + } + + @Test @Marking(points = 2) public void test_300_equalsAlien() { + init(); + Assert.assertNotEquals(fussBall, "Ball"); // Alien String Objekt + + } + + @Test public void test_305_equals() { + init(); + + Assert.assertFalse(fussBall.equals(null)); + + Assert.assertTrue(fussBall.equals(ball)); // Gleiche Artikelnummer + Assert.assertFalse(fussBall.equals(flummi)); // Ungleiche Artikelnummer + } + + @Test public void test_310_hashCode() { + init(); + Assert.assertEquals(fussBall.hashCode(), ball.hashCode()); + } + + @Test @Marking(points = 3) public void test_320_hashCodeQuality() { + + final int hashcode_1001; + { + final Artikel referenz = newArtikel("Dummy", 1001, 2250); + hashcode_1001 = referenz.hashCode(); + } + + int countEqual1000 = 0; + for (int i = 1; i <= 1000; i++) { + final Artikel a = newArtikel("Dummy", i, 2250); + if (hashcode_1001 == a.hashCode()) { + countEqual1000++; + } + } + Assert.assertTrue( countEqual1000 / 10. + "% identische Hash Werte: Very bad!", + countEqual1000 < 20); // Identische Hash Werte unter 2% + } + + @Test @Marking(points = 2) public void test_400_toString() { + init(); + Assert.assertEquals("Fußball, Artikelnummer 234 zu 22.50€", fussBall.toString()); + Assert.assertEquals("250 Teile Puzzle, Artikelnummer 400 zu 7.80€", puzzle.toString()); + } + + @Test @Marking(points = 3) public void test_500_toString_nurCent() { + init(); + Assert.assertEquals("Flummi, Artikelnummer 420 zu 0.89€", flummi.toString()); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java new file mode 100644 index 0000000000000000000000000000000000000000..4d0cd153228a1e73a31c56d66bba239dc40cf294 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java @@ -0,0 +1,127 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.stream.Collectors; + + +public class ReflectClass<T> { + + public ReflectClass(final String className) { + this.className = className; + Class classTmp = null; + String tmpMsg = null; + try { + classTmp = Class.forName(className); + } catch (final ClassNotFoundException e) { + tmpMsg = "Die Klasse '" + className + "' wurde nicht gefunden:"; + } + classZ = classTmp; + msg = tmpMsg; + } + + ReflectClass(final Class<T> classZ) { + this.className = classZ.getName(); + this.classZ = classZ; + msg = null; + } + + final String className; + final Class<T> classZ; + public final String msg; + + /** + * @param arguments List of classes. + * @return Class names joined by ',', possibly stripped of "java.lang" component + */ + public static String formatArguments(final Class<?>[] arguments) { + + return Arrays.stream(arguments). + map(ReflectClass::normalizeClassname). + collect(Collectors.joining(", ")); + } + + /** + * @param classz Arbitrary class. + * @return The classname possible stripped of "java.lang" component. Fully qualified class names belonging + * to other packages remain untouched. + */ + private static String normalizeClassname(final Class<?> classz) { + final Package + javaDotLang = ReflectClass.class.getClassLoader().getDefinedPackage("java.lang"), + hostingPackage = classz.getPackage(); + + if (null == hostingPackage || !hostingPackage.equals(javaDotLang)) { + return classz.getName(); + } else { + return classz.getSimpleName(); + } + } + + /** + * @param classz Class whose attributes are to be retrieved. + * @return A string containing a comma separated list of all non-private attribute names + */ + public static String getNonPrivateAttributes(final Class<?> classz) { + + final Field[] fields = classz.getDeclaredFields(); + final StringBuilder results = new StringBuilder(); + boolean found = false; + for (final Field f : fields) { + if (0 == (Modifier.PRIVATE & f.getModifiers())) { + if (found) { + results.append(", "); + } + results.append(f.getName()); + found = true; + } + } + if (found) { + return results.toString(); + } + return null; + } + + /** + * Get modifier cleartext name according to + * https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#field.summary + * + * @param modifier Type declaration modifier e.g. "abstract", "final", ... + * @return Clear text name e.g. "final" + */ + static public String getModifierString(final int modifier) { + + switch (modifier) { + case Modifier.ABSTRACT: + return "abstract"; + case Modifier.FINAL: + return "final"; + case Modifier.INTERFACE: + return "interface"; + case Modifier.NATIVE: + return "native"; + case Modifier.PRIVATE: + return "private"; + case Modifier.PROTECTED: + return "protected"; + case Modifier.PUBLIC: + return "public"; + case Modifier.STATIC: + return "static"; + case Modifier.STRICT: + return "strict"; + case Modifier.SYNCHRONIZED: + return "synchronized"; + case Modifier.TRANSIENT: + return "transient"; + case Modifier.VOLATILE: + return "volatile"; + + default: + return "Unknown modifier value " + modifier; + } + + } + +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java new file mode 100644 index 0000000000000000000000000000000000000000..cd5e3bdcae5bf83f2dbb24d9d56bb27e87b3d38d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java @@ -0,0 +1,38 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Constructor; + +public class ReflectConstructor<T> { + + public ReflectConstructor(final ReflectClass<T> reflectClass, final Class<?>[] argumentMeta) { + this.definingClass = reflectClass; + Constructor<?> constructorTmp = null; + String tmpMsg = null; + if (null == reflectClass.classZ) { + tmpMsg = "Folgefehler: Klasse '" + reflectClass.className + "' nicht definiert"; + } else { + try { + constructorTmp = reflectClass.classZ.getConstructor(argumentMeta); + } catch (final NoSuchMethodException | SecurityException e) { + tmpMsg = "Kein Konstruktor '" + + reflectClass.classZ.getSimpleName() + "(" + + ReflectClass.formatArguments(argumentMeta) + + ")' in Klasse '" + + reflectClass.className + "' gefunden"; + } + } + constructor = (Constructor<T>) constructorTmp; + msg = tmpMsg; + } + public String getRecursiveMsg() { + if (null == definingClass.msg) { + return msg; + } else { + return "Folgefehler: " + definingClass.msg; + } + } + + public final ReflectClass<T> definingClass; + public final Constructor<T> constructor; + private final String msg; +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java new file mode 100644 index 0000000000000000000000000000000000000000..79e7e1e2ca1e51127df7a7342fdb5d662fd9d000 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java @@ -0,0 +1,124 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Method; + + +/** + * Describing a method to be instantiated by its string name within a given class + */ +public class ReflectMethod<T> { + + /** + * Metainfo about a method being defined in a given class. + * + * @param reflectClass Describing the class in question + * @param reflectMethodName The method's name. + * @param argumentMeta The method's arguments + */ + public ReflectMethod(final ReflectClass<T> reflectClass, final String reflectMethodName, final Class<?>[] argumentMeta) { + this.definingReflectClass = reflectClass; + Method methodTmp = null; + String tmpMsg = null; + if (null == reflectClass.classZ) { + tmpMsg = "Folgefehler: Klasse '" + reflectClass.className + "' nicht definiert"; + } else { + try { + methodTmp = reflectClass.classZ.getMethod(reflectMethodName, argumentMeta); + } catch (NoSuchMethodException | SecurityException e) { + tmpMsg = "Keine Methode '" + reflectMethodName + "(" + ")' in Klasse '" + reflectClass.className + "' gefunden"; + } + } + method = methodTmp; + msg = tmpMsg; + } + + /** + * Ausgangsklasse, in welcher die Methode vorhanden ist. + */ + public final ReflectClass<T> definingReflectClass; + + /** + * + */ + public final Method method; + private final String msg; + + + /** + * Providing error message in case the searched method was not found + * + * @return Explanation if method was not found, null otherwise + */ + public String getRecursiveErrorMsg() { + if (null == definingReflectClass.msg) { + return msg; + } else { + return "Folgefehler: " + definingReflectClass.msg; + } + } + + /** + * Assert whether the method is being defined in a given class. + * + * @param expectedClass Class to be examined for method definition. + * @return null if defined in expected class, error message otherwise + */ + public String assertIsDefinedIn(final String expectedClass) { + final Class<?> definingClass = method.getDeclaringClass(); + + if (expectedClass.equals(definingClass.getName())) { + return null; + } else { + return method.getName() +" ist in '" + definingClass.getName() + "' definiert, aber nicht in '" + + expectedClass + "'"; + } + } + + /** + * Assert whether the method is being defined in a given class. + * + * @param expectedClass Class to be examined for method definition. + * @return null if defined in expected class, error message otherwise + */ + public String assertIsDefinedIn(final Class<?> expectedClass) { + final Class<?> definingClass = method.getDeclaringClass(); + + if (expectedClass.equals(definingClass)) { + return null; + } else { + return method.getName() +" ist in '" + definingClass.getName() + "' definiert, aber nicht in '" + + expectedClass.getName() + "'"; + } + } + + /** + * Check for presence of mandatory modifier. + * + * @param modifier Modifier to be present. + * @return null if desired modifier is present, descriptive message otherwise. + */ + public String assertModifierIsPresent(final int modifier) { + + if (0 == (modifier & method.getModifiers())) { + return "Modifier '" + ReflectClass.getModifierString(modifier) + "' not present"; + } else { + return null; + } + } + + /** + * Check for presence of modifier. + * + * @param modifier Modifier to be present. + * @param msg informative message. + * @return null if desired modifier is present, descriptive message otherwise. + */ + public String assertModifierIsPresent(final int modifier, final String msg) { + + if (0 == (modifier & method.getModifiers())) { + return msg; + } else { + return null; + } + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..45a138ea1c0efa0b4e97ab1f35327801ba1d338c --- /dev/null +++ b/Klausuren/Sd1/2018summer/Exam/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Artikel; + +public class ReflectionHelper { + + public ReflectionHelper() { + + // Ersatzteil + // + artikel_Klasse = new ReflectClass(Artikel.class); + artikel_new_Bez_id_preis = new ReflectConstructor( + artikel_Klasse, + new Class[]{String.class, int.class, int.class} + ); + artikel_toString = new ReflectMethod(artikel_Klasse, "toString", new Class[]{}); + artikel_equals = new ReflectMethod(artikel_Klasse, "equals", new Class[]{Object.class}); + } + + // Ersatzteil + // + public final ReflectClass<Artikel> artikel_Klasse; + public final ReflectConstructor<Artikel> artikel_new_Bez_id_preis; + public final ReflectMethod artikel_toString, artikel_equals; + +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/.gitignore b/Klausuren/Sd1/2018summer/Solve/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..a2fa20469808363ab656f8206d63c6b2e92a83b8 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/.gitignore @@ -0,0 +1,5 @@ +/.classpath +/.project +/.settings +/.idea +/*.iml diff --git a/Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml b/Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml new file mode 100644 index 0000000000000000000000000000000000000000..e3f4572dcfe59cc8cab7a3a59ca487b798b04ac8 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/Doc/klausur.xml @@ -0,0 +1,446 @@ +<?xml version="1.0" encoding="UTF-8"?> +<book version="5.0" xml:id="klausur_SoSe_2018" xml:lang="de" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:trans="http://docbook.org/ns/transclusion" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <!-- --> + + <info> + <title/> + + <author> + <personname/> + </author> + + <pubdate/> + </info> + + <chapter xml:id="task1"> + <title>Klassenmethoden</title> + + <!-- Hier gemeinsames zip Archiv hochladen, auch von anderen Aufgaben. --> + + <section xml:id="aufgabe1_prepare"> + <title>Vorbereitung</title> + + <para>Entpacken Sie das oben sichtbare Archiv + <filename>exam.zip</filename> und importieren Sie den resultierenden + Ordner <filename>Exam</filename> als <productname>Maven</productname> + Projekt in IntelliJ.</para> + </section> + + <section xml:id="aufgabe1_descr"> + <title>Beschreibung</title> + + <para>Implementierung vorbereiteter Methoden gemäß + <productname>Javadoc</productname> Beschreibungen und nachfolgend + beschriebener Funktionalitäten. Sie bekommen bei unvollständiger + Implementierung Teilpunkte.</para> + </section> + + <section xml:id="aufgabe1_task"> + <title>Aufgabe</title> + + <para>Vervollständigen Sie die Implementierung aller Methoden aus + folgenden Klassen im <foreignphrase + xml:lang="en">package</foreignphrase> + <package>de.hdm_stuttgart.mi.sd1.aufgabe1</package>:</para> + + <informaltable border="1"> + <tr> + <th>Zu implementieren</th> + + <th>Zugehörige Testklasse</th> + </tr> + + <tr> + <td><classname>MathHelper</classname></td> + + <td><classname>Test_MathHelper</classname></td> + </tr> + + <tr> + <td><classname>StringHelper</classname></td> + + <td><classname>Test_StringHelper</classname></td> + </tr> + + <tr> + <td><classname>ArrayHelper</classname></td> + + <td><classname>Test_ArrayHelper</classname></td> + </tr> + </informaltable> + </section> + + <section xml:id="aufgabe1_commonHints"> + <title>Allgemeine Hinweise</title> + + <itemizedlist> + <listitem> + <para>Die von Ihnen erreichte Punktzahl richtet sich nach der Anzahl + positiv bestandener Tests. Sie bekommen keine Punkte, wenn Ihre + Implementierung in Bezug auf einen einzelnen Test lediglich + <quote>fast richtig</quote> ist. Implementieren Sie im Zweifelsfall + weniger Methoden, diese dafür aber vollständig.</para> + </listitem> + + <listitem> + <para>Die <productname>Javadoc</productname> Kommentare der + jeweiligen Methoden beschreiben das gewünschte Verhalten. Mittels + <option>Tools</option> --> <option>Generate JavaDoc</option> + können Sie in IntelliJ unter Angabe eines Zielverzeichnisses aus den + Javadoc Beschreibungen eine besser lesbare HTML Ausgabe + erzeugen.</para> + + <para>Lesen Sie die (generierte) Dokumentation <emphasis + role="bold">sehr genau</emphasis>.</para> + </listitem> + + <listitem> + <para>Beachten Sie alle Sonderfälle: Dazu zählen insbesondere + <code>null</code> Werte von Variablen oder enthaltene + <code>null</code> Werte in <foreignphrase + xml:lang="en">Arrays</foreignphrase>.</para> + </listitem> + + <listitem> + <para>Nutzen Sie den <foreignphrase + xml:lang="en">Debugger</foreignphrase> oder logging <foreignphrase + xml:lang="en">Statements</foreignphrase> im Fall fehlgeschlagener + Testfälle.</para> + </listitem> + + <listitem> + <para>Die Ausführung von + <package>de.hdm_stuttgart.mi.sd1.test</package>.<classname>ShowReachedPoints</classname> + im Testzweig Ihres Projekts als <productname>Java</productname> + Anwendung (nicht als Junit Test!) zeigt Ihnen zu jedem Zeitpunkt die + in allen Programmieraufgaben bislang erreichten Punkte.</para> + </listitem> + </itemizedlist> + </section> + + <section version="5.1" xml:id="uploadFirst" xml:lang="de"> + <title>Hochladen Ihrer Lösung in das Klausursystem</title> + + <para>Exportieren Sie Ihr Projekt über den Menüpunkt »File« --> + »Export to Zip File« als <filename>.zip</filename> Archiv. Wählen Sie + einen eindeutigen Namen, z.B. <filename>solution_1.zip</filename>. Laden + Sie danach <filename>solution_1.zip</filename> über die + <quote><foreignphrase xml:lang="en">Upload</foreignphrase> File</quote> + Funktion am unteren Seitenende des <productname>Ilias</productname> + Klausursystems hoch. <emphasis role="red">Wichtig</emphasis>:</para> + + <itemizedlist> + <listitem> + <para>Wählen Sie beim Hochladen nicht die falsche Datei, etwa das + Ausgangsarchiv <filename>exam.zip</filename> oder eine ältere + Version Ihres Projekts.</para> + </listitem> + + <listitem> + <para>Kontrollieren Sie nach dem Hochladen die Sichtbarkeit Ihres + <filename>solution_1.zip</filename> Archivs im Klausursystem.</para> + </listitem> + + <listitem> + <para>Sie können mehrere Versionen + <filename>solution_2.zip</filename> etc. hochladen und bei Bedarf + ältere im <productname>Ilias</productname> System löschen. Nur die + zuletzt hochgeladene Version wird bewertet.</para> + </listitem> + </itemizedlist> + + <caution> + <itemizedlist> + <listitem> + <para>Laden Sie keine Projekte mit <productname>Java</productname> + Syntaxfehlern hoch, diese werden nicht bewertet!</para> + </listitem> + + <listitem> + <para>Reservieren Sie für den Vorgang des Hochladens ausreichend + Zeit vor Klausurende.</para> + </listitem> + + <listitem> + <para>Bearbeitungen, welche sich nach Klausurende lediglich auf + Ihrem Arbeitsplatzrechner befinden, werden nicht gewertet.</para> + </listitem> + + <listitem> + <para>Das Klausursystem akzeptiert nur Archive mit der Endung + <filename>.zip</filename>.</para> + </listitem> + </itemizedlist> + </caution> + </section> + </chapter> + + <chapter xml:id="task2"> + <title>Artikel</title> + + <section xml:id="aufgabe2_prepare"> + <title>Vorbereitung</title> + + <para>Falls Sie die erste Aufgabe bearbeitet haben, arbeiten Sie einfach + an Ihrem Projekt weiter. Ansonsten lesen Sie bitte in der ersten Aufgabe + die Anleitung zum Projektimport sowie die weiteren Hinweise zum + Hochladen in das <productname>Ilias</productname> System.</para> + </section> + + <section xml:id="aufgabe2_descr"> + <title>Beschreibung</title> + + <para>Implementierung einer Klasse zur Darstellung von Artikeln. Das + Projektskelett enthält dazu eine leere Klasse + <package>de.hdm_stuttgart.mi.sd1.aufgabe2</package>.<classname>Artikel</classname> + als Ausgangspunkt für Ihre Implementierung.</para> + </section> + + <section xml:id="aufgabe2_task"> + <title>Aufgaben</title> + + <orderedlist> + <listitem> + <para>Für einen Artikel sollen dessen Bezeichnung, eine + Artikelnummer sowie der Preis in Euro-Cent (25,34€ sind + beispielsweise 2534 Cent) angegeben werden. Erweitern Sie die Klasse + so, dass z.B. der folgende Code das dargestellte Ergebnis + liefert:</para> + + <informaltable border="1"> + <tr> + <th>Code</th> + + <th>Gewünschte Ausgabe</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">final Artikel a = + new Artikel("Fahrrad", 3321, 23050); + +System.out.println(a);</programlisting></td> + + <td valign="top"><screen>Fahrrad, Artikelnummer 3321 zu 230,50€</screen></td> + </tr> + </informaltable> + </listitem> + + <listitem> + <para>Zwei Instanzen von Artikel sollen genau dann gleich sein, wenn + ihre Artikelnummern übereinstimmen. Bezeichnung und Preis sollen + hingegen in Bezug auf die Wertgleichheit zweier Artikel irrelevant + sein:</para> + + <informaltable border="1"> + <tr> + <th>Code</th> + + <th>Gewünschte Ausgabe</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">final Artikel + a = new Artikel("Ball", 9132, 4450), + b = new Artikel("Fußball", 9132, 4350), + c = new Artikel("Fahrrad", 3321, 23050); + +System.out.println("Ball / Fußball: " + a.equals(b)); +System.out.println("Ball / Fahrrad: " + a.equals(c));</programlisting></td> + + <td valign="top"><screen>Ball / Fußball: true +Ball / Fahrrad: false</screen></td> + </tr> + </informaltable> + </listitem> + + <listitem> + <para>Implementieren Sie eine kompatible <methodname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#hashCode()">hashCode()</methodname> + Methode.</para> + + <para>Hinweis: Die Unit Tests prüfen neben der formalen Korrektheit + auch die Sinnhaftigkeit der Implementierung. Eine Hash Funktion + sollte für verschiedene Objekte »meistens« unterschiedliche Werte + zurückliefern.</para> + </listitem> + </orderedlist> + + <tip> + <para>Beachten Sie die Unit Tests in + <classname>de.hdm_stuttgart.mi.sd1.test.aufgabe2.Test_Artikel</classname>.</para> + </tip> + </section> + + <section version="5.1" xml:id="uploadFollow" xml:lang="de"> + <title>Hochladen Ihrer Lösung in das Klausursystem</title> + + <para>Laden Sie die Lösung dieser Aufgabe als gemeinsamen Projekt Export + mit der ersten Aufgabe <xref linkend="task1"/> gemäß den dortigen + Hinweisen hoch. Falls Sie die erste Aufgabe ebenfalls bearbeitet haben, + enthält Ihr <foreignphrase xml:lang="en">Upload</foreignphrase> die + Lösungen zu beiden Aufgaben.</para> + + <para>Tragen Sie im Freitextfeld weiter unten genau einen der beiden + Texte ein:</para> + + <itemizedlist> + <listitem> + <para>Ich habe die aktuelle Aufgabe bearbeitet und erhoffe dafür + Punkte.</para> + </listitem> + + <listitem> + <para>Ich habe die aktuelle Aufgabe nicht bearbeitet.</para> + </listitem> + </itemizedlist> + </section> + </chapter> + + <chapter xml:id="task3"> + <title>Primitive und Klassentypen</title> + + <para>Wir vergleichen die Werte zweier Instanzen der Klassen <classname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Integer.html">Integer</classname> + und <classname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Long.html">Long</classname>:</para> + + <informaltable border="1"> + <tr> + <th>Code</th> + + <th>Ergebnis</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">final Integer x = Integer.valueOf(44); +final long y = Long.valueOf(44); +System.out.println("Wertvergleich Integer mit Long: " + + (x.equals(y)));</programlisting></td> + + <td valign="top"><screen>Wertvergleich <classname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Integer.html">Integer</classname> mit <classname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Long.html">Long</classname>: false</screen></td> + </tr> + </informaltable> + + <para>Der Methode <methodname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals()</methodname> + zur Prüfung auf Wertgleichheit bei Instanzen entspricht der Operator + »<code language="java">==</code>« bei primitiven Datentypen:</para> + + <informaltable border="1"> + <tr> + <th>Code</th> + + <th>Ergebnis</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">final int a = Integer.valueOf(44); +final long b = Long.valueOf(44); +System.out.println("Wertvergleich int mit long: " + + (a == b));</programlisting></td> + + <td valign="top"><screen>Wertvergleich int mit long: true</screen></td> + </tr> + </informaltable> + + <para>Erklären Sie dieses unterschiedliche Ergebnis <code + language="java">true</code> vs. <code language="java">false</code>.</para> + + <para>Hinweis: Wie wird die <methodname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals()</methodname> + Methode in Bezug auf Instanzen »fremder« Klassen implementiert? Was + bewirken die Zuweisungen?</para> + </chapter> + + <chapter xml:id="task4"> + <title>Ein Interface Problem</title> + + <para>Wir betrachten:</para> + + <informaltable border="1"> + <tr> + <th>Code</th> + + <th>Compile time Fehler</th> + </tr> + + <tr> + <td valign="top"><programlisting language="java">public interface Konto { + void toString(); +}</programlisting></td> + + <td valign="top">'toString()' in 'de.hdm_stuttgart.mi.sd1.iface.Konto' + clashes with 'toString()' in 'java.lang.Object'; attempting to use + incompatible return type</td> + </tr> + </informaltable> + + <para>Erläutern Sie die Ursache dieser Fehlermeldung. Welche Beziehung + besteht zu <classname + xlink:href="https://docs.oracle.com/javase/10/docs/api/java/lang/Object.html">java.lang.Object</classname>?</para> + </chapter> + + <chapter xml:id="task5"> + <title>Farbwerte, <code language="java">byte</code> und <code + language="java">int</code></title> + + <para>Ein Entwickler möchte Farbwerte nach dem RGB Modell abbilden. Die + drei Farbkomponenten rot, grün und blau stellt er jeweils als <code + language="java">byte</code> dar. Er setzt den byte Wert -128 zu null und + 127 als Maximalwert des jeweiligen Farbanteils fest. Das (rgb) Tripel + (-128, 0, 127) entspricht also null Rotanteil, mittlerem Gelbanteil und + maximalem Blauanteil.</para> + + <para>Der Entwickler möchte den Farbwert in einer fremden, von ihm nicht + veränderbaren, Klasse darstellen. Dort kann er ein nicht mehr genutztes + <code language="java">int</code> Attribut verwenden. Er möchte die drei + Farbanteile in einen int Wert umwandeln und plant dazu eine entsprechende + Methode:</para> + + <programlisting language="java">/** + * Wandele die drei Farbanteile (r, g, b) einer Farbe in einen int + * Wert. Gegenoperation zu {@link #int2rgb(int)}. + * + * @param r Rotanteil + * @param g Gelbanteil + * @param b Blauanteil + * @return Ein der Farbe eindeutig entsprechender int Wert. + */ +static public int rgb2int(final byte r, final byte g, final byte b) { + return ...; +}</programlisting> + + <para>Zudem möchte er diese <code language="java">int</code> Werte auch + wieder eindeutig in die drei Farbanteile zurückwandeln können, um so die + ursprünglichen RGB Anteile zu erhalten:</para> + + <programlisting language="java">/** + * Umwandlung eines int Farbwerts in die drei (r,g,b) Anteile. Gegenoperation + * zu {@link #rgb2int(byte, byte, byte)}. + * + * @param farbwert + * @return Ein Array der Länge drei bestehend aus den RGB Farbanteilen. + */ +static public byte[] int2rgb(final int farbwert) { + return new byte[]{..., ..., ...}; +}</programlisting> + + <para>Frage: Ist dies grundsätzlich möglich? Begründen Sie Ihre + Aussage.</para> + + <tip> + <para>Betrachten Sie die zugrundliegenden Datentypen.</para> + </tip> + </chapter> +</book> diff --git a/Klausuren/Sd1/2018summer/Solve/pom.xml b/Klausuren/Sd1/2018summer/Solve/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..4e2caf888c79fdfdc1561fca96e625a6e67d05da --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/pom.xml @@ -0,0 +1,99 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm-stuttgart.mi.sd1</groupId> + <artifactId>sd1_2018summer_solve</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>sd1_2018summer_solve</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <repositories> + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> + </repository> + </repositories> + + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5.1</version> + <configuration> + <source>1.9</source> + <target>1.9</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.1</version> + <configuration> + <links> + <link>https://docs.oracle.com/javase/10/docs/api</link> + </links> + <additionalJOptions> + <additionalJOption>-html5</additionalJOption> + </additionalJOptions> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sd1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/assembly/assembly.xml b/Klausuren/Sd1/2018summer/Solve/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..0abe68f142609af70ddaf6be5fbeb82821ac5749 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/ArrayHelper.java @@ -0,0 +1,79 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +import java.util.Arrays; + +/** + * Hilfsmethoden für Arrays. + */ +public class ArrayHelper { + + /** + * <p>Enthält ein Array ganzzahliger Werte mindestens einen mehrfach auftretenden Wert? Beispiele:</p> + * + * <ul> + * <li>In <code>{1, -5, 3, 1, 17, 6, 1}</code> ist der Wert 1 dreifach enthalten.</li> + * <li><code>{-5, 5, 4, 9}</code> enthält keinen mehrfach auftretenden Wert.</li> + * </ul> + * + * <p>Praktische Verwendung:</p> + * <pre>final int[] werte = {2, 4, 3, 0, 1, 2}; + * final boolean result = ArrayHelper.enthaeltDuplikate(werte);</pre> + * + * <p>Wegen des doppelten Auftretens des Werts »2« hat <code>result</code> den Wert <code>true</code>.</p> + * + * @param werte null oder ein Array beliebiger Ganzzahlen + * @return <code>true</code>, falls mindestens ein Wert doppelt vorkommt, ansonsten <code>false</code>. + */ + static public boolean enthaeltDuplikate(final int[] werte) { + +// // Mit streams: +// if (null == werte) { +// return false; +// } else { +// return enthaeltDuplikate(Arrays.stream(werte).boxed().toArray()); +// } + + if (null != werte) { + for (int i = 0; i < werte.length - 1; i++) { + final int start = werte[i]; + for (int j = i + 1; j < werte.length; j++) { + if (start == werte[j]) { + return true; + } + } + } + } + return false; + } + + /** + * <p>Analog zu {@link #enthaeltDuplikate(int[])}. </p> + * + * <p>Praktische Verwendung:</p> + * + * <pre>final String[] werte = {"One", null, "true", null}; + * final boolean result = ArrayHelper.enthaeltDuplikate(werte);</pre> + * + * <p>Da es keinen doppelt auftretenden String gibt und <code>null</code> Werte ignoriert werden, erhält + * <code>result</code> den Wert <code>false</code>.</p> + * + * @param werte <code>null</code> oder ein Array aus Object und <code>null</code> Werten. + * @return <code>true</code>, falls mindestens ein String doppelt vorkommt, ansonsten <code>false</code>, + * wobei enthaltene <code>null</code> Werte in Bezug auf Duplikate ignoriert werden. + */ + static public boolean enthaeltDuplikate(final Object[] werte) { + if (null != werte) { + for (int i = 0; i < werte.length - 1; i++) { + final Object start = werte[i]; + if (null != start) { + for (int j = i + 1; j < werte.length; j++) { + if (start.equals(werte[j])) { + return true; + } + } + } + } + } + return false; + } +} diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..80b154808f090e4a1ae9085f00e38ec377018c11 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/MathHelper.java @@ -0,0 +1,62 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + + +/** + * Spezielle Berechnungsmethoden. + */ +public class MathHelper { + + static private int wertFallsUngerade(int wert) { + if (0 == wert % 2) { + return 0; + } else { + return wert; + } + } + /** + * <p>Die Summe aller ungeraden Werte zweier Argumente. Gerade Werte werden + * bei der Summenbildung ignoriert. Beispiele:</p> + * + * <ul> + * <li>summeUngeraderWerte(3, 4) ergibt 3, weil 4 als gerader Wert ignoriert wird.</li> + * <li>summeUngeraderWerte(1, 5) ergibt 1 + 5 == 6, da beide Werte ungerade sind.</li> + * <li>summeUngeraderWerte(-4, 10) ergibt 0, weil beide Werte gerade sind und somit ignoriert werden.</li> + * + * </ul> + * + * @param a Erster Wert. + * @param b Zweiter Wert + * @return Die Summe aller ungeraden Werte beider Argumente. + */ + static public int summeUngeraderWerte(final int a, final int b) { + /* + Tip: Der »%« Operator ist Ihr Freund! + */ + + return wertFallsUngerade(a) + wertFallsUngerade(b); + } + /** + * <p>Die harmonische Reihe H(n) zu einer natürlichen Zahl 0 < n ist definiert als:</p> + * + * <p>H(n) = 1/1 + 1/2 + 1/3 + ... + 1/n</p> + * + * <p>Also beispielsweise:</p> + * <ul> + * <li>H(2) = 1 + 1/2 = 1 + 0.5 = 1.5</li> + * <li>H(3) = 1 + 1/2 + 1/3 = 11/6 = 1.8333333...</li> + * </ul> + * + * @param n Anzahl der Terme der harmonischen Reihe, mindestens 1. + * @return Der Wert H(n). + */ + static public double harmonisch(final int n) { + /* + Tip: Beachten Sie mögliche Probleme bei der Division zweier int Werte. + */ + double summe = 1; + for (int i = 2; i <= n; i++) { + summe += 1. / i; + } + return summe; + } +} diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..63a3d09ac40788cc754de7ddc0de617c1be428c8 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe1/StringHelper.java @@ -0,0 +1,89 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe1; + +/** + * Hilfsmethode für String Operationen. + */ +public class StringHelper { + + /** + * <p>Berechne den Stundenlohn gemäß den nachfolgenden Regeln in der angegebenen Reihenfolge:</p> + * + * <ol> + * <li>Bei falscher Wochentagsangabe (z.B. "Fr." oder null statt "Freitag" wird der Wert -1 zur + * Fehlererkennung zurückgeliefert.</li> + * <li>An einem Feiertag gilt unabhängig vom Wochentag ein Grundlohn von 25.-€.</li> + * <li>An einem Wochentag ("Montag" bis "Freitag") wird ein Grundlohn von 15.-€ gezahlt.</li> + * <li>Am Wochenende ("Samstag"/"Sonntag") werden 20.-€ Grundlohn gezahlt.</li> + * <li>An Feiertagen werden in einer Nachtschicht 10€ zusätzlich zum Grundlohn gezahlt.</li> + * <li>An nicht-Feiertagen verdoppelt sich der Grundlohn einer Nachtschicht.</li> + * </ol> + * + * @param wochentag Genau ein Wert aus {"Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", + * "Samstag", "Sonntag"} + * @param nachtschicht true, falls Nachtschicht, sonst false. + * @param feiertag true, falls Feiertag, sonst false. + * @return -1, falls der angegebene Wochentag null oder ungültig ist. Ansonsten der Stundenlohn gemäß Beschreibung. + */ + static public int berechneStundenlohn(final String wochentag, final boolean nachtschicht, boolean feiertag) { + + if (null == wochentag) { + return -1; + } + int stundenLohn; + + switch (wochentag) { + + case "Montag": + case "Dienstag": + case "Mittwoch": + case "Donnerstag": + case "Freitag": + stundenLohn = 15; + break; + + case "Samstag": + case "Sonntag": + stundenLohn = 20; + break; + + default: + return -1; + } + if (feiertag && nachtschicht) { + return 25+10; + } else if (feiertag) { // Keine Nachtschicht + return 25; + } else if (nachtschicht) { // Kein Feiertag + return 2 * stundenLohn; + } else { // Weder Feiertag noch Nachtschicht + return stundenLohn; + } + } + + /** + * <p>Hat eine Zeichenkette mindestens eine vorgegebene Länge? Beispiele:</p> + * + * <ul> + * <li>"Kurt" hat mindestens die Länge 2.</li> + * <li>"Eva" hat nicht die Mindestlänge 4.</li> + * </ul> + * + * <p>Praktische Verwendung:</p> + * <pre>boolean result = StringHelper.hatMindestlaenge("Eva", 4);</pre> + * + * <p>Die Zeichenkette "Eva" hat lediglich die Länge 3, daher erhält die Variable + * <code>result</code> den Wert <code>false</code>.</p> + * + * @param s Eine Zeichenkette oder <code>null</code>. + * @param mindestlaenge Eine geforderte, nicht-negative, Mindestlänge. + * @return true, falls die Zeichenkette mindestens die vorgegebene Länge aufweist. Der Wert <code>null</code> + * wird als leere Zeichenkette ("") behandelt. + */ + static public boolean hatMindestlaenge(final String s, final int mindestlaenge) { + if (null == s) { + return 0 == mindestlaenge; + } else { + return mindestlaenge <= s.length(); + } + } +} diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java new file mode 100644 index 0000000000000000000000000000000000000000..cc907a5c38f99b5f836bc31409dca364634b15c1 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/java/de/hdm_stuttgart/mi/sd1/aufgabe2/Artikel.java @@ -0,0 +1,84 @@ +package de.hdm_stuttgart.mi.sd1.aufgabe2; + +/** + * Darstellung von Verkaufsartikeln + */ +public class Artikel { + /** + * Die Bezeichung eines Artikels, z.B. »Fußball« + */ + public final String artikelBezeichnung; + + /** + * Die Artikelnummer. + */ + final int artikelNummer; + + /** + * Preisangabe in Cent + */ + public final int preis; + + /** + * Konstruktor für Artikelinstanzen. + * + * @param artikelBezeichnung Siehe {@link #artikelBezeichnung}. + * @param artikelNummer Siehe {@link #artikelNummer}. + * @param preis Siehe {@link #preis}. + */ + public Artikel(final String artikelBezeichnung, final int artikelNummer, final int preis) { + this.artikelBezeichnung = artikelBezeichnung; + this.artikelNummer = artikelNummer; + this.preis = preis; + } + + /** + * Zwei Artikel sind genau dann gleich, wenn ihre {@link #artikelNummer} identisch ist. + * @param o Das zu vergleichende Objekt. + * @return <code>true</code> falls das zu vergleichende Objekt ein {@link Artikel} mit + * identischem Wert für die {@link #artikelNummer} ist, sonst <code>false</code>. + */ + @Override + public boolean equals(Object o) { + if (o instanceof Artikel) { + final Artikel artikel = (Artikel) o; + return artikelNummer == artikel.artikelNummer; + } else { + return false; + } + } + + /** + * Berechnung im Einklang mit {@link #equals(Object)}. + * + * @return Siehe {@link Object#hashCode()} + */ + @Override + public int hashCode() { + + /* + Hinweis: Achten Sie bei der Implementierung auf die Qualität erzeugter Hash Werte: Beispielsweise ist eine + konstante Hash Funktion zwar formal korrekt, führt aber ggf. zu schlechter Performance. + + Die Qualität Ihrer Implementierung wird getestet. + */ + return artikelNummer; + } + + /** + * @return Objektdarstellung als String + */ + @Override + public String toString() { + return artikelBezeichnung + ", Artikelnummer " + artikelNummer + " zu " + euroDarstellung() + "€"; + } + + private String euroDarstellung() { + if (preis < 100) { + return "0." + preis; + } else { + final StringBuilder ret = new StringBuilder(Integer.toString(preis)); + return ret.insert(ret.length() - 2, ".").toString(); + } + } +} diff --git a/Klausuren/Sd1/2018summer/Solve/src/main/resources/log4j2.xml b/Klausuren/Sd1/2018summer/Solve/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..130f87a144c4eb0107a846e580c8fa7f5e819fc1 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/main/resources/log4j2.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + + <!-- You my want to define class or package level per-logger rules --> + <Logger name="de.hdm_stuttgart.mi.sd1.App" level="debug"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="info"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java new file mode 100644 index 0000000000000000000000000000000000000000..354714e4dbbeea7f0406c0de609e987699fd6ca1 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/ShowReachedPoints.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sd1.test; + +import de.hdm_stuttgart.mi.exam.unitmarking.RunTests; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_ArrayHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_MathHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe1.Test_StringHelper; +import de.hdm_stuttgart.mi.sd1.test.aufgabe2.Test_Artikel; + +public class ShowReachedPoints { + + /** + * Execution reveals the number of reached points. + * + * @param args Unused + */ + public static void main(String[] args) { + RunTests.exec( + "Aufgabe 1" + , Test_StringHelper.class + , Test_MathHelper.class + , Test_ArrayHelper.class + ); + + RunTests.exec("Aufgabe 2", Test_Artikel.class); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..c8517d6392ed98bb9097e6ce5d7757f199bf186f --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_ArrayHelper.java @@ -0,0 +1,58 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.ArrayHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_ArrayHelper extends ExaminationTestDefaults { + + // Teste int[] Parameter + @Test public void test_380_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((int[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 1})); + } + @Test public void test_400_testKeinDuplikat_0() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{0})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 1})); + } + @Test @Marking(points = 3) public void test_410_testKeinDuplikat_1() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{1})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 4, 1})); + } + @Test @Marking(points = 2) public void test_420_testKeinDuplikat_2() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{-1, 2})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{1, 4, 4})); + } + + @Test @Marking(points = 2) public void test_430_testKeinDuplikat_6() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new int[]{-1, 2, 5, 9, -30, 0})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{2, 4, 3, 0, 1, 2})); + } + @Test @Marking(points = 2) public void test_440_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((int[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new int[]{0, 0})); + } + + // Teste Object[] parameter + @Test @Marking(points = 2) public void test_500_string_testNull() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate((String[]) null)); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new String[]{ + new String("ab"), "ab"})); + } + + @Test @Marking(points = 2) public void test_520_string_testNullEnthalten() { + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new String[]{ + new String("ab"), null, "ab"})); + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new String[]{null, null, null})); + } + + @Test @Marking(points = 2) public void test_530_string_testHeterogen() { + Assert.assertFalse(ArrayHelper.enthaeltDuplikate(new Object[]{"test", new StringBuffer("test")})); + Assert.assertTrue(ArrayHelper.enthaeltDuplikate(new Object[]{new String("test"), new String("test")})); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..ff17c91208f6e67b9c42bf56324b9d1e0e71f72d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_MathHelper.java @@ -0,0 +1,50 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.MathHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_MathHelper extends ExaminationTestDefaults { + /** + * Zwei gerade Werte. + */ + @Test @Marking(points = 4) public void test_100_nullUngeradeWerte() { + Assert.assertEquals(0, MathHelper.summeUngeraderWerte(224, -418)); + Assert.assertEquals(0, MathHelper.summeUngeraderWerte(-418, 224)); + } + /** + * Gerade und ungerade gemischt. + */ + @Test @Marking(points = 4) public void test_110_einUngeraderWert() { + Assert.assertEquals(-419, MathHelper.summeUngeraderWerte(224, -419)); + Assert.assertEquals(-3, MathHelper.summeUngeraderWerte(-3, 224)); + } + /** + * Zwei ungerade Werte. + */ + @Test @Marking(points = 4) public void test_120_zweiUngeradeWerte() { + Assert.assertEquals(-14, MathHelper.summeUngeraderWerte(-17, 3)); + Assert.assertEquals(-4, MathHelper.summeUngeraderWerte(3, -7)); + } + + @Test @Marking(points = 3) public void test_200_testHarmonisch() { + Assert.assertEquals(1., MathHelper.harmonisch(1), 1.E-14); + } + @Test @Marking(points = 3) public void test_210_testHarmonisch() { + Assert.assertEquals(1.5, MathHelper.harmonisch(2), 1.E-14); + Assert.assertEquals(1.8333333333333333, MathHelper.harmonisch(3), 1.E-14); + + Assert.assertEquals(2.9289682539682538, MathHelper.harmonisch(10), 1.E-14); + Assert.assertEquals(3.597739657143682, MathHelper.harmonisch(20), 1.E-14); + Assert.assertEquals(4.499205338329425, MathHelper.harmonisch(50), 1.E-14); + Assert.assertEquals(10.480728217229327, MathHelper.harmonisch(20000),1.E-14); + } + @Test public void test_220_testHarmonisch() { + Assert.assertEquals(10.480728217229327, MathHelper.harmonisch(20000),1.E-14); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..82e0c493e9394fced4c745b49c5ef51838316234 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe1/Test_StringHelper.java @@ -0,0 +1,82 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe1; + +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; +import de.hdm_stuttgart.mi.sd1.aufgabe1.StringHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_StringHelper extends ExaminationTestDefaults { + + @Test @Marking(points = 4) public void test_050_testMindestlaengeNull() { + try { + Assert.assertTrue(StringHelper.hatMindestlaenge(null, 0)); + for (int i = 1; i <= 100; i++) { + Assert.assertFalse(StringHelper.hatMindestlaenge(null, i)); + } + } catch (final NullPointerException e) { + Assert.fail("Ein null String darf nicht zu einer NullPointerException führen"); + } + + } + + @Test @Marking(points = 5) public void test_060_mindestLaenge() { + + final String[] tests = {"", "Eva", "Anton", "Mal sehen!", "Und noch ein wenig länger als alle Anderen!!"}; + + for (final String s: tests) { + for (int i = 0; i <= s.length(); i++) { + Assert.assertTrue(StringHelper.hatMindestlaenge(s, i)); + } + for (int i = 1 + s.length(); i < s.length() + 300; i++) { + Assert.assertFalse(StringHelper.hatMindestlaenge(s, i)); + } + } + } + + @Test public void test_100_stundenlohn_null() { + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, false, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, true, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, false, true)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn(null, true, true)); + } + + @Test public void test_120_stundenlohn_invalid() { + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Do.", false, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Sa", true, false)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Monday", false, true)); + Assert.assertEquals(-1, StringHelper.berechneStundenlohn("Phantasie", true, true)); + } + + @Test public void test_130_stundenlohn_standard() { + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Montag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Dienstag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Mittwoch", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Donnerstag", false, false)); + Assert.assertEquals(15, StringHelper.berechneStundenlohn("Freitag", false, false)); + Assert.assertEquals(20, StringHelper.berechneStundenlohn("Samstag", false, false)); + Assert.assertEquals(20, StringHelper.berechneStundenlohn("Sonntag", false, false)); + } + + @Test public void test_140_stundenlohn_Feiertag_Tagschicht() { + Assert.assertEquals(25, StringHelper.berechneStundenlohn("Montag", false, true)); + Assert.assertEquals(25, StringHelper.berechneStundenlohn("Sonntag", false, true)); + + Assert.assertEquals(25 + 10, StringHelper.berechneStundenlohn("Montag", true, true)); + Assert.assertEquals(25 + 10, StringHelper.berechneStundenlohn("Sonntag", true, true)); + } + + @Test public void test_140_stundenlohn_normal_Nachtschicht() { + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Montag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Dienstag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Mittwoch", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Donnerstag", true, false)); + Assert.assertEquals(2 * 15, StringHelper.berechneStundenlohn("Freitag", true, false)); + Assert.assertEquals(2 * 20, StringHelper.berechneStundenlohn("Samstag", true, false)); + Assert.assertEquals(2 * 20, StringHelper.berechneStundenlohn("Sonntag", true, false)); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java new file mode 100644 index 0000000000000000000000000000000000000000..c80a827f094e2a0d5f4e340e57dc250332347a75 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/aufgabe2/Test_Artikel.java @@ -0,0 +1,109 @@ +package de.hdm_stuttgart.mi.sd1.test.aufgabe2; + + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Artikel; +import de.hdm_stuttgart.mi.sd1.test.helper.ReflectionHelper; +import org.junit.Assert; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +import de.hdm_stuttgart.mi.exam.unitmarking.ExaminationTestDefaults; +import de.hdm_stuttgart.mi.exam.unitmarking.Marking; + +import java.lang.reflect.InvocationTargetException; + +/** + * . + * + */ + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class Test_Artikel extends ExaminationTestDefaults { + + private final ReflectionHelper rHelper = new ReflectionHelper(); + + private Artikel fussBall, ball, puzzle, flummi; + + private void init() { + fussBall = newArtikel("Fußball", 234, 2250); + ball = newArtikel("Ball", 234, 1030); + puzzle = newArtikel("250 Teile Puzzle", 400, 780); + flummi = newArtikel("Flummi", 420, 89); + + } + + private Artikel newArtikel(final String artikelBezeichnung, final int artikelNummer, final int preis) { + try { + final String msg = rHelper.artikel_new_Bez_id_preis.getRecursiveMsg(); + Assert.assertNull(msg, msg); + + return rHelper.artikel_new_Bez_id_preis.constructor. + newInstance(artikelBezeichnung, artikelNummer, preis); + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException + | InvocationTargetException e) { + Assert.fail("Konnte »new Artikel(\"" + artikelBezeichnung + "\", " + artikelNummer + ", " + + preis + ")« nicht aufrufen."); + } + return null; + } + + @Test @Marking(points = 4) public void test_100_constructorDefined() { + final String msg = rHelper.artikel_new_Bez_id_preis.getRecursiveMsg(); + Assert.assertNull(msg, msg); + } + + @Test @Marking(points = 4) public void test_200_erzeugeArtikel() { + init(); + } + + @Test @Marking(points = 2) public void test_300_equalsAlien() { + init(); + Assert.assertNotEquals(fussBall, "Ball"); // Alien String Objekt + + } + + @Test public void test_305_equals() { + init(); + + Assert.assertFalse(fussBall.equals(null)); + + Assert.assertTrue(fussBall.equals(ball)); // Gleiche Artikelnummer + Assert.assertFalse(fussBall.equals(flummi)); // Ungleiche Artikelnummer + } + + @Test public void test_310_hashCode() { + init(); + Assert.assertEquals(fussBall.hashCode(), ball.hashCode()); + } + + @Test @Marking(points = 3) public void test_320_hashCodeQuality() { + + final int hashcode_1001; + { + final Artikel referenz = newArtikel("Dummy", 1001, 2250); + hashcode_1001 = referenz.hashCode(); + } + + int countEqual1000 = 0; + for (int i = 1; i <= 1000; i++) { + final Artikel a = newArtikel("Dummy", i, 2250); + if (hashcode_1001 == a.hashCode()) { + countEqual1000++; + } + } + Assert.assertTrue( countEqual1000 / 10. + "% identische Hash Werte: Very bad!", + countEqual1000 < 20); // Identische Hash Werte unter 2% + } + + @Test @Marking(points = 2) public void test_400_toString() { + init(); + Assert.assertEquals("Fußball, Artikelnummer 234 zu 22.50€", fussBall.toString()); + Assert.assertEquals("250 Teile Puzzle, Artikelnummer 400 zu 7.80€", puzzle.toString()); + } + + @Test @Marking(points = 3) public void test_500_toString_nurCent() { + init(); + Assert.assertEquals("Flummi, Artikelnummer 420 zu 0.89€", flummi.toString()); + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java new file mode 100644 index 0000000000000000000000000000000000000000..4d0cd153228a1e73a31c56d66bba239dc40cf294 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectClass.java @@ -0,0 +1,127 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.stream.Collectors; + + +public class ReflectClass<T> { + + public ReflectClass(final String className) { + this.className = className; + Class classTmp = null; + String tmpMsg = null; + try { + classTmp = Class.forName(className); + } catch (final ClassNotFoundException e) { + tmpMsg = "Die Klasse '" + className + "' wurde nicht gefunden:"; + } + classZ = classTmp; + msg = tmpMsg; + } + + ReflectClass(final Class<T> classZ) { + this.className = classZ.getName(); + this.classZ = classZ; + msg = null; + } + + final String className; + final Class<T> classZ; + public final String msg; + + /** + * @param arguments List of classes. + * @return Class names joined by ',', possibly stripped of "java.lang" component + */ + public static String formatArguments(final Class<?>[] arguments) { + + return Arrays.stream(arguments). + map(ReflectClass::normalizeClassname). + collect(Collectors.joining(", ")); + } + + /** + * @param classz Arbitrary class. + * @return The classname possible stripped of "java.lang" component. Fully qualified class names belonging + * to other packages remain untouched. + */ + private static String normalizeClassname(final Class<?> classz) { + final Package + javaDotLang = ReflectClass.class.getClassLoader().getDefinedPackage("java.lang"), + hostingPackage = classz.getPackage(); + + if (null == hostingPackage || !hostingPackage.equals(javaDotLang)) { + return classz.getName(); + } else { + return classz.getSimpleName(); + } + } + + /** + * @param classz Class whose attributes are to be retrieved. + * @return A string containing a comma separated list of all non-private attribute names + */ + public static String getNonPrivateAttributes(final Class<?> classz) { + + final Field[] fields = classz.getDeclaredFields(); + final StringBuilder results = new StringBuilder(); + boolean found = false; + for (final Field f : fields) { + if (0 == (Modifier.PRIVATE & f.getModifiers())) { + if (found) { + results.append(", "); + } + results.append(f.getName()); + found = true; + } + } + if (found) { + return results.toString(); + } + return null; + } + + /** + * Get modifier cleartext name according to + * https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/Modifier.html#field.summary + * + * @param modifier Type declaration modifier e.g. "abstract", "final", ... + * @return Clear text name e.g. "final" + */ + static public String getModifierString(final int modifier) { + + switch (modifier) { + case Modifier.ABSTRACT: + return "abstract"; + case Modifier.FINAL: + return "final"; + case Modifier.INTERFACE: + return "interface"; + case Modifier.NATIVE: + return "native"; + case Modifier.PRIVATE: + return "private"; + case Modifier.PROTECTED: + return "protected"; + case Modifier.PUBLIC: + return "public"; + case Modifier.STATIC: + return "static"; + case Modifier.STRICT: + return "strict"; + case Modifier.SYNCHRONIZED: + return "synchronized"; + case Modifier.TRANSIENT: + return "transient"; + case Modifier.VOLATILE: + return "volatile"; + + default: + return "Unknown modifier value " + modifier; + } + + } + +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java new file mode 100644 index 0000000000000000000000000000000000000000..cd5e3bdcae5bf83f2dbb24d9d56bb27e87b3d38d --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectConstructor.java @@ -0,0 +1,38 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Constructor; + +public class ReflectConstructor<T> { + + public ReflectConstructor(final ReflectClass<T> reflectClass, final Class<?>[] argumentMeta) { + this.definingClass = reflectClass; + Constructor<?> constructorTmp = null; + String tmpMsg = null; + if (null == reflectClass.classZ) { + tmpMsg = "Folgefehler: Klasse '" + reflectClass.className + "' nicht definiert"; + } else { + try { + constructorTmp = reflectClass.classZ.getConstructor(argumentMeta); + } catch (final NoSuchMethodException | SecurityException e) { + tmpMsg = "Kein Konstruktor '" + + reflectClass.classZ.getSimpleName() + "(" + + ReflectClass.formatArguments(argumentMeta) + + ")' in Klasse '" + + reflectClass.className + "' gefunden"; + } + } + constructor = (Constructor<T>) constructorTmp; + msg = tmpMsg; + } + public String getRecursiveMsg() { + if (null == definingClass.msg) { + return msg; + } else { + return "Folgefehler: " + definingClass.msg; + } + } + + public final ReflectClass<T> definingClass; + public final Constructor<T> constructor; + private final String msg; +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java new file mode 100644 index 0000000000000000000000000000000000000000..79e7e1e2ca1e51127df7a7342fdb5d662fd9d000 --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectMethod.java @@ -0,0 +1,124 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import java.lang.reflect.Method; + + +/** + * Describing a method to be instantiated by its string name within a given class + */ +public class ReflectMethod<T> { + + /** + * Metainfo about a method being defined in a given class. + * + * @param reflectClass Describing the class in question + * @param reflectMethodName The method's name. + * @param argumentMeta The method's arguments + */ + public ReflectMethod(final ReflectClass<T> reflectClass, final String reflectMethodName, final Class<?>[] argumentMeta) { + this.definingReflectClass = reflectClass; + Method methodTmp = null; + String tmpMsg = null; + if (null == reflectClass.classZ) { + tmpMsg = "Folgefehler: Klasse '" + reflectClass.className + "' nicht definiert"; + } else { + try { + methodTmp = reflectClass.classZ.getMethod(reflectMethodName, argumentMeta); + } catch (NoSuchMethodException | SecurityException e) { + tmpMsg = "Keine Methode '" + reflectMethodName + "(" + ")' in Klasse '" + reflectClass.className + "' gefunden"; + } + } + method = methodTmp; + msg = tmpMsg; + } + + /** + * Ausgangsklasse, in welcher die Methode vorhanden ist. + */ + public final ReflectClass<T> definingReflectClass; + + /** + * + */ + public final Method method; + private final String msg; + + + /** + * Providing error message in case the searched method was not found + * + * @return Explanation if method was not found, null otherwise + */ + public String getRecursiveErrorMsg() { + if (null == definingReflectClass.msg) { + return msg; + } else { + return "Folgefehler: " + definingReflectClass.msg; + } + } + + /** + * Assert whether the method is being defined in a given class. + * + * @param expectedClass Class to be examined for method definition. + * @return null if defined in expected class, error message otherwise + */ + public String assertIsDefinedIn(final String expectedClass) { + final Class<?> definingClass = method.getDeclaringClass(); + + if (expectedClass.equals(definingClass.getName())) { + return null; + } else { + return method.getName() +" ist in '" + definingClass.getName() + "' definiert, aber nicht in '" + + expectedClass + "'"; + } + } + + /** + * Assert whether the method is being defined in a given class. + * + * @param expectedClass Class to be examined for method definition. + * @return null if defined in expected class, error message otherwise + */ + public String assertIsDefinedIn(final Class<?> expectedClass) { + final Class<?> definingClass = method.getDeclaringClass(); + + if (expectedClass.equals(definingClass)) { + return null; + } else { + return method.getName() +" ist in '" + definingClass.getName() + "' definiert, aber nicht in '" + + expectedClass.getName() + "'"; + } + } + + /** + * Check for presence of mandatory modifier. + * + * @param modifier Modifier to be present. + * @return null if desired modifier is present, descriptive message otherwise. + */ + public String assertModifierIsPresent(final int modifier) { + + if (0 == (modifier & method.getModifiers())) { + return "Modifier '" + ReflectClass.getModifierString(modifier) + "' not present"; + } else { + return null; + } + } + + /** + * Check for presence of modifier. + * + * @param modifier Modifier to be present. + * @param msg informative message. + * @return null if desired modifier is present, descriptive message otherwise. + */ + public String assertModifierIsPresent(final int modifier, final String msg) { + + if (0 == (modifier & method.getModifiers())) { + return msg; + } else { + return null; + } + } +} \ No newline at end of file diff --git a/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java new file mode 100644 index 0000000000000000000000000000000000000000..45a138ea1c0efa0b4e97ab1f35327801ba1d338c --- /dev/null +++ b/Klausuren/Sd1/2018summer/Solve/src/test/java/de/hdm_stuttgart/mi/sd1/test/helper/ReflectionHelper.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sd1.test.helper; + +import de.hdm_stuttgart.mi.sd1.aufgabe2.Artikel; + +public class ReflectionHelper { + + public ReflectionHelper() { + + // Ersatzteil + // + artikel_Klasse = new ReflectClass(Artikel.class); + artikel_new_Bez_id_preis = new ReflectConstructor( + artikel_Klasse, + new Class[]{String.class, int.class, int.class} + ); + artikel_toString = new ReflectMethod(artikel_Klasse, "toString", new Class[]{}); + artikel_equals = new ReflectMethod(artikel_Klasse, "equals", new Class[]{Object.class}); + } + + // Ersatzteil + // + public final ReflectClass<Artikel> artikel_Klasse; + public final ReflectConstructor<Artikel> artikel_new_Bez_id_preis; + public final ReflectMethod artikel_toString, artikel_equals; + +} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/.gitignore b/Klausuren/Sda1/2018Summer/Exam/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9b36bc511f68d6e52aeb8b8e7c5ddfe38ed74218 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/.gitignore @@ -0,0 +1,54 @@ +/target/ +/.settings/ +.classpath +.project +dependency-reduced-pom.xml +*.log + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries + +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.xml +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml + +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries + +# CMake +cmake-build-debug/ + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +*.iws + + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties diff --git a/Klausuren/Sda1/2018Summer/Exam/Schema/bib.xsd b/Klausuren/Sda1/2018Summer/Exam/Schema/bib.xsd new file mode 100644 index 0000000000000000000000000000000000000000..6ee0fd19647995faa229a0309658ffc95c0f496d --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/Schema/bib.xsd @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > + + <xs:element name="bibliography"> + <xs:complexType> + <xs:sequence> + <!-- TODO: Implement me! --> + </xs:sequence> + </xs:complexType> + + </xs:element> + +</xs:schema> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/Schema/sampledata.xml b/Klausuren/Sda1/2018Summer/Exam/Schema/sampledata.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c02b30f5fb8f25bc63e113085b59ba1b9498116 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/Schema/sampledata.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + <book id="goossens93" publisher="addWesley" year="1993"> + <title>The LaTeX Companion</title> + <author>Michel Goossens</author> + <author>Frank Mittelbach</author> + <author>Alexander Samarin</author> + </book> + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <!-- Optional: <author>...</author> --> + </website> + +</bibliography> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/Schema/schema.sql b/Klausuren/Sda1/2018Summer/Exam/Schema/schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..4ea7a3f3f14e38be092296e4b439f68f6821c0e0 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/Schema/schema.sql @@ -0,0 +1,21 @@ +DROP TABLE IF EXISTS Competition; +DROP TABLE IF EXISTS Athlete; + +/* TODO add schema here */ + +INSERT INTO Athlete VALUES(1, 'Jesse Owens'); +INSERT INTO Athlete VALUES(2, 'Tim Culver'); +INSERT INTO Athlete VALUES(3, 'Sid Gascoine'); +INSERT INTO Athlete VALUES(4, 'John Hooker'); +INSERT INTO Athlete VALUES(5, 'Brad Duncan'); + +/* 100 metre race results */ +INSERT INTO Competition VALUES(1, 1, 10.23, 0); /* Jesse Owens */ +INSERT INTO Competition VALUES(2, 2, 11.55, 0); /* Tim Culver */ +INSERT INTO Competition VALUES(3, 3, 11.94, 0); /* Sid Gascoine */ +INSERT INTO Competition VALUES(4, 4, 10.02, 0); /* John Hooker */ +INSERT INTO Competition VALUES(5, 5, 10.84, 0); /* Brad Duncan */ +INSERT INTO Competition VALUES(6, 2, 10.02, 0); /* Tim Culver */ +INSERT INTO Competition VALUES(7, 3, 10.49, 0); /* Sid Gascoine */ +INSERT INTO Competition VALUES(8, 2, 9.35, 1); /* Tim Culver */ + diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0100_valid_minimum.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0100_valid_minimum.xml new file mode 100644 index 0000000000000000000000000000000000000000..6fe9ce4986a4406315e11780db1a1a32564a0b5a --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0100_valid_minimum.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" /> + +<?xmlTest points = "1" + expectedToBeValid = "true" ?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0200_valid_noPublisher.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0200_valid_noPublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..d94f266bac2b9c8a5366bbf05142c10e4596b30b --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0200_valid_noPublisher.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers/> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0210_valid_singlePublisher.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0210_valid_singlePublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..03b2983550a4e5abc8f823fc63c65557efbdd004 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0210_valid_singlePublisher.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0230_valid_multiplePublisher.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0230_valid_multiplePublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..2087c1d5e5e578eda940395ad2dbbc78c543abea --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0230_valid_multiplePublisher.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + + <publisher id="two"> + <name>Publisher 1</name> + <city>City 2</city> + </publisher> + + <publisher id="three"> + <name>Publisher 2</name> + <city>City 1</city> + </publisher> + + </publishers> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0240_invalid_duplicatePublisherId.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0240_invalid_duplicatePublisherId.xml new file mode 100644 index 0000000000000000000000000000000000000000..5be0d6a319018b66c3123b8a17ee952c480b6f12 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0240_invalid_duplicatePublisherId.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + <publisher id="one"> <!-- Duplicate @id value »one« --> + <name>Publisher 2</name> + <city>City 2</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml new file mode 100644 index 0000000000000000000000000000000000000000..bb87c7ad6649e1514cccc5beff691cb71840d7a6 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + <publisher id="two"> + <!-- Error: duplicate both <name> and <city> --> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0260_invalid_publisherLevel.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0260_invalid_publisherLevel.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0381013bff9f0a8cc7685e951bc80d6545cba59 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0260_invalid_publisherLevel.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <!-- Wrong level: Only <publishers> allowed here --> + <publisher id="unknown">Nobody</publisher> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0300_valid_books.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0300_valid_books.xml new file mode 100644 index 0000000000000000000000000000000000000000..e885646f7d3dda58cb88391849e556803db14ffd --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0300_valid_books.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <book id="ab95" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <author>Kim C. Border</author> + </book> + + <book id="goossens93" publisher="addWesley" year="1993"> + <title>The LaTeX Companion</title> + <author>Michel Goossens</author> + <author>Frank Mittelbach</author> + <author>Alexander Samarin</author> + </book> + + <book id="ab96" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <editor>Kim C. Border</editor> + </book> + + <book id="ab97" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0310_invalid_bookNoTitle.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0310_invalid_bookNoTitle.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ed105de37542a2ad72ab9868ce1f35c2db8e4b5 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0310_invalid_bookNoTitle.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <!-- Error: Missing <title> --> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0320_invalid_bookNoAuthor.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0320_invalid_bookNoAuthor.xml new file mode 100644 index 0000000000000000000000000000000000000000..6cc7372ee5831ba11a48cc3496f13a44d717d62c --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0320_invalid_bookNoAuthor.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <!-- Neither <author> nor <editor> --> + </book> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0400_valid_websites.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0400_valid_websites.xml new file mode 100644 index 0000000000000000000000000000000000000000..db66a0739072850d5ed93efd6afab28830928a59 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0400_valid_websites.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + <website id="bibtex2" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <author>Unknown</author> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0410_invalid_websiteDateViolation.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0410_invalid_websiteDateViolation.xml new file mode 100644 index 0000000000000000000000000000000000000000..602bb91ef2beeb1e6e0c4b76664c22f8c854b570 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0410_invalid_websiteDateViolation.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="15.7.2018"> <!-- Error: Wrong date format --> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0420_invalid_websiteMissingAccessDate.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0420_invalid_websiteMissingAccessDate.xml new file mode 100644 index 0000000000000000000000000000000000000000..46653e14df4043873a14cd848ba2e1bca577a07e --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0420_invalid_websiteMissingAccessDate.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex"> <!-- Error: missing access date --> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0430_invalid_websiteMissingUrl.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0430_invalid_websiteMissingUrl.xml new file mode 100644 index 0000000000000000000000000000000000000000..0dac7dc4dde01e9a2802d7bca5184358aabf5fc3 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0430_invalid_websiteMissingUrl.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <!-- Error: Missing <uri> --> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml new file mode 100644 index 0000000000000000000000000000000000000000..15462cc3eb8618282b68901576d0f9b6d3756d7d --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <!-- Error: Invalid URI --> + <uri>Jodel dodel düüh</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0500_valid_booksWebsites.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0500_valid_booksWebsites.xml new file mode 100644 index 0000000000000000000000000000000000000000..79968314203f474231f7346b507403d2c27f8da2 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0500_valid_booksWebsites.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + <book id="ab95" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <author>Kim C. Border</author> + </book> + + <book id="ab96" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <editor>Kim C. Border</editor> + </book> + + <book id="ab97" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + <website id="bibtex2" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <author>Unknown</author> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0510_invalid_bookDuplicateId.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0510_invalid_bookDuplicateId.xml new file mode 100644 index 0000000000000000000000000000000000000000..149d73269a7e8da7f1608c16118ad7b1614f8f68 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0510_invalid_bookDuplicateId.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <!-- Error: Duplicate @id value --> + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0515_invalid_bookYear.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0515_invalid_bookYear.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0171e495f7ded16bec7c50b9d2affc23d4f3319 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0515_invalid_bookYear.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="nineteenhundred"> <!-- Error: @year not an integer value --> + + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0520_invalid_bibDuplicateId.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0520_invalid_bibDuplicateId.xml new file mode 100644 index 0000000000000000000000000000000000000000..08dd100895aaeb414d37654d426f0253f34a5b22 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0520_invalid_bibDuplicateId.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="bibtex" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <!-- Error: Duplicate @id value --> + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0600_invalid_bookInvalidPublisher.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0600_invalid_bookInvalidPublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7ae42ca500debe40296b8accee2fa59ed95c898 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0600_invalid_bookInvalidPublisher.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <!-- Error: Invalid reference »spring« rather than »springer« --> + <book id="ab92" publisher="spring" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0700_valid_bibPublisherIdCompat.xml b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0700_valid_bibPublisherIdCompat.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfe447b1af9c616dd64e48f344c201af7caad758 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/SchemaTest/0700_valid_bibPublisherIdCompat.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + + </publishers> + + <!-- Should not interfere with <publisher id="springer"> entry --> + <book id="springer" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <!-- Should not interfere with <publisher id="addWesley"> entry --> + <website id="addWesley" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <!-- Optional: <author>...</author> --> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Exam/pom.xml b/Klausuren/Sda1/2018Summer/Exam/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..ceef14ecb676e294cc040a42b71535d73d704f34 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/pom.xml @@ -0,0 +1,166 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm_stuttgart.mi.sda1</groupId> + <artifactId>exam</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>Exam</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <oxygenxml.version>20.1.0.0</oxygenxml.version> + </properties> + + <repositories> + + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> + </repository> + <repository> + <id>oxygenxml-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/oxygen</url> + </repository> + </repositories> + + <dependencies> + + <dependency> + <groupId>com.oxygenxml</groupId> + <artifactId>oxygen-xercesImpl</artifactId> + <version>${oxygenxml.version}</version> + </dependency> + + <dependency> + <groupId>com.oxygenxml</groupId> + <artifactId>oxygen</artifactId> + <version>${oxygenxml.version}</version> + </dependency> + + <!-- Still needed to keep oxygenxml happy using legacy logging --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + + <dependency> + <groupId>com.rackspace.eclipse.webtools.sourceediting</groupId> + <artifactId>org.eclipse.wst.xml.xpath2.processor</artifactId> + <version>2.1.100</version> + </dependency> + + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>6.0.6</version> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.10.0</version> + </dependency> + + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + <version>2.3.0</version> + </dependency> + + <!-- Required for executable jar generation to avoid ClassNotFoundException: + com.fasterxml.jackson.core.type.TypeReference and similar dependency problems. --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.9.3</version> + </dependency> + + <dependency> + <groupId>org.jdom</groupId> + <artifactId>jdom2</artifactId> + <version>2.0.6</version> + </dependency> + + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.1.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.9</source> + <target>1.9</target> + <compilerArgument>-proc:none</compilerArgument> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.1</version> + <configuration> + <links> + <link>https://docs.oracle.com/javase/10/docs/api</link> + </links> + <additionalJOptions> + <additionalJOption>-html5</additionalJOption> + </additionalJOptions> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sda1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/assembly/assembly.xml b/Klausuren/Sda1/2018Summer/Exam/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java b/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java new file mode 100644 index 0000000000000000000000000000000000000000..bc1497ff5988006d1a10a92af7f5e10140c3a2f5 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java @@ -0,0 +1,14 @@ + package de.hdm_stuttgart.mi.sda1; + + + import de.hdm_stuttgart.mi.sda1.impl.DbRead; + + public class AllResults { + + public static void main( String[] args ) { + + final DbRead sports = new DbRead(); + + sports.toHtml(System.out); + } + } \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java b/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java new file mode 100644 index 0000000000000000000000000000000000000000..55d8dd776e20b3144a38cae1054bdb024950b8ac --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java @@ -0,0 +1,43 @@ + package de.hdm_stuttgart.mi.sda1.impl; + + import org.jdom2.Element; + import org.jdom2.output.Format; + import org.jdom2.output.XMLOutputter; + + import java.io.IOException; + import java.io.OutputStream; + import java.sql.Connection; + import java.sql.DriverManager; + import java.sql.SQLException; + + public class DbRead { + + public final Element html; + + private final Connection conn; + + public DbRead() { + html = new Element("html"); + + Connection connTmp = null; + try { + connTmp = DriverManager.getConnection( + "jdbc:mysql://localhost/hdm?serverTimezone=UTC", "hdmuser", "XYZ"); + } catch (SQLException e) { + System.err.println("Unable to establish connection: " + e); + System.exit(1); + } + conn = connTmp; + } + + public void toHtml(final OutputStream out) { + + final XMLOutputter printer = + new XMLOutputter(Format.getPrettyFormat()); + try { + printer.output(html, out); + } catch (final IOException e) { + System.err.println("Unable to write output: " + e); + } + } + } \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/src/main/resources/log4j2.xml b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7a0dcb779806532b5292813bdad292d31c147b2 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/main/resources/log4j2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + <!-- You may want to enable more detailed hibernate logging --> + <Logger name="org.hibernate" level="error"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="error"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java new file mode 100644 index 0000000000000000000000000000000000000000..82e54951d870ef7ba64a650392f1cd0746d8f292 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Exam/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.unitmarking.xsd.InstanceSetEvaluation; +import org.junit.Assert; +import org.junit.Test; + +/** + * Unit test for an XML instance set. CLI by: + * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore SchemaTest + */ +@SuppressWarnings("static-method") +public class SchemaTest { + /** + * Testing a suite of XML instances. + */ + @Test + public void testXmlInstanceSet() { + + final InstanceSetEvaluation ise = + new InstanceSetEvaluation("SchemaTest", "Schema/bib.xsd"); + + System.out.println(ise.getMessages()); + + Assert.assertTrue(ise.getErrorMessages(), ise.allTestsSucceeded); + } +} \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/.gitignore b/Klausuren/Sda1/2018Summer/Solve/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..9b36bc511f68d6e52aeb8b8e7c5ddfe38ed74218 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/.gitignore @@ -0,0 +1,54 @@ +/target/ +/.settings/ +.classpath +.project +dependency-reduced-pom.xml +*.log + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/dictionaries + +# Sensitive or high-churn files: +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.xml +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml + +# Gradle: +.idea/**/gradle.xml +.idea/**/libraries + +# CMake +cmake-build-debug/ + +# Mongo Explorer plugin: +.idea/**/mongoSettings.xml + +*.iws + + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties diff --git a/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml b/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml new file mode 100644 index 0000000000000000000000000000000000000000..54633021e12a785191b5ecf2156979b1d6c5e4e2 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/Doc/exam.xml @@ -0,0 +1,773 @@ +<?xml version="1.0" encoding="UTF-8"?> +<book version="5.0" xml:id="klausur_SoSe_2017" xml:lang="en" + xmlns="http://docbook.org/ns/docbook" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xila="http://www.w3.org/2001/XInclude/local-attributes" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns:trans="http://docbook.org/ns/transclusion" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:m="http://www.w3.org/1998/Math/MathML" + xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:db="http://docbook.org/ns/docbook"> + <info> + <title/> + + <author> + <personname/> + </author> + + <pubdate/> + </info> + + <chapter xml:id="task1"> + <title>A bibliography database</title> + + <!-- Upload zip archive. Applies to related execises as well. --> + + <section xml:id="aufgabe1_prepare"> + <title>Preparations</title> + + <para>Download and unzip the above file <filename>exam.zip</filename> + and import the resulting <filename>Exam</filename> folder as a Maven + project into your IDE.</para> + </section> + + <section xml:id="aufgabe1_descr"> + <title>Description</title> + + <para>Consider a bibliography database as in your project's sample data + file <filename>Schema/sampledata.xml</filename>:</para> + + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="xml"><bibliography ... > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <editor>Kim C. Border</editor> + </book> + + <book id="goossens93" publisher="addWesley" year="1993"> + <title>The LaTeX Companion</title> + <editor>Michel Goossens</editor> + <author>Frank Mittelbach</author> + <author>Alexander Samarin</author> + </book> + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <!-- Optional: <author>...</author> --> + </website> + +</bibliography></programlisting></td> + + <td valign="top"><para>Data integrity rules:</para><orderedlist> + <listitem> + <para><tag class="starttag">bibliography</tag> and <tag + class="starttag">publishers</tag> may be empty.</para> + </listitem> + + <listitem> + <para>Each <tag class="starttag">publisher</tag> must have a + (<tag class="starttag">name</tag>, <tag + class="starttag">city</tag>) combination being unique within + <tag class="starttag">publishers</tag>. Hint: XML schema + allows for multiple <tag class="starttag">xs:field</tag> + elements.</para> + </listitem> + + <listitem> + <para>The set of <code>@id</code> values of <tag + class="starttag">publisher</tag> entries must be unique within + <tag class="starttag">publishers</tag>.</para> + </listitem> + + <listitem> + <para>The set of <code>@id</code> values of <tag + class="starttag">book</tag> and <tag + class="starttag">website</tag> entries must be unique within + <tag class="starttag">bibliography</tag>.</para> + </listitem> + + <listitem> + <para>A <tag class="starttag">book</tag> entry must have a + <tag class="starttag">title</tag> and at least one <tag + class="starttag">author</tag> or <tag + class="starttag">editor</tag> child.</para> + </listitem> + + <listitem> + <para>A <tag class="starttag">book</tag> + <code>@publisher</code>'s attribute value must refer to an + existing <tag class="starttag">publisher</tag> + <code>@id</code> attribute value.</para> + </listitem> + + <listitem> + <para>A <tag class="starttag">book</tag> <code>@year</code>'s + attribute must be of integer value.</para> + </listitem> + + <listitem> + <para>A <tag class="starttag">website</tag> must have both + <tag class="starttag">uri</tag> and <tag + class="starttag">title</tag> and may have <tag + class="starttag">author</tag> children.</para> + </listitem> + + <listitem> + <para><tag class="starttag">uri</tag> content must begin + either with <code>http://</code> or <code>https://</code>. + Hint: Use <code>http[s]?://.+</code>.</para> + </listitem> + + <listitem> + <para>The <code>@access</code> date attribute value must be + specified with respect to English locale. Hint: A useful + standard schema type exists.</para> + </listitem> + </orderedlist></td> + </tr> + </informaltable> + + <para>Complete the schema implementation in + <filename>Schema/bib.xsd</filename>. <productname>Junit</productname> + execution of + <classname>de.hdm_stuttgart.mi.sda1.test.ex1.SchemaTest</classname> + loads all unit tests based on files residing in your project's folder + <filename>SchemaTest</filename>. In turn you receive your number of + points reached so far including detailed hints about failed + tests.</para> + </section> + + <section xml:id="aufgabe1_task"> + <title>Tasks</title> + + <para>Implement the yet incomplete XML Schema file + <filename>Schema/bib.xsd</filename> modeling all mentioned integrity + rules:</para> + + <orderedlist> + <listitem> + <para>The folder <filename>SchemaTest</filename> contains sample + files testing your schema for correctness.</para> + </listitem> + + <listitem> + <para>Executing + <classname>de.hdm_stuttgart.mi.sda1.test.ex1.SchemaTest</classname> + as a Java application indicates which test documents in + <filename>SchemaTest</filename> yet fail the expected outcome being + either <quote>valid</quote> of <quote>invalid</quote>. You also get + the number of points reached so far.</para> + </listitem> + + <listitem> + <para>Open all XML related files in + <productname>Oxygenxml</productname> offering better schema support + than IntelliJ.</para> + </listitem> + </orderedlist> + + <tip> + <itemizedlist> + <listitem> + <para>Don't touch the unit test defines in your project's + <filename>SchemaTest</filename> folder: Your automated tests may + end up throwing meaningless exceptions.</para> + </listitem> + + <listitem> + <para>Edit <filename>Schema/bib.xsd</filename> by small steps and + always execute the tests: In case of spoiling the + <quote>undo</quote> operation is your friend.</para> + </listitem> + </itemizedlist> + </tip> + </section> + + <section version="5.1" xml:id="uploadFirst" xml:lang="de"> + <title>Project upload</title> + + <para>Hit »File« --> »Export to Zip File« in IDEA archiving your + project as <filename>solution-1.zip</filename>. Then enter your ILIAS + tab, hit <quote>choose</quote> selecting + <filename>solution-1.zip</filename> and subsequently + <quote>upload</quote>. Do not forget to advance to the next question to + actually save the current question. Common pitfalls:</para> + + <itemizedlist> + <listitem> + <para>Upload the right archive: Avoid choosing the original + <filename>exam.zip</filename> skeleton.</para> + </listitem> + + <listitem> + <para>Watch out for <filename>solution_1.zip</filename> actually + being visible in the examination system.</para> + </listitem> + + <listitem> + <para>You may upload multiple versions i.e. + <filename>solution_2.zip</filename> etc.. Only your least upload + will become subject to marking.</para> + </listitem> + </itemizedlist> + + <para>Be careful:</para> + + <itemizedlist> + <listitem> + <para>Check your input at examination end for completeness.</para> + </listitem> + + <listitem> + <para>Projects residing only on your local workstation cannot be + recovered after exam termination.</para> + </listitem> + </itemizedlist> + </section> + </chapter> + + <chapter xml:id="task2"> + <title>Relational database HTML export</title> + + <section xml:id="task2_prepare"> + <title>Preparation</title> + + <para>If you already started the first exercise just continue working on + your project using IntelliJ. Otherwise read the first exercise regarding + the skeleton project import.</para> + + <para>Configuring a <productname>Mysql</productname> type database + connection in <productname>Intellij</productname> (»Views« --> »Tool + Windows« --> »Database«) requires:</para> + + <informaltable border="0"> + <tr> + <td valign="top"><itemizedlist> + <listitem> + <para>Host: <emphasis role="bold">localhost</emphasis></para> + </listitem> + + <listitem> + <para>Database: <emphasis role="bold">hdm</emphasis></para> + </listitem> + </itemizedlist></td> + + <td valign="top"><itemizedlist> + <listitem> + <para>User: <emphasis role="bold">hdmuser</emphasis></para> + </listitem> + + <listitem> + <para>Password: <emphasis role="bold">XYZ</emphasis></para> + </listitem> + </itemizedlist></td> + </tr> + </informaltable> + </section> + + <section xml:id="task2_descr"> + <title>Description</title> + + <para>Consider two tables representing athletes and their corresponding + 100 metre race competition results:</para> + + <informaltable border="0"> + <colgroup width="28%"/> + + <colgroup width="3%"/> + + <colgroup width="69%"/> + + <tr> + <td valign="top"><informaltable border="1"> + <colgroup width="13%"/> + + <colgroup width="87%"/> + + <tr> + <td colspan="2">Table <code>Athlete</code></td> + </tr> + + <tr> + <td><code>id</code></td> + + <td><code>fullName</code></td> + </tr> + + <tr> + <td><code>1</code></td> + + <td><code>Jesse Owens</code></td> + </tr> + + <tr> + <td><code>2</code></td> + + <td><code>Tim Culver</code></td> + </tr> + + <tr> + <td><code>3</code></td> + + <td><code>Sid Gascoine</code></td> + </tr> + + <tr> + <td><code>4</code></td> + + <td><code>John Hooker</code></td> + </tr> + + <tr> + <td><code>5</code></td> + + <td><code>Brad Duncan</code></td> + </tr> + </informaltable></td> + + <td>. .</td> + + <td valign="top"><informaltable border="1"> + <tr> + <td colspan="4">Table <code>Competition</code></td> + </tr> + + <tr> + <td><code>id</code></td> + + <td><code>athlete</code></td> + + <td><code>time</code></td> + + <td><code>badStart</code></td> + </tr> + + <tr> + <td><code>1</code></td> + + <td><code>1</code></td> + + <td><code>10.23</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>2</code></td> + + <td><code>2</code></td> + + <td><code>11.55</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>3</code></td> + + <td><code>3</code></td> + + <td><code>11.94</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>4</code></td> + + <td><code>4</code></td> + + <td><code>10.02</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>5</code></td> + + <td><code>5</code></td> + + <td><code>10.84</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>6</code></td> + + <td><code>2</code></td> + + <td><code>10.02</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>7</code></td> + + <td><code>3</code></td> + + <td><code>10.49</code></td> + + <td><code>0</code></td> + </tr> + + <tr> + <td><code>8</code></td> + + <td><code>2</code></td> + + <td><code>9.35</code></td> + + <td><code>1</code></td> + </tr> + </informaltable></td> + </tr> + </informaltable> + + <para>Explanations and hints:</para> + + <orderedlist> + <listitem> + <para>Each <code>Athlete</code> has a name and a unique + <code>id</code>.</para> + </listitem> + + <listitem> + <para>The <code>id</code> column in <code>Competition</code> defines + the order of athlete's competition attempts.</para> + </listitem> + + <listitem> + <para>The <code>Competition.athlete</code> column refers to the + corresponding <code>Athlete.id</code> value identifying the athlete + in question.</para> + </listitem> + + <listitem> + <para>Athletes may appear multiple times in <code>Competition</code> + referring to multiple competition attempts.</para> + </listitem> + + <listitem> + <para>All but the very last <code>Competition</code> sample records + have a <code>badStart</code> value of 0 indicating a proper start. A + <code>badStart</code> value different from 0 indicates a start + failure. Note: <productname>Mysql</productname> allows for type + boolean being an alias for type <code>bit</code> representing 0 and + 1.</para> + </listitem> + </orderedlist> + + <para><filename>Schema/schema.sql</filename> already contains INSERT + statements corresponding to the above sample data.</para> + </section> + + <section xml:id="task2_tasks"> + <title>Tasks</title> + + <para>Every task adds to points being reached.</para> + + <orderedlist> + <listitem> + <para>Create a suitable database schema prior to and corresponding + to the already existing <code>INSERT</code> statements in + <filename>Schema/schema.sql</filename> representing the informally + mentioned constraints.</para> + + <para>Execute the <code>INSERT</code> statements both as proof of + concept and with respect to subsequent tasks.</para> + </listitem> + + <listitem> + <para><classname>Class + de.hdm_stuttgart.mi.sda1.AllResults</classname> already references a + fully configured <productname>JDBC</productname> connection. On + execution you'll see a single <tag class="starttag">html</tag> tag + being created.</para> + + <para>Extend the underlying classes to create the subsequent HTML + output derived from your <productname>Mysql</productname> database's + content. Competition results shall be ordered first by ascending + time and second by athlete's name. Red background rows indicate bad + start attempts:</para> + + <informaltable border="0"> + <colgroup width="24%"/> + + <colgroup width="3%"/> + + <colgroup width="73%"/> + + <tr> + <td valign="top"><programlisting language="xml"><html> + <head><title>Results</title></head> + <body> + <table> + <tr> + <th>Rank</th> + <th>Name</th> + <th>Time</th> + </tr> + <tr style="background: red;"> + <td>1</td> + <td>Tim Culver</td> + <td>9.35</td> + </tr> + ... + </table> + </body> +</html></programlisting></td> + + <td>. .</td> + + <td valign="top"><para>Pseudo outline HTML representation, red + background indicating bad starts not to be displayed for + technical reasons, using bold style + instead:</para><informaltable border="1"> + <colgroup width="15%"/> + + <colgroup width="41%"/> + + <colgroup width="44%"/> + + <tr> + <td>Rank</td> + + <td>Name</td> + + <td>Time / seconds</td> + </tr> + + <tr> + <td><emphasis role="red">1</emphasis></td> + + <td><emphasis role="red">Tim Culver</emphasis></td> + + <td><emphasis role="red">10.23</emphasis></td> + </tr> + + <tr> + <td><code>2</code></td> + + <td><code>John Hooker</code></td> + + <td><code>10.02</code></td> + </tr> + + <tr> + <td><code>3</code></td> + + <td><code>Tim Culver</code></td> + + <td><code>10.02</code></td> + </tr> + + <tr> + <td><code>4</code></td> + + <td><code>Jesse Owens</code></td> + + <td><code>10.23</code></td> + </tr> + + <tr> + <td><code>5</code></td> + + <td><code>Sid Gascoine</code></td> + + <td><code>10.49</code></td> + </tr> + + <tr> + <td><code>6</code></td> + + <td><code>Brad Duncan</code></td> + + <td><code>10.84</code></td> + </tr> + + <tr> + <td><code>7</code></td> + + <td><code>Tim Culver</code></td> + + <td><code>11.55</code></td> + </tr> + + <tr> + <td><code>8</code></td> + + <td><code>Sid Gascoine</code></td> + + <td><code>11.94</code></td> + </tr> + </informaltable></td> + </tr> + </informaltable> + + <para>The SQL sample data is only intended for illustration + purposes. Your application shall work accordingly when reading + similar but different data sets.</para> + + <tip> + <itemizedlist> + <listitem> + <para>Use a <link + xlink:href="https://www.w3schools.com/sql/sql_join.asp">Join</link>.</para> + </listitem> + + <listitem> + <para>Create the »Rank« column values inside your Java + application rather than using SQL.</para> + </listitem> + </itemizedlist> + </tip> + </listitem> + + <listitem> + <para>The previous table contains both duplicate athlete attempts + and bad starts. We are looking for a »final result« table containing + only the fastest and at the same time valid run of each athlete + eliminating bad starts:</para> + + <informaltable border="0"> + <colgroup width="29%"/> + + <colgroup width="5%"/> + + <colgroup width="66%"/> + + <tr> + <td valign="top"><programlisting language="xml"><table> + <tr> + <th>Rank</th> + <th>Name</th> + <th>Time / seconds</th> + </tr> + <tr> + <td>1</td> + <td>John Hooker</td> + <td>10.02</td> + </tr> + ... +</table>...</programlisting></td> + + <td>. .</td> + + <td valign="top"><para>Pseudo outline + representation:</para><informaltable border="1"> + <colgroup width="15%"/> + + <colgroup width="41%"/> + + <colgroup width="44%"/> + + <tr> + <td>Rank</td> + + <td>Name</td> + + <td>Time / seconds</td> + </tr> + + <tr> + <td><code>1</code></td> + + <td><code>John Hooker</code></td> + + <td><code>10.02</code></td> + </tr> + + <tr> + <td><code>2</code></td> + + <td><code>Tim Culver</code></td> + + <td><code>10.02</code></td> + </tr> + + <tr> + <td><code>3</code></td> + + <td><code>Jesse Owens</code></td> + + <td><code>10.23</code></td> + </tr> + + <tr> + <td><code>4</code></td> + + <td><code>Sid Gascoine</code></td> + + <td><code>10.49</code></td> + </tr> + + <tr> + <td><code>5</code></td> + + <td><code>Brad Duncan</code></td> + + <td><code>10.84</code></td> + </tr> + </informaltable></td> + </tr> + </informaltable> + + <para>Create a suitable executable class + <classname>de.hdm_stuttgart.mi.sda1.FinalResults</classname>.</para> + + <tip> + <para>Rather than fiddling with minimum (best) time values in Java + you may solve this problem on SQL level using <link + xlink:href="https://www.w3schools.com/sql/sql_groupby.asp">SELECT + ... GROUP BY</link> in conjunction with the <link + xlink:href="https://www.w3schools.com/sql/sql_min_max.asp">min() + aggregate function</link> choosing the least time of each athlete. + Use a <link + xlink:href="https://www.w3schools.com/sql/sql_alias.asp">column + name alias</link> for renaming the aggregate column's name.</para> + </tip> + </listitem> + </orderedlist> + </section> + + <section version="5.1" xml:id="uploadFollow" xml:lang="de"> + <title>Solution upload</title> + + <para>Upload your project using the previous exercise. Enter either of + the following two texts:</para> + + <itemizedlist> + <listitem> + <para>I'm expecting points for my work on the current + exercise.</para> + </listitem> + + <listitem> + <para>I did not work on this exercise.</para> + </listitem> + </itemizedlist> + + <para>You may as well add other marking related comments.</para> + </section> + </chapter> +</book> diff --git a/Klausuren/Sda1/2018Summer/Solve/Schema/bib.xsd b/Klausuren/Sda1/2018Summer/Solve/Schema/bib.xsd new file mode 100644 index 0000000000000000000000000000000000000000..0a532d7ceb0c294bcfbce17f6f0f3f33a121062b --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/Schema/bib.xsd @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="UTF-8"?> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > + + <xs:attribute name="id" type="xs:string"/> + + <xs:element name="title" type="xs:string"/> + <xs:element name="author" type="xs:string"/> + <xs:element name="editor" type="xs:string"/> + + + <xs:element name="bibliography"> + <xs:complexType> + <xs:sequence> + <xs:element ref="publishers" minOccurs="0"/> + <xs:choice minOccurs="0" maxOccurs="unbounded"> + <xs:element ref="book"/> + <xs:element ref="website"/> + </xs:choice> + </xs:sequence> + </xs:complexType> + + <xs:key name="uniquePublisher"> + <xs:selector xpath="publishers/publisher"/> + <xs:field xpath="@id"/> + </xs:key> + + <xs:key name="uniquePublisherNameCity"> + <xs:selector xpath="publishers/publisher"/> + <xs:field xpath="name"/> + <xs:field xpath="city"/> + </xs:key> + + <xs:key name="uniquePublicationId"> + <xs:selector xpath="book|website"/> + <xs:field xpath="@id"/> + </xs:key> + + <xs:keyref refer="uniquePublisher" name="bookToPublisher"> + <xs:selector xpath="book"/> + <xs:field xpath="@publisher"/> + </xs:keyref> + + </xs:element> + + <xs:element name="book"> + <xs:complexType> + <xs:sequence> + <xs:element ref="title"/> + <xs:choice minOccurs="1" maxOccurs="unbounded"> + <xs:element ref="author"/> + <xs:element ref="editor"/> + </xs:choice> + </xs:sequence> + <xs:attribute ref="id" use="required"/> + <xs:attribute name="publisher" type="xs:string" use="required"/> + <xs:attribute name="year" type="xs:integer" use="required"/> + </xs:complexType> + </xs:element> + + <xs:element name="website"> + <xs:complexType> + <xs:sequence> + <xs:element name="uri" > + <xs:simpleType> + <xs:restriction base="xs:anyURI"> + <xs:pattern value="http[s]?://.+"></xs:pattern> + </xs:restriction> + </xs:simpleType> + </xs:element> + <xs:element ref="title"/> + <xs:element ref="author" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + <xs:attribute ref="id" use="required"/> + <xs:attribute name="access" use="required" type="xs:date"/> + + </xs:complexType> + </xs:element> + + <xs:element name="publishers"> + <xs:complexType> + <xs:sequence> + <xs:element ref="publisher" minOccurs="0" maxOccurs="unbounded"/> + </xs:sequence> + </xs:complexType> + </xs:element> + + <xs:element name="publisher"> + <xs:complexType> + <xs:sequence> + <xs:element name="name" type="xs:string"/> + <xs:element name="city" type="xs:string"/> + </xs:sequence> + <xs:attribute ref="id" use="required"/> + </xs:complexType> + </xs:element> + +</xs:schema> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/Schema/sampledata.xml b/Klausuren/Sda1/2018Summer/Solve/Schema/sampledata.xml new file mode 100644 index 0000000000000000000000000000000000000000..0c02b30f5fb8f25bc63e113085b59ba1b9498116 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/Schema/sampledata.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + <book id="goossens93" publisher="addWesley" year="1993"> + <title>The LaTeX Companion</title> + <author>Michel Goossens</author> + <author>Frank Mittelbach</author> + <author>Alexander Samarin</author> + </book> + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <!-- Optional: <author>...</author> --> + </website> + +</bibliography> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/Schema/schema.sql b/Klausuren/Sda1/2018Summer/Solve/Schema/schema.sql new file mode 100644 index 0000000000000000000000000000000000000000..f5889ff41b49193affc2eb857ba6d6c903c8ec24 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/Schema/schema.sql @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS Competition; +DROP TABLE IF EXISTS Athlete; + +CREATE TABLE Athlete ( + id INT NOT NULL PRIMARY KEY + ,fullName CHAR(20) NOT NULL +); + +CREATE TABLE Competition ( + id INT PRIMARY KEY + ,athlete INT NOT NULL REFERENCES Athlete(id) + ,time NUMERIC(6,2) NOT NULL + ,badStart BOOLEAN NOT NULL +); + +INSERT INTO Athlete VALUES(1, 'Jesse Owens'); +INSERT INTO Athlete VALUES(2, 'Tim Culver'); +INSERT INTO Athlete VALUES(3, 'Sid Gascoine'); +INSERT INTO Athlete VALUES(4, 'John Hooker'); +INSERT INTO Athlete VALUES(5, 'Brad Duncan'); + +/* 100 metre race */ +INSERT INTO Competition VALUES(1, 1, 10.23, 0); /* Jesse Owens */ +INSERT INTO Competition VALUES(2, 2, 11.55, 0); /* Tim Culver */ +INSERT INTO Competition VALUES(3, 3, 11.94, 0); /* Sid Gascoine */ +INSERT INTO Competition VALUES(4, 4, 10.02, 0); /* John Hooker */ +INSERT INTO Competition VALUES(5, 5, 10.84, 0); /* Brad Duncan */ +INSERT INTO Competition VALUES(6, 2, 10.02, 0); /* Tim Culver */ +INSERT INTO Competition VALUES(7, 3, 10.49, 0); /* Sid Gascoine */ +INSERT INTO Competition VALUES(8, 2, 9.35, 1); /* Tim Culver */ + + +SELECT fullName, min(time) as time +FROM Competition, Athlete +WHERE Competition.athlete = Athlete.id + AND badStart =0 +GROUP BY (fullName) +ORDER BY time, fullName; \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0100_valid_minimum.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0100_valid_minimum.xml new file mode 100644 index 0000000000000000000000000000000000000000..6fe9ce4986a4406315e11780db1a1a32564a0b5a --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0100_valid_minimum.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" /> + +<?xmlTest points = "1" + expectedToBeValid = "true" ?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0200_valid_noPublisher.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0200_valid_noPublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..d94f266bac2b9c8a5366bbf05142c10e4596b30b --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0200_valid_noPublisher.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers/> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0210_valid_singlePublisher.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0210_valid_singlePublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..03b2983550a4e5abc8f823fc63c65557efbdd004 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0210_valid_singlePublisher.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0230_valid_multiplePublisher.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0230_valid_multiplePublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..2087c1d5e5e578eda940395ad2dbbc78c543abea --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0230_valid_multiplePublisher.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + + <publisher id="two"> + <name>Publisher 1</name> + <city>City 2</city> + </publisher> + + <publisher id="three"> + <name>Publisher 2</name> + <city>City 1</city> + </publisher> + + </publishers> +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0240_invalid_duplicatePublisherId.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0240_invalid_duplicatePublisherId.xml new file mode 100644 index 0000000000000000000000000000000000000000..5be0d6a319018b66c3123b8a17ee952c480b6f12 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0240_invalid_duplicatePublisherId.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + <publisher id="one"> <!-- Duplicate @id value »one« --> + <name>Publisher 2</name> + <city>City 2</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml new file mode 100644 index 0000000000000000000000000000000000000000..bb87c7ad6649e1514cccc5beff691cb71840d7a6 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0250_invalid_duplicatePublisherNameCity.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + <publisher id="one"> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + <publisher id="two"> + <!-- Error: duplicate both <name> and <city> --> + <name>Publisher 1</name> + <city>City 1</city> + </publisher> + </publishers> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0260_invalid_publisherLevel.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0260_invalid_publisherLevel.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0381013bff9f0a8cc7685e951bc80d6545cba59 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0260_invalid_publisherLevel.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <!-- Wrong level: Only <publishers> allowed here --> + <publisher id="unknown">Nobody</publisher> +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0230_valid_multiplePublisher.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0300_valid_books.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0300_valid_books.xml new file mode 100644 index 0000000000000000000000000000000000000000..e885646f7d3dda58cb88391849e556803db14ffd --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0300_valid_books.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <book id="ab95" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <author>Kim C. Border</author> + </book> + + <book id="goossens93" publisher="addWesley" year="1993"> + <title>The LaTeX Companion</title> + <author>Michel Goossens</author> + <author>Frank Mittelbach</author> + <author>Alexander Samarin</author> + </book> + + <book id="ab96" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <editor>Kim C. Border</editor> + </book> + + <book id="ab97" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0310_invalid_bookNoTitle.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0310_invalid_bookNoTitle.xml new file mode 100644 index 0000000000000000000000000000000000000000..2ed105de37542a2ad72ab9868ce1f35c2db8e4b5 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0310_invalid_bookNoTitle.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <!-- Error: Missing <title> --> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0320_invalid_bookNoAuthor.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0320_invalid_bookNoAuthor.xml new file mode 100644 index 0000000000000000000000000000000000000000..6cc7372ee5831ba11a48cc3496f13a44d717d62c --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0320_invalid_bookNoAuthor.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <!-- Neither <author> nor <editor> --> + </book> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0400_valid_websites.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0400_valid_websites.xml new file mode 100644 index 0000000000000000000000000000000000000000..db66a0739072850d5ed93efd6afab28830928a59 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0400_valid_websites.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + <website id="bibtex2" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <author>Unknown</author> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0410_invalid_websiteDateViolation.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0410_invalid_websiteDateViolation.xml new file mode 100644 index 0000000000000000000000000000000000000000..602bb91ef2beeb1e6e0c4b76664c22f8c854b570 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0410_invalid_websiteDateViolation.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="15.7.2018"> <!-- Error: Wrong date format --> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0420_invalid_websiteMissingAccessDate.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0420_invalid_websiteMissingAccessDate.xml new file mode 100644 index 0000000000000000000000000000000000000000..46653e14df4043873a14cd848ba2e1bca577a07e --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0420_invalid_websiteMissingAccessDate.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex"> <!-- Error: missing access date --> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0430_invalid_websiteMissingUrl.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0430_invalid_websiteMissingUrl.xml new file mode 100644 index 0000000000000000000000000000000000000000..0dac7dc4dde01e9a2802d7bca5184358aabf5fc3 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0430_invalid_websiteMissingUrl.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <!-- Error: Missing <uri> --> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml new file mode 100644 index 0000000000000000000000000000000000000000..15462cc3eb8618282b68901576d0f9b6d3756d7d --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0440_invalid_websiteUrlFormatViolation.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <website id="bibtex" access="2018-07-15"> + <!-- Error: Invalid URI --> + <uri>Jodel dodel düüh</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "2" + expectedToBeValid = "false" + preconditionValid = "0400_valid_websites.xml" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0500_valid_booksWebsites.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0500_valid_booksWebsites.xml new file mode 100644 index 0000000000000000000000000000000000000000..79968314203f474231f7346b507403d2c27f8da2 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0500_valid_booksWebsites.xml @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + + <book id="ab95" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <author>Kim C. Border</author> + </book> + + <book id="ab96" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + <editor>Kim C. Border</editor> + </book> + + <book id="ab97" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + <author>Kim C. Border</author> + </book> + + <website id="bibtex2" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <author>Unknown</author> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0510_invalid_bookDuplicateId.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0510_invalid_bookDuplicateId.xml new file mode 100644 index 0000000000000000000000000000000000000000..149d73269a7e8da7f1608c16118ad7b1614f8f68 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0510_invalid_bookDuplicateId.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <!-- Error: Duplicate @id value --> + <book id="ab92" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0515_invalid_bookYear.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0515_invalid_bookYear.xml new file mode 100644 index 0000000000000000000000000000000000000000..e0171e495f7ded16bec7c50b9d2affc23d4f3319 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0515_invalid_bookYear.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="ab92" publisher="springer" year="nineteenhundred"> <!-- Error: @year not an integer value --> + + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0520_invalid_bibDuplicateId.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0520_invalid_bibDuplicateId.xml new file mode 100644 index 0000000000000000000000000000000000000000..08dd100895aaeb414d37654d426f0253f34a5b22 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0520_invalid_bibDuplicateId.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <book id="bibtex" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <!-- Error: Duplicate @id value --> + <website id="bibtex" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + </website> + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0500_valid_booksWebsites.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0600_invalid_bookInvalidPublisher.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0600_invalid_bookInvalidPublisher.xml new file mode 100644 index 0000000000000000000000000000000000000000..c7ae42ca500debe40296b8accee2fa59ed95c898 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0600_invalid_bookInvalidPublisher.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + </publishers> + + <!-- Error: Invalid reference »spring« rather than »springer« --> + <book id="ab92" publisher="spring" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "false" + preconditionValid = "0300_valid_books.xml" +?> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0700_valid_bibPublisherIdCompat.xml b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0700_valid_bibPublisherIdCompat.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfe447b1af9c616dd64e48f344c201af7caad758 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/SchemaTest/0700_valid_bibPublisherIdCompat.xml @@ -0,0 +1,42 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<bibliography xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="../Schema/bib.xsd" > + <publishers> + + <publisher id="springer"> + <name>Springer</name> + <city>Berlin / Germany</city> + </publisher> + + <publisher id="addWesley"> + <name>Addison-Wesley</name> + <city>Reading, Massachusetts / USA</city> + </publisher> + + </publishers> + + <!-- Should not interfere with <publisher id="springer"> entry --> + <book id="springer" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <author>Charalambos D. Aliprantis</author> + </book> + + <book id="ab94" publisher="springer" year="1994"> + <title>Infinite Dimensional Analysis</title> + <editor>Charalambos D. Aliprantis</editor> + </book> + + <!-- Should not interfere with <publisher id="addWesley"> entry --> + <website id="addWesley" access="2018-07-15"> + <uri>https://en.wikipedia.org/wiki/BibTeX</uri> + <title>BiBTeX - Wikipedia</title> + <!-- Optional: <author>...</author> --> + </website> + + +</bibliography> + +<?xmlTest points = "1" + expectedToBeValid = "true" +?> diff --git a/Klausuren/Sda1/2018Summer/Solve/pom.xml b/Klausuren/Sda1/2018Summer/Solve/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..0ff1239e3feabe23b9ec93d640162d9b489d81fe --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/pom.xml @@ -0,0 +1,166 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>de.hdm_stuttgart.mi.sda1</groupId> + <artifactId>solve</artifactId> + <version>0.9</version> + <packaging>jar</packaging> + + <name>Solve</name> + + <url>http://www.mi.hdm-stuttgart.de/freedocs/topic/de.hdm_stuttgart.mi.lectures/sd1SectUsingMaven.html</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <oxygenxml.version>20.1.0.0</oxygenxml.version> + </properties> + + <repositories> + + <repository> + <id>hdm-mi-internal-maven-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/mi-maven</url> + </repository> + <repository> + <id>oxygenxml-repo</id> + <url>https://maven.mi.hdm-stuttgart.de/nexus/repository/oxygen</url> + </repository> + </repositories> + + <dependencies> + + <dependency> + <groupId>com.oxygenxml</groupId> + <artifactId>oxygen-xercesImpl</artifactId> + <version>${oxygenxml.version}</version> + </dependency> + + <dependency> + <groupId>com.oxygenxml</groupId> + <artifactId>oxygen</artifactId> + <version>${oxygenxml.version}</version> + </dependency> + + <!-- Still needed to keep oxygenxml happy using legacy logging --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + <version>1.2.17</version> + </dependency> + + <dependency> + <groupId>com.rackspace.eclipse.webtools.sourceediting</groupId> + <artifactId>org.eclipse.wst.xml.xpath2.processor</artifactId> + <version>2.1.100</version> + </dependency> + + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + <version>6.0.6</version> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.12</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.10.0</version> + </dependency> + + <dependency> + <groupId>javax.xml.bind</groupId> + <artifactId>jaxb-api</artifactId> + <version>2.3.0</version> + </dependency> + + <!-- Required for executable jar generation to avoid ClassNotFoundException: + com.fasterxml.jackson.core.type.TypeReference and similar dependency problems. --> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>2.9.3</version> + </dependency> + + <dependency> + <groupId>org.jdom</groupId> + <artifactId>jdom2</artifactId> + <version>2.0.6</version> + </dependency> + + <dependency> + <groupId>jaxen</groupId> + <artifactId>jaxen</artifactId> + <version>1.1.6</version> + </dependency> + + <dependency> + <groupId>de.hdm_stuttgart.mi.exam</groupId> + <artifactId>unitmarking</artifactId> + <version>0.9</version> + </dependency> + + </dependencies> + + <build> + + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <source>1.9</source> + <target>1.9</target> + <compilerArgument>-proc:none</compilerArgument> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.0.1</version> + <configuration> + <links> + <link>https://docs.oracle.com/javase/10/docs/api</link> + </links> + <additionalJOptions> + <additionalJOption>-html5</additionalJOption> + </additionalJOptions> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>2.3</version> + <configuration> + <descriptor>src/main/assembly/assembly.xml</descriptor> + </configuration> + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <archive> + <manifest> + <mainClass>de.hdm_stuttgart.mi.sda1.test.ShowReachedPoints</mainClass> + </manifest> + </archive> + </configuration> + </execution> + </executions> + </plugin> + + </plugins> + </build> +</project> diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/assembly/assembly.xml b/Klausuren/Sda1/2018Summer/Solve/src/main/assembly/assembly.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a2cd6054a519cef9fe38484b72ae28aba730bc5 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/assembly/assembly.xml @@ -0,0 +1,36 @@ +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"> + <id>fat-tests</id> + <formats> + <format>jar</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <dependencySets> + <dependencySet> + <outputDirectory>/</outputDirectory> + <useProjectArtifact>true</useProjectArtifact> + <unpack>true</unpack> + <scope>test</scope> + </dependencySet> + </dependencySets> + <fileSets> + <fileSet> + <directory>${project.build.directory}/test-classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + <fileSet> + <directory>${project.build.directory}/classes</directory> + <outputDirectory>/</outputDirectory> + <includes> + <include>**/*.class</include> + </includes> + <useDefaultExcludes>true</useDefaultExcludes> + </fileSet> + </fileSets> +</assembly> diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java new file mode 100644 index 0000000000000000000000000000000000000000..8425614927503b906c0f86ae53f52a0473fdf2ab --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/AllResults.java @@ -0,0 +1,16 @@ + package de.hdm_stuttgart.mi.sda1; + + + import de.hdm_stuttgart.mi.sda1.impl.DbRead; + import de.hdm_stuttgart.mi.sda1.impl.DbReadDuplicate; + + public class AllResults { + + public static void main( String[] args ) { + + final DbRead sports = new DbReadDuplicate(); + sports.readDatabase(); + + sports.toHtml(System.out); + } + } \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/FinalResults.java b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/FinalResults.java new file mode 100644 index 0000000000000000000000000000000000000000..4d12bbc543b6f4147168d3451270d7cb1f616be4 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/FinalResults.java @@ -0,0 +1,16 @@ + package de.hdm_stuttgart.mi.sda1; + + + import de.hdm_stuttgart.mi.sda1.impl.DbRead; + import de.hdm_stuttgart.mi.sda1.impl.DbReadUnique; + + public class FinalResults { + + public static void main( String[] args ) { + + final DbRead sports = new DbReadUnique(); + sports.readDatabase(); + + sports.toHtml(System.out); + } + } \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java new file mode 100644 index 0000000000000000000000000000000000000000..8fe96cf05ddae50c6b428c70ccd32c9c1321c091 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbRead.java @@ -0,0 +1,83 @@ + package de.hdm_stuttgart.mi.sda1.impl; + + import org.jdom2.Element; + import org.jdom2.output.Format; + import org.jdom2.output.XMLOutputter; + + import java.io.IOException; + import java.io.OutputStream; + import java.sql.Connection; + import java.sql.DriverManager; + import java.sql.ResultSet; + import java.sql.SQLException; + + abstract public class DbRead { + + final String sqlQuery; + + public final Element html; + private final Element table; + + private final Connection conn; + + public DbRead(final String sqlQuery) { + this.sqlQuery = sqlQuery; + html = new Element("html"); + append(append(html, "head"), "title", "Results"); + table = append(append(html, "body"), "table"); + + final Element headerLine = append(table, "tr"); + append(headerLine, "th", "Rank"); + append(headerLine, "th", "Name"); + append(headerLine, "th", "Time / seconds"); + + Connection connTmp = null; + try { + connTmp = DriverManager.getConnection( + "jdbc:mysql://localhost/hdm?serverTimezone=UTC", "hdmuser", "XYZ"); + } catch (SQLException e) { + System.err.println("Unable to establish connection: " + e); + System.exit(1); + } + conn = connTmp; + } + + protected abstract void insertRecord(final ResultSet result, final Element row, final int rank) + throws SQLException; + + public void readDatabase() { + try { + final ResultSet results = conn.createStatement().executeQuery(sqlQuery); + int rank = 1; + while(results.next()) { + insertRecord(results, append(table, "tr"), rank++); + } + } catch (final SQLException e) { + System.err.println("Database access error: " + e); + System.exit(1); + } + } + + + static protected Element append(final Element parent, final String tagname) { + final Element child = new Element(tagname); + parent.addContent(child); + return child; + } + static protected void append(final Element parent, final String tagname, final String text) { + final Element child = new Element(tagname); + child.addContent(text); + parent.addContent(child); + } + + public void toHtml(final OutputStream out) { + + final XMLOutputter printer = + new XMLOutputter(Format.getPrettyFormat()); + try { + printer.output(html, out); + } catch (final IOException e) { + System.err.println("Unable to write output: " + e); + } + } + } \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadDuplicate.java b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadDuplicate.java new file mode 100644 index 0000000000000000000000000000000000000000..346fff7e8f59d8b26aa0b59253a7d3c010067773 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadDuplicate.java @@ -0,0 +1,30 @@ +package de.hdm_stuttgart.mi.sda1.impl; + +import org.jdom2.Element; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DbReadDuplicate extends DbRead { + + static private final String sqlQuery = + "SELECT fullName, time, badStart\n" + + "FROM Competition, Athlete\n" + + "WHERE Competition.athlete = Athlete.id\n" + + "ORDER BY time, fullName"; + + public DbReadDuplicate() { + super(sqlQuery); + } + + @Override + protected void insertRecord(final ResultSet result, final Element row, final int rank) throws SQLException { + append(row, "td", "" + rank); + append(row, "td", result.getString("fullName")); + append(row, "td", result.getString("time")); + + if (result.getBoolean("badStart")) { + row.setAttribute("style", "background: red;"); + } + } +} diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadUnique.java b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadUnique.java new file mode 100644 index 0000000000000000000000000000000000000000..af2499159e0c27129f981366a4e8e7fea27ecc91 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/java/de/hdm_stuttgart/mi/sda1/impl/DbReadUnique.java @@ -0,0 +1,29 @@ +package de.hdm_stuttgart.mi.sda1.impl; + +import org.jdom2.Element; + +import java.sql.ResultSet; +import java.sql.SQLException; + +public class DbReadUnique extends DbRead { + static private final String sqlQuery = + "SELECT fullName, min(time) as time\n" + + "FROM Competition, Athlete\n" + + "WHERE Competition.athlete = Athlete.id\n" + + " AND badStart = 0\n" + + "GROUP BY (fullName)\n" + + "ORDER BY time, fullName"; + + public DbReadUnique() { + super(sqlQuery); + } + + @Override + protected void insertRecord(final ResultSet result, final Element row, final int rank) throws SQLException { + append(row, "td", "" + rank); + append(row, "td", result.getString("fullName")); + append(row, "td", result.getString("time")); + } + + +} diff --git a/Klausuren/Sda1/2018Summer/Solve/src/main/resources/log4j2.xml b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/log4j2.xml new file mode 100644 index 0000000000000000000000000000000000000000..d7a0dcb779806532b5292813bdad292d31c147b2 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/main/resources/log4j2.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Configuration> + <Appenders> + <File name="A1" fileName="A1.log" append="false"> + <PatternLayout pattern="%t %-5p %c{2} - %m%n"/> + </File> + <Console name="STDOUT" target="SYSTEM_OUT"> + <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/> + </Console> + </Appenders> + <Loggers> + <!-- You may want to enable more detailed hibernate logging --> + <Logger name="org.hibernate" level="error"> + <AppenderRef ref="A1"/> + </Logger> + <Root level="error"> + <AppenderRef ref="STDOUT"/> + </Root> + </Loggers> +</Configuration> \ No newline at end of file diff --git a/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java new file mode 100644 index 0000000000000000000000000000000000000000..82e54951d870ef7ba64a650392f1cd0746d8f292 --- /dev/null +++ b/Klausuren/Sda1/2018Summer/Solve/src/test/java/de/hdm_stuttgart/mi/sda1/test/ex1/SchemaTest.java @@ -0,0 +1,26 @@ +package de.hdm_stuttgart.mi.sda1.test.ex1; + +import de.hdm_stuttgart.mi.unitmarking.xsd.InstanceSetEvaluation; +import org.junit.Assert; +import org.junit.Test; + +/** + * Unit test for an XML instance set. CLI by: + * java -cp target/solvejpa-0.9-fat-tests.jar org.junit.runner.JUnitCore SchemaTest + */ +@SuppressWarnings("static-method") +public class SchemaTest { + /** + * Testing a suite of XML instances. + */ + @Test + public void testXmlInstanceSet() { + + final InstanceSetEvaluation ise = + new InstanceSetEvaluation("SchemaTest", "Schema/bib.xsd"); + + System.out.println(ise.getMessages()); + + Assert.assertTrue(ise.getErrorMessages(), ise.allTestsSucceeded); + } +} \ No newline at end of file diff --git a/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl b/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl index 098fb7ffd51fd4cc80209a16a37cae5813bdd63f..36f3e703b3538150d70e108c91b5250993c023df 100644 --- a/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl +++ b/ws/Docbook/CustomLayer/Klausur/docbook2klausur.xsl @@ -138,12 +138,7 @@ <table border="{@border}" style="border-collapse: collapse;"> <xsl:for-each select="db:tr"> <tr> - <xsl:for-each select="db:td|db:th"> - <td valign="top"> - <xsl:apply-templates select="text()|*"/> - </td> - - </xsl:for-each> + <xsl:apply-templates/> </tr> </xsl:for-each> @@ -152,15 +147,16 @@ </xsl:template> <xsl:template match="db:td"> - <td> + <td valign="top"> + <xsl:copy-of select="@colspan"/> <xsl:apply-templates/> </td> </xsl:template> <xsl:template match="db:th"> - <th> + <td valign="top"><!-- Sigh! ILIAS HTML handling is soooo stupid! --> <xsl:apply-templates/> - </th> + </td> </xsl:template> <xsl:template match="db:option"> diff --git a/ws/Docbook/Preprocess/make.image b/ws/Docbook/Preprocess/make.image index 936ed0a032d23e7b82f5f9cfbaf7a757e3ff4b8f..45edaab1aaa6738c2c2a327c4580c52ef55a6ad5 100644 --- a/ws/Docbook/Preprocess/make.image +++ b/ws/Docbook/Preprocess/make.image @@ -17,8 +17,8 @@ include mediaobjects.list cd $(@D);pdf2svg $(*F).pdf $(*F).pdf.svg %.webm.mp4:%.webm - avconv -y -i $< -vcodec libx264 -acodec aac -strict -2 -r 10 $<.mp4 - avconv -i $< -vframes 1 $<.png + ffmpeg -y -i $< -vcodec libx264 -acodec aac -strict -2 -r 10 $<.mp4 + ffmpeg -i $< -vframes 1 $<.png #avconv -y -i q.webm -vcodec libx264 -acodec aac -strict -2 -r 10 target/src/_Resources/Video/Ref/Video/jdbcDriverConfig.webm.mp4 diff --git a/ws/Docbook/Preprocess/make.rules b/ws/Docbook/Preprocess/make.rules index 8a7e5d46af498ba7595491a137366ffef40e1af7..77344555a3801b4677eeec362ba31e828257d8ed 100644 --- a/ws/Docbook/Preprocess/make.rules +++ b/ws/Docbook/Preprocess/make.rules @@ -145,7 +145,7 @@ SAXONCMD=java -cp "${DBOOK_XSL}/tools/lib/saxon9he.jar:/usr/share/java/xercesImp # PDF # See http://stackoverflow.com/questions/39786947/how-to-convert-to-pdf-from-xsl-fo-with-mathml/39796975 %.pdf: %.print.xml - /usr/share/hdm-fop/fop-2.2/fop/fop -xml $*.print.xml -xsl ${DBOOK_XSL_CUSTOM}/pdf/docbookHdm.xsl -pdf ${*}.pdf + /usr/share/hdm-fop/fop-2.3/fop/fop -xml $*.print.xml -xsl ${DBOOK_XSL_CUSTOM}/pdf/docbookHdm.xsl -pdf ${*}.pdf %.fo: %.print.xml # for debugging ${SAXON6CMD} $*.print.xml ${DBOOK_XSL_CUSTOM}/pdf/docbookHdm.xsl ${dbookXslPdfParam} > $*.fo