unfertiges AusleihenProzess
parent
e373060af4
commit
1526c9ec0a
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
|
@ -1,6 +1,6 @@
|
||||||
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" version="24.8.4">
|
<mxfile host="app.diagrams.net" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36" version="24.8.4">
|
||||||
<diagram name="Seite-1" id="xkmZ0K6vz5A5_BixXH1Q">
|
<diagram name="Seite-1" id="xkmZ0K6vz5A5_BixXH1Q">
|
||||||
<mxGraphModel dx="927" dy="1179" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
<mxGraphModel dx="2714" dy="1416" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
<root>
|
<root>
|
||||||
<mxCell id="0" />
|
<mxCell id="0" />
|
||||||
<mxCell id="1" parent="0" />
|
<mxCell id="1" parent="0" />
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
<mxGeometry x="160" y="390" width="110" height="50" as="geometry" />
|
<mxGeometry x="160" y="390" width="110" height="50" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--6" value="<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--6" value="<div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div>" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
||||||
<mxGeometry x="760" y="270" width="1110" height="770" as="geometry" />
|
<mxGeometry x="756" y="270" width="1110" height="770" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--7" value="package" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--7" value="package" style="shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;html=1;whiteSpace=wrap;" parent="1" vertex="1">
|
||||||
<mxGeometry x="140" y="600" width="240" height="170" as="geometry" />
|
<mxGeometry x="140" y="600" width="240" height="170" as="geometry" />
|
||||||
|
@ -163,9 +163,16 @@
|
||||||
<mxPoint x="1650" y="904" as="targetPoint" />
|
<mxPoint x="1650" y="904" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--194" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" source="ydUtLetK26WXyeJ3qCt--117" target="ydUtLetK26WXyeJ3qCt--159" edge="1">
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ydUtLetK26WXyeJ3qCt--117" target="a17Tyx0-SzZjYovz-tY2-10">
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-19" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="ydUtLetK26WXyeJ3qCt--117" target="a17Tyx0-SzZjYovz-tY2-5">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="880" y="572" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--117" value="<font style="font-size: 12px;">BibSystem</font>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--117" value="<font style="font-size: 12px;">BibSystem</font>" style="swimlane;fontStyle=0;childLayout=stackLayout;horizontal=1;startSize=26;fillColor=none;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="790" y="338" width="180" height="52" as="geometry" />
|
<mxGeometry x="790" y="338" width="180" height="52" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
@ -236,7 +243,7 @@
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--158" value="Ausleihe" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--158" value="Ausleihe" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1000" y="403" width="160" height="114" as="geometry" />
|
<mxGeometry x="1280" y="340" width="160" height="114" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--159" value="- type: String<div>- availability: boolean</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="ydUtLetK26WXyeJ3qCt--158" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--159" value="- type: String<div>- availability: boolean</div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="ydUtLetK26WXyeJ3qCt--158" vertex="1">
|
||||||
<mxGeometry y="26" width="160" height="54" as="geometry" />
|
<mxGeometry y="26" width="160" height="54" as="geometry" />
|
||||||
|
@ -248,7 +255,7 @@
|
||||||
<mxGeometry y="88" width="160" height="26" as="geometry" />
|
<mxGeometry y="88" width="160" height="26" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--162" value="Ausweis" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--162" value="Ausweis" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1010" y="556" width="160" height="114" as="geometry" />
|
<mxGeometry x="1300" y="528" width="160" height="114" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--163" value="- kartenNummer: int<div><br></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="ydUtLetK26WXyeJ3qCt--162" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--163" value="- kartenNummer: int<div><br></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;" parent="ydUtLetK26WXyeJ3qCt--162" vertex="1">
|
||||||
<mxGeometry y="26" width="160" height="54" as="geometry" />
|
<mxGeometry y="26" width="160" height="54" as="geometry" />
|
||||||
|
@ -263,7 +270,7 @@
|
||||||
<mxGeometry relative="1" as="geometry" />
|
<mxGeometry relative="1" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--175" value="<i>Benutzer</i>" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=37;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--175" value="<i>Benutzer</i>" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=37;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1381" y="310" width="260" height="320" as="geometry" />
|
<mxGeometry x="1560" y="310" width="260" height="320" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--176" value="<span style="font-weight: normal;">- bibAusweis: Ausweis</span><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- name: String</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- alter: int</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- istStudent: boolean</span></div><div style="line-height: 160%;"><span style="font-weight: normal;">-&nbsp;<span style="background-color: initial;">ausgeliehenenMedien[]: Medium</span></span></div><div><span style="font-weight: normal;">- angemeldet: boolean</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--176" value="<span style="font-weight: normal;">- bibAusweis: Ausweis</span><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- name: String</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- alter: int</span></div><div style="line-height: 140%;"><span style="background-color: initial; font-weight: normal;">- istStudent: boolean</span></div><div style="line-height: 160%;"><span style="font-weight: normal;">-&nbsp;<span style="background-color: initial;">ausgeliehenenMedien[]: Medium</span></span></div><div><span style="font-weight: normal;">- angemeldet: boolean</span></div>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--175" vertex="1">
|
||||||
<mxGeometry y="37" width="260" height="163" as="geometry" />
|
<mxGeometry y="37" width="260" height="163" as="geometry" />
|
||||||
|
@ -275,7 +282,7 @@
|
||||||
<mxGeometry y="208" width="260" height="112" as="geometry" />
|
<mxGeometry y="208" width="260" height="112" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--179" value="Kunde" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--179" value="Kunde" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1320" y="750" width="160" height="96" as="geometry" />
|
<mxGeometry x="1450" y="750" width="160" height="96" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--180" value="<span style="font-weight: normal;">+ field: type</span>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--179" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--180" value="<span style="font-weight: normal;">+ field: type</span>" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--179" vertex="1">
|
||||||
<mxGeometry y="36" width="160" height="26" as="geometry" />
|
<mxGeometry y="36" width="160" height="26" as="geometry" />
|
||||||
|
@ -287,7 +294,7 @@
|
||||||
<mxGeometry y="70" width="160" height="26" as="geometry" />
|
<mxGeometry y="70" width="160" height="26" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--183" value="Mitarbeiter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--183" value="Mitarbeiter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=36;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;strokeColor=default;spacingTop=10;fontFamily=Helvetica;fontSize=12;fontColor=default;fillColor=default;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1519" y="750" width="160" height="110" as="geometry" />
|
<mxGeometry x="1670" y="750" width="160" height="110" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--184" value="<span style="font-weight: normal;">+ field: typ</span>e" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--183" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--184" value="<span style="font-weight: normal;">+ field: typ</span>e" style="text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;whiteSpace=wrap;html=1;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="ydUtLetK26WXyeJ3qCt--183" vertex="1">
|
||||||
<mxGeometry y="36" width="160" height="26" as="geometry" />
|
<mxGeometry y="36" width="160" height="26" as="geometry" />
|
||||||
|
@ -296,46 +303,61 @@
|
||||||
<mxGeometry y="62" width="160" height="48" as="geometry" />
|
<mxGeometry y="62" width="160" height="48" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--191" value="<div><br></div>1..*" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--191" value="<div><br></div>1..*" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1330" y="440" width="60" height="30" as="geometry" />
|
<mxGeometry x="1500" y="430" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--192" value="hat" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--192" value="hat" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1250" y="440" width="60" height="40" as="geometry" />
|
<mxGeometry x="1459" y="472" width="60" height="40" as="geometry" />
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--193" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--193" value="1" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" vertex="1">
|
||||||
<mxGeometry x="1160" y="580" width="60" height="30" as="geometry" />
|
<mxGeometry x="1450" y="550" width="60" height="30" as="geometry" />
|
||||||
</mxCell>
|
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--197" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.371;entryY=0.008;entryDx=0;entryDy=0;entryPerimeter=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" source="ydUtLetK26WXyeJ3qCt--117" target="ydUtLetK26WXyeJ3qCt--175" edge="1">
|
|
||||||
<mxGeometry relative="1" as="geometry">
|
|
||||||
<Array as="points">
|
|
||||||
<mxPoint x="860" y="300" />
|
|
||||||
<mxPoint x="1477" y="300" />
|
|
||||||
</Array>
|
|
||||||
</mxGeometry>
|
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--203" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--203" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
<mxPoint x="1399" y="750" as="sourcePoint" />
|
<mxPoint x="1519" y="750" as="sourcePoint" />
|
||||||
<mxPoint x="1399" y="700" as="targetPoint" />
|
<mxPoint x="1519" y="700" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1520" y="730" />
|
||||||
|
</Array>
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--204" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--204" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
<mxPoint x="1599" y="750" as="sourcePoint" />
|
<mxPoint x="1719" y="750" as="sourcePoint" />
|
||||||
<mxPoint x="1599" y="700" as="targetPoint" />
|
<mxPoint x="1719" y="700" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--205" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--205" value="" style="endArrow=none;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;" parent="1" edge="1">
|
||||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
<mxPoint x="1399" y="700" as="sourcePoint" />
|
<mxPoint x="1519" y="700" as="sourcePoint" />
|
||||||
<mxPoint x="1599" y="700" as="targetPoint" />
|
<mxPoint x="1719" y="700" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
<mxCell id="ydUtLetK26WXyeJ3qCt--206" value="Extends" style="endArrow=block;endSize=16;endFill=0;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;entryX=0.344;entryY=0.997;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="ydUtLetK26WXyeJ3qCt--178" edge="1">
|
<mxCell id="ydUtLetK26WXyeJ3qCt--206" value="Extends" style="endArrow=block;endSize=16;endFill=0;html=1;rounded=0;fontFamily=Helvetica;fontSize=12;fontColor=default;fontStyle=1;entryX=0.344;entryY=0.997;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" target="ydUtLetK26WXyeJ3qCt--178" edge="1">
|
||||||
<mxGeometry width="160" relative="1" as="geometry">
|
<mxGeometry width="160" relative="1" as="geometry">
|
||||||
<mxPoint x="1470" y="700" as="sourcePoint" />
|
<mxPoint x="1649" y="700" as="sourcePoint" />
|
||||||
<mxPoint x="1630" y="680" as="targetPoint" />
|
<mxPoint x="1630" y="680" as="targetPoint" />
|
||||||
</mxGeometry>
|
</mxGeometry>
|
||||||
</mxCell>
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="a17Tyx0-SzZjYovz-tY2-5" target="ydUtLetK26WXyeJ3qCt--41">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-5" value="Mediumverwalter" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1040" y="546" width="160" height="34" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-7" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="a17Tyx0-SzZjYovz-tY2-5">
|
||||||
|
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-10" value="AusleiheSystem" style="swimlane;fontStyle=1;align=center;verticalAlign=top;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1020" y="368" width="160" height="34" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-12" value="" style="line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;strokeColor=inherit;" vertex="1" parent="a17Tyx0-SzZjYovz-tY2-10">
|
||||||
|
<mxGeometry y="26" width="160" height="8" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="a17Tyx0-SzZjYovz-tY2-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.025;entryY=0.151;entryDx=0;entryDy=0;entryPerimeter=0;" edge="1" parent="1" target="ydUtLetK26WXyeJ3qCt--158">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1180" y="407" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
</root>
|
</root>
|
||||||
</mxGraphModel>
|
</mxGraphModel>
|
||||||
</diagram>
|
</diagram>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 89 KiB |
|
@ -4,19 +4,18 @@ import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import domain.Medium.Medium;
|
import domain.Medium.Medium;
|
||||||
|
import domain.Medium.Mediumverwalter;
|
||||||
|
|
||||||
public class MediumZumAusleihen {
|
public class Ausleihe {
|
||||||
|
|
||||||
private SimpleDateFormat simpleFormatter;
|
private SimpleDateFormat simpleFormatter;
|
||||||
private Date ausleiheBeginn, ausleiheEnde;
|
private Date ausleiheBeginn, ausleiheEnde;
|
||||||
private Medium medium;
|
private Mediumverwalter medium;
|
||||||
private int wochenAnzahl;
|
|
||||||
|
|
||||||
public MediumZumAusleihen(Medium medium,Date ausleiheBeginn, Date ausleiheEnde, int wochenAnzahl) {
|
public Ausleihe(Mediumverwalter medium,Date ausleiheBeginn, Date ausleiheEnde) {
|
||||||
this.medium = medium;
|
this.medium = medium;
|
||||||
this.ausleiheBeginn = ausleiheBeginn;
|
this.ausleiheBeginn = ausleiheBeginn;
|
||||||
this.ausleiheEnde = ausleiheEnde;
|
this.ausleiheEnde = ausleiheEnde;
|
||||||
this.wochenAnzahl = wochenAnzahl;
|
|
||||||
this.simpleFormatter = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
this.simpleFormatter = new SimpleDateFormat("dd-MM-yyyy HH:mm");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,24 +35,12 @@ public class MediumZumAusleihen {
|
||||||
this.ausleiheEnde = ausleiheEnde;
|
this.ausleiheEnde = ausleiheEnde;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Medium getMedium() {
|
public Mediumverwalter getMedium() {
|
||||||
return medium;
|
return medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMedium(Medium medium) {
|
|
||||||
this.medium = medium;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getWochenAnzahl() {
|
|
||||||
return wochenAnzahl;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setWochenAnzahl(int wochenAnzahl) {
|
|
||||||
this.wochenAnzahl = wochenAnzahl;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Ausgeliehene Medium: Ausleihe Beginn= " +simpleFormatter.format(ausleiheBeginn) + " ,Ausleihe Ende= " + simpleFormatter.format(ausleiheEnde) + " ,Wochenanzahl zum Ausleihen= "+ this.wochenAnzahl+" ,Medium= " + medium.toString();
|
return "Ausgeliehene Mediums= "+ medium.toStringOhneAnzahl() + " Ausleihe Beginn= " +simpleFormatter.format(ausleiheBeginn) + " ,Ausleihe Ende= " + simpleFormatter.format(ausleiheEnde);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -8,46 +8,42 @@ import domain.Medium.*;
|
||||||
|
|
||||||
public class AusleiheSystem {
|
public class AusleiheSystem {
|
||||||
|
|
||||||
private ArrayList<Medium> mediums;
|
private HashMap<String,Mediumverwalter> medien;
|
||||||
private Date ausleiheBeginn;
|
private Date ausleiheBeginn;
|
||||||
private Date ausleiheEnde;
|
private Date ausleiheEnde;
|
||||||
private Calendar calendar;
|
private Calendar calendar;
|
||||||
private int wocheAnzahlZuAusleihen;
|
|
||||||
|
|
||||||
|
|
||||||
public AusleiheSystem(ArrayList<Medium> mediums) {
|
public AusleiheSystem( HashMap<String,Mediumverwalter> medien) {
|
||||||
this.mediums = mediums;
|
this.medien = medien;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mediumAusleihen(Benutzer benutzer, String eindutigenummer) throws MediumNichtGefundenException {
|
public Ausleihe mediumAusleihen(Benutzer benutzer, String eindutigenummer) throws MediumNichtGefundenException {
|
||||||
Medium mediumAusleihen = findMedium(eindutigenummer);
|
Mediumverwalter mediumAusleihen = findMedium(eindutigenummer);
|
||||||
|
if (mediumAusleihen.isIstAusgeliehen())
|
||||||
|
throw new MediumNichtGefundenException("Das Medium ist ausgeliehen");
|
||||||
|
|
||||||
|
mediumAusleihen.setIstAusgeliehen(true);
|
||||||
this.ausleiheBeginn = new Date();
|
this.ausleiheBeginn = new Date();
|
||||||
this.calendar = Calendar.getInstance();
|
this.calendar = Calendar.getInstance();
|
||||||
calendar.setTime(ausleiheBeginn);
|
calendar.setTime(ausleiheBeginn);
|
||||||
if (mediumAusleihen instanceof Buch || mediumAusleihen instanceof Videospiel)
|
|
||||||
wocheAnzahlZuAusleihen = 4;
|
|
||||||
|
|
||||||
else if (mediumAusleihen instanceof Dvd)
|
calendar.add(Calendar.WEEK_OF_YEAR, mediumAusleihen.getWocheAnzahlZumAusleihen());
|
||||||
wocheAnzahlZuAusleihen = 1;
|
|
||||||
|
|
||||||
else if (mediumAusleihen instanceof Cd || mediumAusleihen instanceof Brettspiel)
|
|
||||||
wocheAnzahlZuAusleihen = 2;
|
|
||||||
|
|
||||||
calendar.add(Calendar.WEEK_OF_YEAR, wocheAnzahlZuAusleihen);
|
|
||||||
this.ausleiheEnde = calendar.getTime();
|
this.ausleiheEnde = calendar.getTime();
|
||||||
benutzer.ausleihen(new MediumZumAusleihen(mediumAusleihen,ausleiheBeginn,ausleiheEnde,wocheAnzahlZuAusleihen));
|
Ausleihe neueAusleihe = new Ausleihe(mediumAusleihen,ausleiheBeginn,ausleiheEnde);
|
||||||
|
benutzer.ausleihen(neueAusleihe);
|
||||||
|
return neueAusleihe;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private Mediumverwalter findMedium(String eindeutigeKennung) throws MediumNichtGefundenException {
|
||||||
|
if (medien.containsKey(eindeutigeKennung))
|
||||||
|
return medien.get(eindeutigeKennung);
|
||||||
|
else
|
||||||
|
throw new MediumNichtGefundenException("Das ausgewählte Medium ist nicht verfügbar");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
benutzer.getAusgeliehenenMedien().stream()
|
|
||||||
.forEach(System.out::println);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Medium findMedium(String eindeutigeKennung) throws MediumNichtGefundenException {
|
|
||||||
return mediums.stream()
|
|
||||||
.filter(m -> m.getKennungNummer().equalsIgnoreCase(eindeutigeKennung))
|
|
||||||
.findFirst()
|
|
||||||
.orElseThrow(() -> new MediumNichtGefundenException("Das ausgewählte Medium ist nicht verfügbar"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
package domain.Benutzer;
|
package domain.Benutzer;
|
||||||
|
|
||||||
public class Ausweis {
|
public class Ausweis {
|
||||||
private int kartenNummer;
|
private String kartennummer;
|
||||||
private static int generiereNummer = 1000;
|
private static int generiereNummer = 1000;
|
||||||
|
|
||||||
public Ausweis() {
|
public Ausweis(String zeichen) {
|
||||||
this.kartenNummer = generiereNummer++;
|
|
||||||
|
this.kartennummer =zeichen + generiereNummer++ ;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getKartenNummer() {
|
public String getKartenNummer() {
|
||||||
return kartenNummer;
|
return kartennummer;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@ package domain.Benutzer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import domain.AusleiheSystem.MediumZumAusleihen;
|
import domain.AusleiheSystem.Ausleihe;
|
||||||
import domain.Medium.Medium;
|
import domain.Medium.Medium;
|
||||||
|
|
||||||
public abstract class Benutzer {
|
public abstract class Benutzer {
|
||||||
|
@ -11,8 +11,9 @@ public abstract class Benutzer {
|
||||||
private String name;
|
private String name;
|
||||||
private int alter;
|
private int alter;
|
||||||
private boolean istStudent;
|
private boolean istStudent;
|
||||||
private ArrayList<MediumZumAusleihen> ausgeliehenenMedien;
|
private ArrayList<Ausleihe> ausgeliehenenMedien;
|
||||||
private boolean angemeldet;
|
private boolean angemeldet;
|
||||||
|
private double gebühren;
|
||||||
|
|
||||||
|
|
||||||
public Benutzer(Ausweis bibAusweis, String name, int alter, boolean istStudent) {
|
public Benutzer(Ausweis bibAusweis, String name, int alter, boolean istStudent) {
|
||||||
|
@ -57,15 +58,15 @@ public abstract class Benutzer {
|
||||||
this.istStudent = istStudent;
|
this.istStudent = istStudent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<MediumZumAusleihen> getAusgeliehenenMedien() {
|
public ArrayList<Ausleihe> getAusgeliehenenMedien() {
|
||||||
return ausgeliehenenMedien;
|
return ausgeliehenenMedien;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ausleihen(MediumZumAusleihen medium) {
|
public void ausleihen(Ausleihe medium) {
|
||||||
this.ausgeliehenenMedien.add(medium);
|
this.ausgeliehenenMedien.add(medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeMedium(MediumZumAusleihen medium) {
|
public void removeMedium(Ausleihe medium) {
|
||||||
this.ausgeliehenenMedien.remove(medium);
|
this.ausgeliehenenMedien.remove(medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,6 +77,15 @@ public abstract class Benutzer {
|
||||||
public void setAngemeldet(boolean angemeldet) {
|
public void setAngemeldet(boolean angemeldet) {
|
||||||
this.angemeldet = angemeldet;
|
this.angemeldet = angemeldet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public double getGebühren() {
|
||||||
|
return gebühren;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGebühren(double gebühren) {
|
||||||
|
this.gebühren = gebühren;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -1,26 +1,31 @@
|
||||||
package domain;
|
package domain;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map.Entry;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
import domain.AusleiheSystem.Ausleihe;
|
||||||
import domain.AusleiheSystem.AusleiheSystem;
|
import domain.AusleiheSystem.AusleiheSystem;
|
||||||
import domain.Benutzer.*;
|
import domain.Benutzer.*;
|
||||||
import domain.ExceptionsKlassen.*;
|
import domain.ExceptionsKlassen.*;
|
||||||
import domain.Medium.Brettspiel;
|
import domain.Medium.Brettspiel;
|
||||||
import domain.Medium.Buch;
|
import domain.Medium.Buch;
|
||||||
import domain.Medium.Medium;
|
import domain.Medium.Medium;
|
||||||
|
import domain.Medium.Mediumverwalter;
|
||||||
|
|
||||||
public class BibSystem {
|
public class BibSystem {
|
||||||
private ArrayList<Benutzer> alleBibBenutzer;
|
private ArrayList<Benutzer> alleBibBenutzer;
|
||||||
private ArrayList<Medium> alleMediums;
|
private HashMap<String,Mediumverwalter> medien;
|
||||||
|
private ArrayList<Ausleihe> ausleihe;
|
||||||
private AusleiheSystem ausleiheSystem;
|
private AusleiheSystem ausleiheSystem;
|
||||||
|
|
||||||
public BibSystem() {
|
public BibSystem() {
|
||||||
|
|
||||||
this.alleBibBenutzer = new ArrayList<>();
|
this.alleBibBenutzer = new ArrayList<>();
|
||||||
this.alleMediums = new ArrayList<>();
|
this.medien = new HashMap<>();
|
||||||
this.ausleiheSystem = new AusleiheSystem(alleMediums);
|
this.ausleiheSystem = new AusleiheSystem(medien);
|
||||||
mediumAufladen();
|
mediumsAufladen();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String userRegistrieren(String name, String type, int alter,String istAdmin) throws FalscheEingabeException {
|
public String userRegistrieren(String name, String type, int alter,String istAdmin) throws FalscheEingabeException {
|
||||||
|
@ -28,54 +33,62 @@ public class BibSystem {
|
||||||
throw new FalscheEingabeException("Geben Sie alle Felder korrekt ein");
|
throw new FalscheEingabeException("Geben Sie alle Felder korrekt ein");
|
||||||
|
|
||||||
Benutzer benutzer;
|
Benutzer benutzer;
|
||||||
Ausweis ausweis = new Ausweis();
|
Ausweis ausweis;
|
||||||
boolean istStudentOderSchüler = (type.equalsIgnoreCase("schüler") || type.equalsIgnoreCase("student"))? true : false;
|
boolean istStudentOderSchüler = (type.equalsIgnoreCase("schüler") || type.equalsIgnoreCase("student"))? true : false;
|
||||||
|
|
||||||
if (istAdmin.equalsIgnoreCase("nein"))
|
if (istAdmin.equalsIgnoreCase("nein")) {
|
||||||
|
ausweis = new Ausweis("K");
|
||||||
benutzer = new Mitarbeiter(ausweis,name,alter,istStudentOderSchüler);
|
benutzer = new Mitarbeiter(ausweis,name,alter,istStudentOderSchüler);
|
||||||
else
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
ausweis = new Ausweis("A");
|
||||||
benutzer = new Kunde(ausweis,name,alter,istStudentOderSchüler);
|
benutzer = new Kunde(ausweis,name,alter,istStudentOderSchüler);
|
||||||
|
}
|
||||||
|
|
||||||
alleBibBenutzer.add(benutzer);
|
alleBibBenutzer.add(benutzer);
|
||||||
return benutzer.toString();
|
return benutzer.toString();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean userAnmdelden(int kartennummer) throws BenutzerNichtGefundenException {
|
public boolean userAnmdelden(String kartennummer) throws BenutzerNichtGefundenException {
|
||||||
Benutzer tempUser = findBenutzer(kartennummer);
|
Benutzer tempUser = findBenutzer(kartennummer);
|
||||||
tempUser.setAngemeldet(true);
|
tempUser.setAngemeldet(true);
|
||||||
return tempUser.isAngemeldet();
|
return tempUser.isAngemeldet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void mediumAusleihen(int kartennummer, String eindeutigeKennung) throws BenutzerNichtAngemeldetException, BenutzerNichtGefundenException, MediumNichtGefundenException {
|
public void mediumAusleihen(String kartennummer, String eindeutigeKennung) throws Exception {
|
||||||
Benutzer tempBenutzer = findBenutzer(kartennummer);
|
Benutzer tempBenutzer = findBenutzer(kartennummer);
|
||||||
|
|
||||||
|
if (tempBenutzer instanceof Mitarbeiter)
|
||||||
|
throw new Exception("Mitarbeiter können keine Mediums ausleihen!");
|
||||||
|
|
||||||
if (!checkIfUserImSystemAngemeldetIst(kartennummer))
|
if (!checkIfUserImSystemAngemeldetIst(kartennummer))
|
||||||
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
throw new BenutzerNichtAngemeldetException("Sie müssen sich erst im System anmelden");
|
||||||
|
|
||||||
|
Ausleihe neueAusleihe = ausleiheSystem.mediumAusleihen(tempBenutzer,eindeutigeKennung);
|
||||||
ausleiheSystem.mediumAusleihen(tempBenutzer,eindeutigeKennung);
|
ausleihe.add(neueAusleihe);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mediumAufladen() {
|
private void mediumsAufladen() {
|
||||||
|
medien.put("B001",new Mediumverwalter (true,10,4, new Buch("Effektives Java Programmieren",2018,"Joshua Bloch")));
|
||||||
|
medien.put("B00", new Mediumverwalter (true,10,4, new Buch("Effektives Java Programmieren",2018,"Joshua Bloch")));
|
||||||
|
medien.put("BG001", new Mediumverwalter (false,10,4, new Brettspiel("Die Siedler von Catan",2012,"XY Müller")));
|
||||||
|
|
||||||
alleMediums.add(new Buch("B001","Effektives Java Programmieren",2018,true,"Joshua Bloch"));
|
|
||||||
alleMediums.add(new Buch("B00","Effektives C++ Programmieren",2012,true,"XY Müller"));
|
|
||||||
alleMediums.add(new Brettspiel("BG001","Die Siedler von Catan",2012,true,"XY Müller"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private boolean checkIfUserImSystemAngemeldetIst(int kartennummer) {
|
private boolean checkIfUserImSystemAngemeldetIst(String kartennummer) {
|
||||||
|
|
||||||
return alleBibBenutzer.stream()
|
return alleBibBenutzer.stream()
|
||||||
.anyMatch(user -> user.isAngemeldet());
|
.anyMatch(user -> user.isAngemeldet());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Benutzer findBenutzer(int kartennummer) throws BenutzerNichtGefundenException {
|
private Benutzer findBenutzer(String kartennummer) throws BenutzerNichtGefundenException {
|
||||||
return alleBibBenutzer.stream()
|
return alleBibBenutzer.stream()
|
||||||
.filter(k -> k.getBibAusweis().getKartenNummer() == kartennummer)
|
.filter(k -> k.getBibAusweis().getKartenNummer().equalsIgnoreCase(kartennummer))
|
||||||
.findFirst() // nimmt das erste Element des Streams, das die Filterbedingung erfüllt.
|
.findFirst() // nimmt das erste Element des Streams, das die Filterbedingung erfüllt.
|
||||||
.orElseThrow(() -> new BenutzerNichtGefundenException ("Benutzer mit Kartennummer " + kartennummer + " nicht gefunden"));
|
.orElseThrow(() -> new BenutzerNichtGefundenException ("Benutzer mit Kartennummer " + kartennummer + " nicht gefunden"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,17 +22,15 @@ class AnmeldenJTest {
|
||||||
@Test
|
@Test
|
||||||
void testUSerIstNichtAngemeldet() {
|
void testUSerIstNichtAngemeldet() {
|
||||||
// Status => True
|
// Status => True
|
||||||
assertThrows(BenutzerNichtGefundenException.class, () -> bib.userAnmdelden(1110));
|
assertThrows(BenutzerNichtGefundenException.class, () -> bib.userAnmdelden("1110"));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testUSerIstAngemeldet() throws FalscheEingabeException, BenutzerNichtGefundenException {
|
void testUSerIstAngemeldet() throws FalscheEingabeException, BenutzerNichtGefundenException {
|
||||||
|
|
||||||
// Status => True
|
|
||||||
bib.userRegistrieren("obai", "student", 16, "nein");
|
bib.userRegistrieren("obai", "student", 16, "nein");
|
||||||
int kartennummer = 1000;
|
|
||||||
assertTrue(bib.userAnmdelden(kartennummer));
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,12 @@ import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import domain.BibSystem;
|
import domain.BibSystem;
|
||||||
import domain.Benutzer.Benutzer;
|
|
||||||
import domain.ExceptionsKlassen.BenutzerNichtAngemeldetException;
|
import domain.ExceptionsKlassen.BenutzerNichtAngemeldetException;
|
||||||
import domain.ExceptionsKlassen.BenutzerNichtGefundenException;
|
import domain.ExceptionsKlassen.BenutzerNichtGefundenException;
|
||||||
import domain.ExceptionsKlassen.FalscheEingabeException;
|
import domain.ExceptionsKlassen.FalscheEingabeException;
|
||||||
import domain.ExceptionsKlassen.MediumNichtGefundenException;
|
import domain.ExceptionsKlassen.MediumNichtGefundenException;
|
||||||
|
|
||||||
class AusleihenJTest {
|
class AusleiheJTest {
|
||||||
|
|
||||||
private BibSystem bib;
|
private BibSystem bib;
|
||||||
|
|
||||||
|
@ -22,12 +21,10 @@ class AusleihenJTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void test() throws FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException, MediumNichtGefundenException {
|
void test() throws FalscheEingabeException, BenutzerNichtGefundenException, BenutzerNichtAngemeldetException, MediumNichtGefundenException {
|
||||||
|
|
||||||
bib.userRegistrieren("obai", "student", 15, "nein");
|
bib.userRegistrieren("obai", "student", 15, "nein");
|
||||||
bib.userAnmdelden(1000);
|
bib.userAnmdelden("K1000");
|
||||||
bib.mediumAusleihen(1000,"B001" );
|
bib.mediumAusleihen("K1000", "B001");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package domain.JTests;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import domain.BibSystem;
|
||||||
|
import domain.Benutzer.Benutzer;
|
||||||
|
import domain.ExceptionsKlassen.BenutzerNichtAngemeldetException;
|
||||||
|
import domain.ExceptionsKlassen.BenutzerNichtGefundenException;
|
||||||
|
import domain.ExceptionsKlassen.FalscheEingabeException;
|
||||||
|
import domain.ExceptionsKlassen.MediumNichtGefundenException;
|
||||||
|
|
||||||
|
class AusweisJTest {
|
||||||
|
|
||||||
|
private BibSystem bib;
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void setUp() throws Exception {
|
||||||
|
this.bib = new BibSystem();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testKunde() throws FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException, MediumNichtGefundenException {
|
||||||
|
// bibAusweisNummer= K1000
|
||||||
|
System.out.println(bib.userRegistrieren("obai", "student", 15, "nein"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void testMitarbeiter() throws FalscheEingabeException, BenutzerNichtAngemeldetException, BenutzerNichtGefundenException, MediumNichtGefundenException {
|
||||||
|
// bibAusweisNummer= A1001
|
||||||
|
System.out.println(bib.userRegistrieren("Muster Müller", "Mitarbeiter", 25, "ja"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -10,6 +10,8 @@ import domain.Benutzer.Ausweis;
|
||||||
import domain.Benutzer.Benutzer;
|
import domain.Benutzer.Benutzer;
|
||||||
import domain.Benutzer.Kunde;
|
import domain.Benutzer.Kunde;
|
||||||
import domain.ExceptionsKlassen.FalscheEingabeException;
|
import domain.ExceptionsKlassen.FalscheEingabeException;
|
||||||
|
import domain.Medium.Buch;
|
||||||
|
import domain.Medium.Mediumverwalter;
|
||||||
|
|
||||||
class RegistrierenTest {
|
class RegistrierenTest {
|
||||||
private BibSystem bib;
|
private BibSystem bib;
|
||||||
|
@ -28,6 +30,7 @@ class RegistrierenTest {
|
||||||
|
|
||||||
assertTrue(test.contains(name));
|
assertTrue(test.contains(name));
|
||||||
System.out.println(test);
|
System.out.println(test);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ package domain.Medium;
|
||||||
public class Brettspiel extends Medium {
|
public class Brettspiel extends Medium {
|
||||||
private String Verlag;
|
private String Verlag;
|
||||||
|
|
||||||
public Brettspiel(String eindeutigeKennung, String title, int erscheinungsjahr,boolean verlängerbar, String Verlag) {
|
public Brettspiel(String title, int erscheinungsjahr, String Verlag) {
|
||||||
super(eindeutigeKennung, title, erscheinungsjahr, verlängerbar);
|
super(title, erscheinungsjahr);
|
||||||
this.Verlag = Verlag;
|
this.Verlag = Verlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,20 @@
|
||||||
package domain.Medium;
|
package domain.Medium;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
public class Buch extends Medium {
|
public class Buch extends Medium {
|
||||||
|
|
||||||
|
|
||||||
private String autor;
|
private String autor;
|
||||||
public Buch(String eindeutigeKennung, String title, int erscheinungsjahr,boolean verlängerbar, String autor) {
|
|
||||||
super(eindeutigeKennung, title, erscheinungsjahr,verlängerbar);
|
public Buch(String title, int erscheinungsjahr, String autor) {
|
||||||
|
super(title, erscheinungsjahr);
|
||||||
this.autor = autor;
|
this.autor = autor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public String getAutor() {
|
public String getAutor() {
|
||||||
return autor;
|
return autor;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAutor(String autor) {
|
public void setAutor(String autor) {
|
||||||
this.autor = autor;
|
this.autor = autor;
|
||||||
}
|
}
|
||||||
|
@ -19,9 +22,5 @@ public class Buch extends Medium {
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Buch: " + super.toString() + " ,autor=" + autor;
|
return "Buch: " + super.toString() + " ,autor=" + autor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,10 +5,11 @@ import java.util.Date;
|
||||||
public class Cd extends Medium {
|
public class Cd extends Medium {
|
||||||
|
|
||||||
private String Künstler;
|
private String Künstler;
|
||||||
public Cd(String eindeutigeKennung, String title, int erscheinungsjahr,boolean verlängerbar, String Künstler) {
|
public Cd(String title, int erscheinungsjahr,String Künstler) {
|
||||||
super(eindeutigeKennung, title, erscheinungsjahr,verlängerbar);
|
super(title, erscheinungsjahr);
|
||||||
this.Künstler = Künstler;
|
this.Künstler = Künstler;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getKünstler() {
|
public String getKünstler() {
|
||||||
return Künstler;
|
return Künstler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,8 +4,8 @@ package domain.Medium;
|
||||||
public class Dvd extends Medium {
|
public class Dvd extends Medium {
|
||||||
|
|
||||||
private String regisseur;
|
private String regisseur;
|
||||||
public Dvd(String eindeutigeKennung, String title, int erscheinungsjahr,boolean verlängerbar,String regisseur) {
|
public Dvd(String title, int erscheinungsjahr,String regisseur) {
|
||||||
super(eindeutigeKennung, title, erscheinungsjahr,verlängerbar);
|
super(title, erscheinungsjahr);
|
||||||
this.regisseur = regisseur;
|
this.regisseur = regisseur;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,68 +3,27 @@ package domain.Medium;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public abstract class Medium {
|
public abstract class Medium {
|
||||||
|
|
||||||
private String eindeutigeKennung;
|
|
||||||
private String title;
|
private String title;
|
||||||
private int erscheinungsjahr;
|
private int erscheinungsjahr;
|
||||||
private boolean verlängerbar;
|
|
||||||
|
public Medium(String title, int erscheinungsjahr) {
|
||||||
public Medium(String eindeutigeKennung, String title, int erscheinungsjahr,boolean verlängerbar) {
|
|
||||||
super();
|
super();
|
||||||
this.eindeutigeKennung = eindeutigeKennung;
|
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.erscheinungsjahr = erscheinungsjahr;
|
this.erscheinungsjahr = erscheinungsjahr;
|
||||||
this.verlängerbar = verlängerbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getKennungNummer() {
|
|
||||||
return eindeutigeKennung;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setKennungNummer(String kennungNummer) {
|
|
||||||
eindeutigeKennung = kennungNummer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getTitle() {
|
public String getTitle() {
|
||||||
return title;
|
return title;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTitle(String title) {
|
|
||||||
this.title = title;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getErscheinungsjahr() {
|
public int getErscheinungsjahr() {
|
||||||
return erscheinungsjahr;
|
return erscheinungsjahr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setErscheinungsjahr(int erscheinungsjahr) {
|
|
||||||
this.erscheinungsjahr = erscheinungsjahr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getEindeutigeKennung() {
|
|
||||||
return eindeutigeKennung;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setEindeutigeKennung(String eindeutigeKennung) {
|
|
||||||
this.eindeutigeKennung = eindeutigeKennung;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isVerlängerbar() {
|
|
||||||
return verlängerbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVerlängerbar(boolean verlängerbar) {
|
|
||||||
this.verlängerbar = verlängerbar;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "eindeutigeKennung=" + eindeutigeKennung + ", title=" + title + ", erscheinungsjahr="
|
return "title=" + title + ", erscheinungsjahr=" + erscheinungsjahr;
|
||||||
+ erscheinungsjahr + " ,Verlängerbar= " + verlängerbar ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,60 @@
|
||||||
|
package domain.Medium;
|
||||||
|
|
||||||
|
public class Mediumverwalter {
|
||||||
|
|
||||||
|
private boolean verlängerbar;
|
||||||
|
private int anzahl;
|
||||||
|
private int wocheAnzahlZumAusleihen;
|
||||||
|
private Medium medium;
|
||||||
|
private boolean istAusgeliehen;
|
||||||
|
|
||||||
|
public Mediumverwalter(boolean verlängerbar, int anzahl, int wocheAnzahlZumAusleihen, Medium medium) {
|
||||||
|
super();
|
||||||
|
this.verlängerbar = verlängerbar;
|
||||||
|
this.anzahl = anzahl;
|
||||||
|
this.wocheAnzahlZumAusleihen = wocheAnzahlZumAusleihen;
|
||||||
|
this.medium = medium;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public boolean isVerlängerbar() {
|
||||||
|
return verlängerbar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getAnzahl() {
|
||||||
|
return anzahl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAnzahl(int anzahl) {
|
||||||
|
this.anzahl = anzahl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getWocheAnzahlZumAusleihen() {
|
||||||
|
return wocheAnzahlZumAusleihen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Medium getMedium() {
|
||||||
|
return medium;
|
||||||
|
}
|
||||||
|
public boolean isIstAusgeliehen() {
|
||||||
|
return istAusgeliehen;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setIstAusgeliehen(boolean istAusgeliehen) {
|
||||||
|
this.istAusgeliehen = istAusgeliehen;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "Medium=" + medium.toString() + " ,verlängerbar=" + verlängerbar + ", anzahl=" + anzahl + ", wocheAnzahlZumAusleihen="
|
||||||
|
+ wocheAnzahlZumAusleihen ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String toStringOhneAnzahl() {
|
||||||
|
return "Medium=" + medium.toString() + " ,verlängerbar=" + verlängerbar + ", Anzahl der Wochen zum Ausleihen="
|
||||||
|
+ wocheAnzahlZumAusleihen ;
|
||||||
|
}
|
||||||
|
}
|
|
@ -6,8 +6,8 @@ public class Videospiel extends Medium {
|
||||||
|
|
||||||
private String plattform;
|
private String plattform;
|
||||||
|
|
||||||
public Videospiel(String kennungNummer, String title, int erscheinungsjahr,boolean verlängerbar, String plattform) {
|
public Videospiel(String title, int erscheinungsjahr, String plattform) {
|
||||||
super(kennungNummer, title, erscheinungsjahr, verlängerbar);
|
super(title, erscheinungsjahr);
|
||||||
this.plattform = plattform;
|
this.plattform = plattform;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,13 +58,13 @@ public class Tui {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void mediumAusleihenProzess(){
|
private void mediumAusleihenProzess(){
|
||||||
int kartennummer;
|
String kartennummer;
|
||||||
String eindutigeKennung;
|
String eindutigeKennung;
|
||||||
boolean mediumAusleihenProzess = true;
|
boolean mediumAusleihenProzess = true;
|
||||||
|
|
||||||
System.out.println("Geben Sie bitte Ihre kartennummer");
|
System.out.println("Geben Sie bitte Ihre kartennummer");
|
||||||
System.out.print(">");
|
System.out.print(">");
|
||||||
kartennummer = eingabe.nextInt();
|
kartennummer = eingabe.nextLine();
|
||||||
while(mediumAusleihenProzess) {
|
while(mediumAusleihenProzess) {
|
||||||
System.out.println("Geben Sie bitte die eindutige Kennung des Mediums");
|
System.out.println("Geben Sie bitte die eindutige Kennung des Mediums");
|
||||||
System.out.print(">");
|
System.out.print(">");
|
||||||
|
@ -73,9 +73,9 @@ public class Tui {
|
||||||
try {
|
try {
|
||||||
fassade.mediumAusleihen(kartennummer, eindutigeKennung);
|
fassade.mediumAusleihen(kartennummer, eindutigeKennung);
|
||||||
|
|
||||||
} catch (BenutzerNichtAngemeldetException | BenutzerNichtGefundenException | MediumNichtGefundenException e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e.getMessage());
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -86,10 +86,10 @@ public class Tui {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void anmeldenProzess() {
|
private void anmeldenProzess() {
|
||||||
int kartennummer;
|
String kartennummer;
|
||||||
System.out.println("Geben Sie bitte die Kartennummer Ihres Bibliotheksausweises an: ");
|
System.out.println("Geben Sie bitte die Kartennummer Ihres Bibliotheksausweises an: ");
|
||||||
System.out.print(">");
|
System.out.print(">");
|
||||||
kartennummer = eingabe.nextInt();
|
kartennummer = eingabe.nextLine();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (fassade.userAnmdelden(kartennummer))
|
if (fassade.userAnmdelden(kartennummer))
|
||||||
|
|
Loading…
Reference in New Issue