diff --git a/emf_datamodel/model/iPos_Datamodel.aird b/emf_datamodel/model/iPos_Datamodel.aird index 9ab3fdbc8274f9524a77687a48de879d79d267ba..55362c17d0464878c33f2097976edbef106f5262 100644 --- a/emf_datamodel/model/iPos_Datamodel.aird +++ b/emf_datamodel/model/iPos_Datamodel.aird @@ -5,7 +5,7 @@ <semanticResources>iPos_Datamodel.genmodel</semanticResources> <ownedViews xmi:type="viewpoint:DView" uid="_EpwecAQNEey-kNQ7esRa_g"> <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> - <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_Et4wgAQNEey-kNQ7esRa_g" name="iPos_Datamodel" repPath="#_Es-xkAQNEey-kNQ7esRa_g" changeId="61f620a9-da05-4fe8-aa95-47873fe0d421"> + <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_Et4wgAQNEey-kNQ7esRa_g" name="iPos_Datamodel" repPath="#_Es-xkAQNEey-kNQ7esRa_g" changeId="5569e7d7-fe6b-48dc-bf7a-f5d6518a0e6d"> <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> <target xmi:type="ecore:EPackage" href="iPos_Datamodel.ecore#/"/> </ownedRepresentationDescriptors> @@ -517,6 +517,10 @@ <children xmi:type="notation:Node" xmi:id="_jeN0sAZ_Eey-kNQ7esRa_g" type="2003" element="_jeEDsAZ_Eey-kNQ7esRa_g"> <children xmi:type="notation:Node" xmi:id="_jeN0swZ_Eey-kNQ7esRa_g" type="5007"/> <children xmi:type="notation:Node" xmi:id="_jeN0tAZ_Eey-kNQ7esRa_g" type="7004"> + <children xmi:type="notation:Node" xmi:id="_KDgK0CxQEeyc2bacnWuMrg" type="3010" element="_KDI-cCxQEeyc2bacnWuMrg"> + <styles xmi:type="notation:FontStyle" xmi:id="_KDgK0SxQEeyc2bacnWuMrg" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_KDgK0ixQEeyc2bacnWuMrg"/> + </children> <styles xmi:type="notation:SortingStyle" xmi:id="_jeN0tQZ_Eey-kNQ7esRa_g"/> <styles xmi:type="notation:FilteringStyle" xmi:id="_jeN0tgZ_Eey-kNQ7esRa_g"/> </children> @@ -794,6 +798,32 @@ <styles xmi:type="notation:ShapeStyle" xmi:id="_I1_zsRFmEeydeasO1RaQEg" fontName="Segoe UI" fontHeight="8"/> <layoutConstraint xmi:type="notation:Bounds" xmi:id="_I1_zshFmEeydeasO1RaQEg" x="2535" y="751" width="140" height="50"/> </children> + <children xmi:type="notation:Node" xmi:id="_Q9NrECxEEeyc2bacnWuMrg" type="2003" element="_Q7S_gCxEEeyc2bacnWuMrg"> + <children xmi:type="notation:Node" xmi:id="_Q9SjkCxEEeyc2bacnWuMrg" type="5007"/> + <children xmi:type="notation:Node" xmi:id="_Q9TKoCxEEeyc2bacnWuMrg" type="7004"> + <children xmi:type="notation:Node" xmi:id="_dww2ECxEEeyc2bacnWuMrg" type="3010" element="_dwRt4CxEEeyc2bacnWuMrg"> + <styles xmi:type="notation:FontStyle" xmi:id="_dww2ESxEEeyc2bacnWuMrg" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_dww2EixEEeyc2bacnWuMrg"/> + </children> + <children xmi:type="notation:Node" xmi:id="_hNpMoCxEEeyc2bacnWuMrg" type="3010" element="_hNSnUCxEEeyc2bacnWuMrg"> + <styles xmi:type="notation:FontStyle" xmi:id="_hNpMoSxEEeyc2bacnWuMrg" fontColor="2697711" fontName="Segoe UI" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Location" xmi:id="_hNpMoixEEeyc2bacnWuMrg"/> + </children> + <styles xmi:type="notation:SortingStyle" xmi:id="_Q9TKoSxEEeyc2bacnWuMrg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_Q9TKoixEEeyc2bacnWuMrg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_Q9NrESxEEeyc2bacnWuMrg" fontName="Segoe UI" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Q9NrEixEEeyc2bacnWuMrg" x="1542" y="852" width="171" height="75"/> + </children> + <children xmi:type="notation:Node" xmi:id="_ipaesCxSEeyc2bacnWuMrg" type="2003" element="_ipG8sCxSEeyc2bacnWuMrg"> + <children xmi:type="notation:Node" xmi:id="_ipbFwCxSEeyc2bacnWuMrg" type="5007"/> + <children xmi:type="notation:Node" xmi:id="_ipbFwSxSEeyc2bacnWuMrg" type="7004"> + <styles xmi:type="notation:SortingStyle" xmi:id="_ipbFwixSEeyc2bacnWuMrg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_ipbFwyxSEeyc2bacnWuMrg"/> + </children> + <styles xmi:type="notation:ShapeStyle" xmi:id="_ipaesSxSEeyc2bacnWuMrg" fontName="Segoe UI" fontHeight="8"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ipaesixSEeyc2bacnWuMrg" x="1806" y="714" width="195" height="100"/> + </children> <styles xmi:type="notation:DiagramStyle" xmi:id="_EuqzogQNEey-kNQ7esRa_g"/> <edges xmi:type="notation:Edge" xmi:id="_slHHwAQOEey-kNQ7esRa_g" type="4001" element="_sk66gAQOEey-kNQ7esRa_g" source="_OVBp4AQNEey-kNQ7esRa_g" target="_hS0UIAQOEey-kNQ7esRa_g"> <children xmi:type="notation:Node" xmi:id="_slIV4AQOEey-kNQ7esRa_g" type="6001"> @@ -1450,6 +1480,38 @@ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BNpqACemEeyTddajI1jY8w" id="(1.0,0.1326530612244898)"/> <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_BNpqASemEeyTddajI1jY8w" id="(0.0423728813559322,0.826530612244898)"/> </edges> + <edges xmi:type="notation:Edge" xmi:id="_r0eocCxEEeyc2bacnWuMrg" type="4001" element="_rz8c8CxEEeyc2bacnWuMrg" source="_lCMqkAZsEey-kNQ7esRa_g" target="_Q9NrECxEEeyc2bacnWuMrg"> + <children xmi:type="notation:Node" xmi:id="_r0gdoCxEEeyc2bacnWuMrg" type="6001"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_r0gdoSxEEeyc2bacnWuMrg" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_r0gdoixEEeyc2bacnWuMrg" type="6002"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_r0gdoyxEEeyc2bacnWuMrg" y="10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_r0hEsCxEEeyc2bacnWuMrg" type="6003"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_r0hEsSxEEeyc2bacnWuMrg" y="10"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_r0eocSxEEeyc2bacnWuMrg" routing="Rectilinear"/> + <styles xmi:type="notation:FontStyle" xmi:id="_r0eocixEEeyc2bacnWuMrg" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_r0eocyxEEeyc2bacnWuMrg" points="[0, 0, 0, -40]$[0, 40, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r0jg8CxEEeyc2bacnWuMrg" id="(0.6779661016949152,1.0)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_r0jg8SxEEeyc2bacnWuMrg" id="(0.47337278106508873,0.0)"/> + </edges> + <edges xmi:type="notation:Edge" xmi:id="_365fUCxSEeyc2bacnWuMrg" type="4001" element="_36hE0CxSEeyc2bacnWuMrg" source="_ipaesCxSEeyc2bacnWuMrg" target="_lCMqkAZsEey-kNQ7esRa_g"> + <children xmi:type="notation:Node" xmi:id="_366GYCxSEeyc2bacnWuMrg" type="6001"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_366GYSxSEeyc2bacnWuMrg" y="-10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_366GYixSEeyc2bacnWuMrg" type="6002"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_366GYyxSEeyc2bacnWuMrg" y="10"/> + </children> + <children xmi:type="notation:Node" xmi:id="_366GZCxSEeyc2bacnWuMrg" type="6003"> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_366GZSxSEeyc2bacnWuMrg" y="10"/> + </children> + <styles xmi:type="notation:ConnectorStyle" xmi:id="_365fUSxSEeyc2bacnWuMrg" routing="Rectilinear"/> + <styles xmi:type="notation:FontStyle" xmi:id="_365fUixSEeyc2bacnWuMrg" fontColor="7490599" fontName="Segoe UI" fontHeight="8"/> + <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_365fUyxSEeyc2bacnWuMrg" points="[0, 0, 146, 0]$[-146, 0, 0, 0]"/> + <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_366GZixSEeyc2bacnWuMrg" id="(0.0,0.07142857142857142)"/> + <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_366GZyxSEeyc2bacnWuMrg" id="(1.0,0.07142857142857142)"/> + </edges> </data> </ownedAnnotationEntries> <ownedAnnotationEntries xmi:type="description:AnnotationEntry" uid="_EwhNwAQNEey-kNQ7esRa_g" source="DANNOTATION_CUSTOMIZATION_KEY"> @@ -2273,7 +2335,7 @@ <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> </ownedElements> </ownedDiagramElements> - <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_lBuJcAZsEey-kNQ7esRa_g" name="PositionEvent" tooltipText="" outgoingEdges="_92h2_gccEey-kNQ7esRa_g" width="12" height="10"> + <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_lBuJcAZsEey-kNQ7esRa_g" name="PositionEvent" tooltipText="" outgoingEdges="_92h2_gccEey-kNQ7esRa_g _rz8c8CxEEeyc2bacnWuMrg" incomingEdges="_36hE0CxSEeyc2bacnWuMrg" width="12" height="10"> <target xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//PositionEvent"/> <semanticElements xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//PositionEvent"/> <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> @@ -2484,10 +2546,18 @@ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> <arrangeConstraints>KEEP_SIZE</arrangeConstraints> <arrangeConstraints>KEEP_RATIO</arrangeConstraints> - <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_jeEDsQZ_Eey-kNQ7esRa_g" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> + <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_MM0AuyxQEeyc2bacnWuMrg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> </ownedStyle> <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> + <ownedElements xmi:type="diagram:DNodeListElement" uid="_KDI-cCxQEeyc2bacnWuMrg" name="trackingTaskId : String" tooltipText=""> + <target xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//DataStorageQueryRequest/trackingTaskId"/> + <semanticElements xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//DataStorageQueryRequest/trackingTaskId"/> + <ownedStyle xmi:type="diagram:BundledImage" uid="_MM3rGSxQEeyc2bacnWuMrg" labelAlignment="LEFT"> + <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> + </ownedElements> </ownedDiagramElements> <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Pe6YMAaAEey-kNQ7esRa_g" name="AgentRegistrationRequest" tooltipText="" width="12" height="10"> <target xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//AgentRegistrationRequest"/> @@ -3149,6 +3219,72 @@ </ownedStyle> <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Q7S_gCxEEeyc2bacnWuMrg" name="ZoneDescriptor" tooltipText="" incomingEdges="_rz8c8CxEEeyc2bacnWuMrg" width="12" height="10"> + <target xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//ZoneDescriptor"/> + <semanticElements xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//ZoneDescriptor"/> + <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> + <arrangeConstraints>KEEP_SIZE</arrangeConstraints> + <arrangeConstraints>KEEP_RATIO</arrangeConstraints> + <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_jwC3-ixEEeyc2bacnWuMrg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> + <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> + <ownedElements xmi:type="diagram:DNodeListElement" uid="_dwRt4CxEEeyc2bacnWuMrg" name="zoneId : String" tooltipText=""> + <target xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//ZoneDescriptor/zoneId"/> + <semanticElements xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//ZoneDescriptor/zoneId"/> + <ownedStyle xmi:type="diagram:BundledImage" uid="_fSuYESxEEeyc2bacnWuMrg" labelAlignment="LEFT"> + <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> + </ownedElements> + <ownedElements xmi:type="diagram:DNodeListElement" uid="_hNSnUCxEEeyc2bacnWuMrg" name="notificationType : String" tooltipText=""> + <target xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//ZoneDescriptor/notificationType"/> + <semanticElements xmi:type="ecore:EAttribute" href="iPos_Datamodel.ecore#//ZoneDescriptor/notificationType"/> + <ownedStyle xmi:type="diagram:BundledImage" uid="_jwHwfixEEeyc2bacnWuMrg" labelAlignment="LEFT"> + <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> + </ownedElements> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DEdge" uid="_rz8c8CxEEeyc2bacnWuMrg" name="[0..*] zonedescriptors" sourceNode="_lBuJcAZsEey-kNQ7esRa_g" targetNode="_Q7S_gCxEEeyc2bacnWuMrg"> + <target xmi:type="ecore:EReference" href="iPos_Datamodel.ecore#//PositionEvent/zonedescriptors"/> + <semanticElements xmi:type="ecore:EReference" href="iPos_Datamodel.ecore#//PositionEvent/zonedescriptors"/> + <ownedStyle xmi:type="diagram:EdgeStyle" uid="_rz9EACxEEeyc2bacnWuMrg" routingStyle="manhattan" strokeColor="0,0,0"> + <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> + <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_rz9EAixEEeyc2bacnWuMrg" showIcon="false"> + <customFeatures>labelSize</customFeatures> + </centerLabelStyle> + <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_rz9EASxEEeyc2bacnWuMrg" showIcon="false" labelColor="39,76,114"> + <customFeatures>labelSize</customFeatures> + </endLabelStyle> + </ownedStyle> + <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_ipG8sCxSEeyc2bacnWuMrg" name="DataStorageQueryResponse" tooltipText="" outgoingEdges="_36hE0CxSEeyc2bacnWuMrg" width="12" height="10"> + <target xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//DataStorageQueryResponse"/> + <semanticElements xmi:type="ecore:EClass" href="iPos_Datamodel.ecore#//DataStorageQueryResponse"/> + <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> + <arrangeConstraints>KEEP_SIZE</arrangeConstraints> + <arrangeConstraints>KEEP_RATIO</arrangeConstraints> + <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ipHjwCxSEeyc2bacnWuMrg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> + <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> + </ownedStyle> + <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> + </ownedDiagramElements> + <ownedDiagramElements xmi:type="diagram:DEdge" uid="_36hE0CxSEeyc2bacnWuMrg" name="[0..*] positionEvents" sourceNode="_ipG8sCxSEeyc2bacnWuMrg" targetNode="_lBuJcAZsEey-kNQ7esRa_g"> + <target xmi:type="ecore:EReference" href="iPos_Datamodel.ecore#//DataStorageQueryResponse/positionEvents"/> + <semanticElements xmi:type="ecore:EReference" href="iPos_Datamodel.ecore#//DataStorageQueryResponse/positionEvents"/> + <ownedStyle xmi:type="diagram:EdgeStyle" uid="_36hr4CxSEeyc2bacnWuMrg" routingStyle="manhattan" strokeColor="0,0,0"> + <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']/@style"/> + <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_36hr4ixSEeyc2bacnWuMrg" showIcon="false"> + <customFeatures>labelSize</customFeatures> + </centerLabelStyle> + <endLabelStyle xmi:type="diagram:EndLabelStyle" uid="_36hr4SxSEeyc2bacnWuMrg" showIcon="false" labelColor="39,76,114"> + <customFeatures>labelSize</customFeatures> + </endLabelStyle> + </ownedStyle> + <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> + </ownedDiagramElements> <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_EthkIAQNEey-kNQ7esRa_g"/> <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> diff --git a/emf_datamodel/model/iPos_Datamodel.ecore b/emf_datamodel/model/iPos_Datamodel.ecore index 72381774ad4c366159007be2a6943bb7dc12092c..a72eb3ba2732ca66e7fd3828b35e51b14bd4de98 100644 --- a/emf_datamodel/model/iPos_Datamodel.ecore +++ b/emf_datamodel/model/iPos_Datamodel.ecore @@ -125,6 +125,8 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="timeStamp" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String" transient="true"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="lObjectId" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> + <eStructuralFeatures xsi:type="ecore:EReference" name="zonedescriptors" upperBound="-1" + eType="#//ZoneDescriptor"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="TrackingRequest"/> <eClassifiers xsi:type="ecore:EClass" name="MonitoringRequest"> @@ -162,7 +164,9 @@ eType="#//EventFilterCondition"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="WorldModelQueryRequest"/> - <eClassifiers xsi:type="ecore:EClass" name="DataStorageQueryRequest"/> + <eClassifiers xsi:type="ecore:EClass" name="DataStorageQueryRequest"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="trackingTaskId" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/> + </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="AgentRegistrationRequest"/> <eClassifiers xsi:type="ecore:EClass" name="MonitoringTask"> <eStructuralFeatures xsi:type="ecore:EReference" name="eventfilterconfiguration" @@ -246,4 +250,12 @@ <eClassifiers xsi:type="ecore:EDataType" name="FloatArray3d" instanceClassName="java.util.ArrayList<java.lang.Float[][]>"/> <eClassifiers xsi:type="ecore:EDataType" name="BooleanList" instanceClassName="java.lang.boolean[]"/> <eClassifiers xsi:type="ecore:EDataType" name="FloatArray" instanceClassName="java.util.ArrayList<java.lang.Float[]>"/> + <eClassifiers xsi:type="ecore:EClass" name="ZoneDescriptor"> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="zoneId" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/> + <eStructuralFeatures xsi:type="ecore:EAttribute" name="notificationType" eType="ecore:EDataType http://www.eclipse.org/emf/2003/XMLType#//String"/> + </eClassifiers> + <eClassifiers xsi:type="ecore:EClass" name="DataStorageQueryResponse"> + <eStructuralFeatures xsi:type="ecore:EReference" name="positionEvents" upperBound="-1" + eType="#//PositionEvent"/> + </eClassifiers> </ecore:EPackage> diff --git a/emf_datamodel/model/iPos_Datamodel.genmodel b/emf_datamodel/model/iPos_Datamodel.genmodel index 36138c3561de9626761a271bb1189a92c229b6dc..848cdc75b141b0a7f768b9122e8a03839d3ef357 100644 --- a/emf_datamodel/model/iPos_Datamodel.genmodel +++ b/emf_datamodel/model/iPos_Datamodel.genmodel @@ -116,6 +116,7 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iPos_Datamodel.ecore#//PositionEvent/placing"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//PositionEvent/timeStamp"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//PositionEvent/lObjectId"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iPos_Datamodel.ecore#//PositionEvent/zonedescriptors"/> </genClasses> <genClasses ecoreClass="iPos_Datamodel.ecore#//TrackingRequest"/> <genClasses ecoreClass="iPos_Datamodel.ecore#//MonitoringRequest"> @@ -140,7 +141,9 @@ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iPos_Datamodel.ecore#//EventFilterConfiguration/eventfiltercondition"/> </genClasses> <genClasses ecoreClass="iPos_Datamodel.ecore#//WorldModelQueryRequest"/> - <genClasses ecoreClass="iPos_Datamodel.ecore#//DataStorageQueryRequest"/> + <genClasses ecoreClass="iPos_Datamodel.ecore#//DataStorageQueryRequest"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//DataStorageQueryRequest/trackingTaskId"/> + </genClasses> <genClasses ecoreClass="iPos_Datamodel.ecore#//AgentRegistrationRequest"/> <genClasses ecoreClass="iPos_Datamodel.ecore#//MonitoringTask"> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iPos_Datamodel.ecore#//MonitoringTask/eventfilterconfiguration"/> @@ -185,5 +188,12 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//EventFilterCondition/categoryCondition"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//EventFilterCondition/positionConditionCellId"/> </genClasses> + <genClasses ecoreClass="iPos_Datamodel.ecore#//ZoneDescriptor"> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//ZoneDescriptor/zoneId"/> + <genFeatures createChild="false" ecoreFeature="ecore:EAttribute iPos_Datamodel.ecore#//ZoneDescriptor/notificationType"/> + </genClasses> + <genClasses ecoreClass="iPos_Datamodel.ecore#//DataStorageQueryResponse"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference iPos_Datamodel.ecore#//DataStorageQueryResponse/positionEvents"/> + </genClasses> </genPackages> </genmodel:GenModel> diff --git a/init_Industrierobotik.txt b/init_Industrierobotik.txt index d67230a3a4ef163e8abef7645290c801c75d5d69..7dee9f96e547d9983e36b50b7a8d37e69eeb3bd7 100644 --- a/init_Industrierobotik.txt +++ b/init_Industrierobotik.txt @@ -1,5 +1,5 @@ {"frames": [{"id": "cobot1_door_zone", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.0,"y": 0.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 4.0, "y": 4.0, "z":6.0}]}, {"id": "cobot1_window_zone", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.0,"y": 4.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 4.0, "y": 4.0, "z":6.0}]} ]} {"refSystems": [{"id": "ROOT"}, {"id": "CETI_ROOT", "position": {"refSystemId": "ROOT", "point": {"x": 3.05,"y": 2.08,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}]} {"objectConfigs": [{"agentId": "Employee1", "sensorId": "UWB_1", "agentType": "HUMAN", "sensorType": "UWB"}, {"agentId": "Employee2", "sensorId": "UWB_2", "agentType": "HUMAN", "sensorType": "UWB"}, {"agentId": "Turtlebot", "sensorId": "98:CD:AC:26:2D:18", "agentType": "ROBOT", "sensorType": "RFID_SCANNER"}]} -{"pois": [{"id": "UWB_BEACON_1", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 3.1,"y": 0.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "UWB_BEACON_2", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": -0.3,"y": 4.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}, {"id": "83221710", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.1,"y": 0.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]} +{"pois": [{"id": "UWB_BEACON_1", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": 3.1,"y": 0.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "UWB_BEACON_2", "description": "Beacon_Position", "data": {"type" : "UWB"}, "position": {"refSystemId": "ROOT", "point": {"x": -0.3,"y": 4.5,"z": 0.0}, "accuracy": 1.0}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0}}, {"id": "83221710", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.1,"y": 0.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "31762128", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.2,"y": 3.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]} {"monitoringRequests": [{"frameId": "cobot1_door_zone", "monitoringTaskId": "Human_at_Door_Side", "serializationType": "protobuf"}, {"frameId": "cobot1_window_zone", "monitoringTaskId": "Human_at_Window_Side", "serializationType": "protobuf"}]} \ No newline at end of file diff --git a/init_Sensordatenfusion.txt b/init_Sensordatenfusion.txt index fa473d3e9e4c79b7085c3c9a9554a40dcc69f177..889f82a0f9b15b738bcaacc88a23ccab33059bfa 100644 --- a/init_Sensordatenfusion.txt +++ b/init_Sensordatenfusion.txt @@ -1,5 +1,5 @@ {"frames": [{"id": "robolab", "space": [{"position": {"refSystemId": "ROOT", "point": {"x": 2.0,"y": 0.0,"z": 0.0}, "accuracy": 0.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "x": 10.0, "y": 10.0, "z":10.0}]} ]} {"refSystems": [{"id": "ROOT"}]} {"objectConfigs": [{"agentId": "turtlebot", "sensorId": "UWB_1", "agentType": "HUMAN", "sensorType": "UWB"}, {"agentId": "turtlebot", "sensorId": "98:CD:AC:26:2D:18", "agentType": "ROBOT", "sensorType": "RFID_SCANNER"}]} -{"pois": [{"id": "83221710", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.1,"y": 0.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]} +{"pois": [{"id": "83221710", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.1,"y": 0.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }, {"id": "31762128", "description": "RFID_TAG", "data": {"type" : "NFC"}, "position": {"refSystemId": "ROOT", "point": {"x": 2.2,"y": 3.4,"z": 0.5}, "accuracy": 0.1}, "orientation": {"x": 0.0,"y": 0.0,"z": 0.0, "w": 0.0} }]} {"monitoringRequests": [{"frameId": "robolab", "monitoringTaskId": "robolab_topic", "serializationType": "json"}]} \ No newline at end of file diff --git a/logback-spring.xml b/logback-spring.xml new file mode 100644 index 0000000000000000000000000000000000000000..d94e304855d95c18bae85380a1b18636ee46da84 --- /dev/null +++ b/logback-spring.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<configuration> + + <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> + <filter class="ipos.project.CustomLoggingFilter" /> + <layout class="ch.qos.logback.classic.PatternLayout"> + <Pattern> + %black(%d{ISO8601}) %highlight(%-5level) [%blue(%t)] %yellow(%C{1.}):: %msg%n%throwable + </Pattern> + </layout> + </appender> + +<appender name="FILE" class="ch.qos.logback.core.FileAppender"> + <file>testFile.log</file> + <append>true</append> + <!-- set immediateFlush to false for much higher logging throughput --> + <immediateFlush>false</immediateFlush> + <!-- encoders are assigned the type + ch.qos.logback.classic.encoder.PatternLayoutEncoder by default --> + <encoder> + <pattern>%-4relative [%thread] %-5level %logger{35} - %msg%n</pattern> + </encoder> + </appender> + + + <root level="INFO"> + <appender-ref ref="STDOUT" /> + <appender-ref ref="FILE" /> + </root> +</configuration> \ No newline at end of file diff --git a/src/main/java/ipos/project/CustomLoggingFilter.java b/src/main/java/ipos/project/CustomLoggingFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..483fcfd3eea85d66d6df2c19ccfd309165407d2a --- /dev/null +++ b/src/main/java/ipos/project/CustomLoggingFilter.java @@ -0,0 +1,20 @@ +package ipos.project; + +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.filter.Filter; +import ch.qos.logback.core.spi.FilterReply; + +public class CustomLoggingFilter extends Filter<ILoggingEvent> { + + @Override + public FilterReply decide(ILoggingEvent event) { + if (event.getMessage().contains("Eventfilter:")) { + return FilterReply.DENY; + } else if (event.getMessage().contains("SDF:")) { + return FilterReply.ACCEPT; + }else { + return FilterReply.DENY; + } + + } +} \ No newline at end of file diff --git a/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/SimpleSceneIntegration.java b/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/SimpleSceneIntegration.java index 43285c6ed42b3212029be91d58cf8fabe5847174..113ed3cca299106babb7c17c83cdd40d2f396169 100644 --- a/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/SimpleSceneIntegration.java +++ b/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/SimpleSceneIntegration.java @@ -5,6 +5,7 @@ import ipos.models.SimpleScene; import ipos.project.DataModellntegration.SimpleSceneIntegration.api.MqttRequestHandler; import ipos.project.DataModellntegration.SimpleSceneIntegration.service.SimpleSceneTransformer; import ipos.project.DataModellntegration.SimpleSceneIntegration.service.impl.ExternalPubServiceImpl; +import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse; import ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent; import ipos.project.UseCaseController.Administration; import ipos.project.UseCaseController.PositionMonitoring; @@ -81,11 +82,18 @@ public class SimpleSceneIntegration { } }*/ + public static void receiveMessage(DataStorageQueryResponse dsQueryResponse, String trackingTaskId){ + // TODO (tracking): implement function receiveMessage(DataStorageQueryResponse dsQueryResponse, String trackingTaskId) + // serialization type wird noch benötigt + } + public static void receiveMessage(PositionEvent positionEvent, String monitoringTaskId, String notificationType, String serializationType) { //String jsonPos = ProtoJsonMap.toJson(positionEvent); // we can translate a class into a string using several methods: 1) `.toString()` 2) `JsonFormat` in `ProtoJsonMap` if (positionEvent != null) { + // TODO (Tracking): The following transformer-call has to copy the zoneDescriptors of PositionEvent into the IposPositionEvent SimpleScene.IposPositionEvent posEvent_proto = SimpleSceneTransformer.posEvent_internal2Proto(positionEvent, notificationType); MqttMessage mqttMessage = mqttService.createMqttMsg(posEvent_proto, 0, false); + logging_sdf(monitoringTaskId, serializationType, posEvent_proto); // publishes protobuf over MQTT if (PositionMonitoring.PROTOBUF_SERIALIZATION_TYPE.equals(serializationType)){ @@ -104,4 +112,18 @@ public class SimpleSceneIntegration { } } + private static void logging_sdf(String monitoringTaskId, String serializationType, SimpleScene.IposPositionEvent posEvent_proto) { + for (SimpleScene.IposObject obj : posEvent_proto.getObjectList()){ + String agentId = obj.getId(); + String sensorId = obj.getSensorId(); + String sensorType = obj.getSensorType(); + String timestamp = obj.getLastPosUpdate(); + String topic = monitoringTaskId; + LOG.info("SDF: Publishing: sensorType: " + sensorType + " timestamp: " + timestamp + " sensorId: " + sensorId + " agentId: " + agentId + " serializationType: " + serializationType); + LOG.info("SDF: "); + LOG.info("SDF: "); + LOG.info("SDF: "); + } + } + } diff --git a/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/api/MqttRequestHandler.java b/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/api/MqttRequestHandler.java index d316f8df12ca436b0e9fa6cd55ddb23d77025dce..77879d8e1ba46b12e198ecc964e3b6bf8366d644 100644 --- a/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/api/MqttRequestHandler.java +++ b/src/main/java/ipos/project/DataModellntegration/SimpleSceneIntegration/api/MqttRequestHandler.java @@ -51,6 +51,7 @@ public class MqttRequestHandler implements Handler { processFrameConfigs(iposConfigWrapper.getFramesList()); // should be done not before refSystem-processing, as it might require one of the processed refSystems processObjectConfigs(iposConfigWrapper.getObjectConfigsList()); processPois(iposConfigWrapper.getPoisList()); + // TODO (tracking): processQueryRequest has to be implemented // this.jmsTemplate.convertAndSend("/request123", monReqInternal); // submit request to the internal broker } diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryRequest.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryRequest.java index 9ac0c20521c1a22d76c177999b3f1b0fb9d5901d..15c18f9fd980a80d09cd0bd7885ec5152fcffb3f 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryRequest.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryRequest.java @@ -9,10 +9,38 @@ import org.eclipse.emf.ecore.EObject; * A representation of the model object '<em><b>Data Storage Query Request</b></em>'. * <!-- end-user-doc --> * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest#getTrackingTaskId <em>Tracking Task Id</em>}</li> + * </ul> * * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getDataStorageQueryRequest() * @model * @generated */ public interface DataStorageQueryRequest extends EObject { + + /** + * Returns the value of the '<em><b>Tracking Task Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Tracking Task Id</em>' attribute. + * @see #setTrackingTaskId(String) + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getDataStorageQueryRequest_TrackingTaskId() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" + * @generated + */ + String getTrackingTaskId(); + + /** + * Sets the value of the '{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest#getTrackingTaskId <em>Tracking Task Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Tracking Task Id</em>' attribute. + * @see #getTrackingTaskId() + * @generated + */ + void setTrackingTaskId(String value); } // DataStorageQueryRequest diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryResponse.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryResponse.java new file mode 100644 index 0000000000000000000000000000000000000000..d917237958783d822c56a62c7f8740d10228cfad --- /dev/null +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/DataStorageQueryResponse.java @@ -0,0 +1,38 @@ +/** + */ +package ipos.project.DataModellntegration.iPos_Datamodel; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Data Storage Query Response</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse#getPositionEvents <em>Position Events</em>}</li> + * </ul> + * + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getDataStorageQueryResponse() + * @model + * @generated + */ +public interface DataStorageQueryResponse extends EObject { + /** + * Returns the value of the '<em><b>Position Events</b></em>' reference list. + * The list contents are of type {@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Position Events</em>' reference list. + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getDataStorageQueryResponse_PositionEvents() + * @model + * @generated + */ + EList<PositionEvent> getPositionEvents(); + +} // DataStorageQueryResponse diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelFactory.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelFactory.java index 54ad4b32e24c9430484b8ac10161290c80c12900..5235205e6efd53af937d45220adc7160c08df9ff 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelFactory.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelFactory.java @@ -427,6 +427,24 @@ public interface IPos_DatamodelFactory extends EFactory { */ EventFilterCondition createEventFilterCondition(); + /** + * Returns a new object of class '<em>Zone Descriptor</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Zone Descriptor</em>'. + * @generated + */ + ZoneDescriptor createZoneDescriptor(); + + /** + * Returns a new object of class '<em>Data Storage Query Response</em>'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return a new object of class '<em>Data Storage Query Response</em>'. + * @generated + */ + DataStorageQueryResponse createDataStorageQueryResponse(); + /** * Returns the package supported by this factory. * <!-- begin-user-doc --> diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelPackage.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelPackage.java index f21f40291e5bc9bf49b93e89eb5e87c97d274703..53140b07ab1fd8bfc2885eb35758d088847b4a1e 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelPackage.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/IPos_DatamodelPackage.java @@ -1371,6 +1371,15 @@ public interface IPos_DatamodelPackage extends EPackage { */ int POSITION_EVENT__LOBJECT_ID = 2; + /** + * The feature id for the '<em><b>Zonedescriptors</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int POSITION_EVENT__ZONEDESCRIPTORS = 3; + /** * The number of structural features of the '<em>Position Event</em>' class. * <!-- begin-user-doc --> @@ -1378,7 +1387,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @generated * @ordered */ - int POSITION_EVENT_FEATURE_COUNT = 3; + int POSITION_EVENT_FEATURE_COUNT = 4; /** * The number of operations of the '<em>Position Event</em>' class. @@ -1702,6 +1711,15 @@ public interface IPos_DatamodelPackage extends EPackage { */ int DATA_STORAGE_QUERY_REQUEST = 32; + /** + * The feature id for the '<em><b>Tracking Task Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID = 0; + /** * The number of structural features of the '<em>Data Storage Query Request</em>' class. * <!-- begin-user-doc --> @@ -1709,7 +1727,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @generated * @ordered */ - int DATA_STORAGE_QUERY_REQUEST_FEATURE_COUNT = 0; + int DATA_STORAGE_QUERY_REQUEST_FEATURE_COUNT = 1; /** * The number of operations of the '<em>Data Storage Query Request</em>' class. @@ -2452,6 +2470,89 @@ public interface IPos_DatamodelPackage extends EPackage { */ int EVENT_FILTER_CONDITION_OPERATION_COUNT = 0; + /** + * The meta object id for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl <em>Zone Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getZoneDescriptor() + * @generated + */ + int ZONE_DESCRIPTOR = 45; + + /** + * The feature id for the '<em><b>Zone Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ZONE_DESCRIPTOR__ZONE_ID = 0; + + /** + * The feature id for the '<em><b>Notification Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ZONE_DESCRIPTOR__NOTIFICATION_TYPE = 1; + + /** + * The number of structural features of the '<em>Zone Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ZONE_DESCRIPTOR_FEATURE_COUNT = 2; + + /** + * The number of operations of the '<em>Zone Descriptor</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ZONE_DESCRIPTOR_OPERATION_COUNT = 0; + + /** + * The meta object id for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryResponseImpl <em>Data Storage Query Response</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryResponseImpl + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getDataStorageQueryResponse() + * @generated + */ + int DATA_STORAGE_QUERY_RESPONSE = 46; + + /** + * The feature id for the '<em><b>Position Events</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS = 0; + + /** + * The number of structural features of the '<em>Data Storage Query Response</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DATA_STORAGE_QUERY_RESPONSE_FEATURE_COUNT = 1; + + /** + * The number of operations of the '<em>Data Storage Query Response</em>' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int DATA_STORAGE_QUERY_RESPONSE_OPERATION_COUNT = 0; + /** * The meta object id for the '<em>String List</em>' data type. * <!-- begin-user-doc --> @@ -2460,7 +2561,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getStringList() * @generated */ - int STRING_LIST = 45; + int STRING_LIST = 47; /** * The meta object id for the '<em>String Array</em>' data type. @@ -2469,7 +2570,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getStringArray() * @generated */ - int STRING_ARRAY = 46; + int STRING_ARRAY = 48; /** * The meta object id for the '<em>Float Array3d</em>' data type. @@ -2478,7 +2579,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getFloatArray3d() * @generated */ - int FLOAT_ARRAY3D = 47; + int FLOAT_ARRAY3D = 49; /** * The meta object id for the '<em>Boolean List</em>' data type. @@ -2487,7 +2588,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getBooleanList() * @generated */ - int BOOLEAN_LIST = 48; + int BOOLEAN_LIST = 50; /** * The meta object id for the '<em>Float Array</em>' data type. @@ -2496,7 +2597,7 @@ public interface IPos_DatamodelPackage extends EPackage { * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getFloatArray() * @generated */ - int FLOAT_ARRAY = 49; + int FLOAT_ARRAY = 51; /** * Returns the meta object for class '{@link ipos.project.DataModellntegration.iPos_Datamodel.Agent <em>Agent</em>}'. @@ -3352,6 +3453,17 @@ public interface IPos_DatamodelPackage extends EPackage { */ EAttribute getPositionEvent_LObjectId(); + /** + * Returns the meta object for the reference list '{@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getZonedescriptors <em>Zonedescriptors</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Zonedescriptors</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getZonedescriptors() + * @see #getPositionEvent() + * @generated + */ + EReference getPositionEvent_Zonedescriptors(); + /** * Returns the meta object for class '{@link ipos.project.DataModellntegration.iPos_Datamodel.TrackingRequest <em>Tracking Request</em>}'. * <!-- begin-user-doc --> @@ -3587,6 +3699,17 @@ public interface IPos_DatamodelPackage extends EPackage { */ EClass getDataStorageQueryRequest(); + /** + * Returns the meta object for the attribute '{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest#getTrackingTaskId <em>Tracking Task Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Tracking Task Id</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest#getTrackingTaskId() + * @see #getDataStorageQueryRequest() + * @generated + */ + EAttribute getDataStorageQueryRequest_TrackingTaskId(); + /** * Returns the meta object for class '{@link ipos.project.DataModellntegration.iPos_Datamodel.AgentRegistrationRequest <em>Agent Registration Request</em>}'. * <!-- begin-user-doc --> @@ -3971,6 +4094,59 @@ public interface IPos_DatamodelPackage extends EPackage { */ EAttribute getEventFilterCondition_PositionConditionCellId(); + /** + * Returns the meta object for class '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor <em>Zone Descriptor</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Zone Descriptor</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor + * @generated + */ + EClass getZoneDescriptor(); + + /** + * Returns the meta object for the attribute '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getZoneId <em>Zone Id</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Zone Id</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getZoneId() + * @see #getZoneDescriptor() + * @generated + */ + EAttribute getZoneDescriptor_ZoneId(); + + /** + * Returns the meta object for the attribute '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getNotificationType <em>Notification Type</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Notification Type</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getNotificationType() + * @see #getZoneDescriptor() + * @generated + */ + EAttribute getZoneDescriptor_NotificationType(); + + /** + * Returns the meta object for class '{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse <em>Data Storage Query Response</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for class '<em>Data Storage Query Response</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse + * @generated + */ + EClass getDataStorageQueryResponse(); + + /** + * Returns the meta object for the reference list '{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse#getPositionEvents <em>Position Events</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference list '<em>Position Events</em>'. + * @see ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse#getPositionEvents() + * @see #getDataStorageQueryResponse() + * @generated + */ + EReference getDataStorageQueryResponse_PositionEvents(); + /** * Returns the meta object for data type '{@link java.util.List <em>String List</em>}'. * <!-- begin-user-doc --> @@ -4737,6 +4913,14 @@ public interface IPos_DatamodelPackage extends EPackage { */ EAttribute POSITION_EVENT__LOBJECT_ID = eINSTANCE.getPositionEvent_LObjectId(); + /** + * The meta object literal for the '<em><b>Zonedescriptors</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference POSITION_EVENT__ZONEDESCRIPTORS = eINSTANCE.getPositionEvent_Zonedescriptors(); + /** * The meta object literal for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.TrackingRequestImpl <em>Tracking Request</em>}' class. * <!-- begin-user-doc --> @@ -4930,6 +5114,14 @@ public interface IPos_DatamodelPackage extends EPackage { */ EClass DATA_STORAGE_QUERY_REQUEST = eINSTANCE.getDataStorageQueryRequest(); + /** + * The meta object literal for the '<em><b>Tracking Task Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID = eINSTANCE.getDataStorageQueryRequest_TrackingTaskId(); + /** * The meta object literal for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.AgentRegistrationRequestImpl <em>Agent Registration Request</em>}' class. * <!-- begin-user-doc --> @@ -5244,6 +5436,51 @@ public interface IPos_DatamodelPackage extends EPackage { EAttribute EVENT_FILTER_CONDITION__POSITION_CONDITION_CELL_ID = eINSTANCE .getEventFilterCondition_PositionConditionCellId(); + /** + * The meta object literal for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl <em>Zone Descriptor</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getZoneDescriptor() + * @generated + */ + EClass ZONE_DESCRIPTOR = eINSTANCE.getZoneDescriptor(); + + /** + * The meta object literal for the '<em><b>Zone Id</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ZONE_DESCRIPTOR__ZONE_ID = eINSTANCE.getZoneDescriptor_ZoneId(); + + /** + * The meta object literal for the '<em><b>Notification Type</b></em>' attribute feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EAttribute ZONE_DESCRIPTOR__NOTIFICATION_TYPE = eINSTANCE.getZoneDescriptor_NotificationType(); + + /** + * The meta object literal for the '{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryResponseImpl <em>Data Storage Query Response</em>}' class. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryResponseImpl + * @see ipos.project.DataModellntegration.iPos_Datamodel.impl.IPos_DatamodelPackageImpl#getDataStorageQueryResponse() + * @generated + */ + EClass DATA_STORAGE_QUERY_RESPONSE = eINSTANCE.getDataStorageQueryResponse(); + + /** + * The meta object literal for the '<em><b>Position Events</b></em>' reference list feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS = eINSTANCE + .getDataStorageQueryResponse_PositionEvents(); + /** * The meta object literal for the '<em>String List</em>' data type. * <!-- begin-user-doc --> diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/PositionEvent.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/PositionEvent.java index 1df2c2abfb76bdac48e4c289d81f48ed8bbbb436..4b04f4b04f8ff356128e72642285d6233ffbde1b 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/PositionEvent.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/PositionEvent.java @@ -2,6 +2,7 @@ */ package ipos.project.DataModellntegration.iPos_Datamodel; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** @@ -16,6 +17,7 @@ import org.eclipse.emf.ecore.EObject; * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getPlacing <em>Placing</em>}</li> * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getTimeStamp <em>Time Stamp</em>}</li> * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getLObjectId <em>LObject Id</em>}</li> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent#getZonedescriptors <em>Zonedescriptors</em>}</li> * </ul> * * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getPositionEvent() @@ -89,4 +91,16 @@ public interface PositionEvent extends EObject { */ void setLObjectId(String value); + /** + * Returns the value of the '<em><b>Zonedescriptors</b></em>' reference list. + * The list contents are of type {@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor}. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Zonedescriptors</em>' reference list. + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getPositionEvent_Zonedescriptors() + * @model + * @generated + */ + EList<ZoneDescriptor> getZonedescriptors(); + } // PositionEvent diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/ZoneDescriptor.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/ZoneDescriptor.java new file mode 100644 index 0000000000000000000000000000000000000000..01999e6cea4f9d67ff2a40aaef3e8e028cc3ebf1 --- /dev/null +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/ZoneDescriptor.java @@ -0,0 +1,69 @@ +/** + */ +package ipos.project.DataModellntegration.iPos_Datamodel; + +import org.eclipse.emf.ecore.EObject; + +/** + * <!-- begin-user-doc --> + * A representation of the model object '<em><b>Zone Descriptor</b></em>'. + * <!-- end-user-doc --> + * + * <p> + * The following features are supported: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getZoneId <em>Zone Id</em>}</li> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getNotificationType <em>Notification Type</em>}</li> + * </ul> + * + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getZoneDescriptor() + * @model + * @generated + */ +public interface ZoneDescriptor extends EObject { + /** + * Returns the value of the '<em><b>Zone Id</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Zone Id</em>' attribute. + * @see #setZoneId(String) + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getZoneDescriptor_ZoneId() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" + * @generated + */ + String getZoneId(); + + /** + * Sets the value of the '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getZoneId <em>Zone Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Zone Id</em>' attribute. + * @see #getZoneId() + * @generated + */ + void setZoneId(String value); + + /** + * Returns the value of the '<em><b>Notification Type</b></em>' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the value of the '<em>Notification Type</em>' attribute. + * @see #setNotificationType(String) + * @see ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage#getZoneDescriptor_NotificationType() + * @model dataType="org.eclipse.emf.ecore.xml.type.String" + * @generated + */ + String getNotificationType(); + + /** + * Sets the value of the '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor#getNotificationType <em>Notification Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Notification Type</em>' attribute. + * @see #getNotificationType() + * @generated + */ + void setNotificationType(String value); + +} // ZoneDescriptor diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryRequestImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryRequestImpl.java index 5ae52a5efe39d208fc982f227939081380e47045..be73228017f330f1efff695e9195cf4cd30105ad 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryRequestImpl.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryRequestImpl.java @@ -5,18 +5,45 @@ package ipos.project.DataModellntegration.iPos_Datamodel.impl; import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest; import ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage; +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Data Storage Query Request</b></em>'. * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryRequestImpl#getTrackingTaskId <em>Tracking Task Id</em>}</li> + * </ul> * * @generated */ public class DataStorageQueryRequestImpl extends MinimalEObjectImpl.Container implements DataStorageQueryRequest { + /** + * The default value of the '{@link #getTrackingTaskId() <em>Tracking Task Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTrackingTaskId() + * @generated + * @ordered + */ + protected static final String TRACKING_TASK_ID_EDEFAULT = null; + /** + * The cached value of the '{@link #getTrackingTaskId() <em>Tracking Task Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getTrackingTaskId() + * @generated + * @ordered + */ + protected String trackingTaskId = TRACKING_TASK_ID_EDEFAULT; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -36,4 +63,103 @@ public class DataStorageQueryRequestImpl extends MinimalEObjectImpl.Container im return IPos_DatamodelPackage.Literals.DATA_STORAGE_QUERY_REQUEST; } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getTrackingTaskId() { + return trackingTaskId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setTrackingTaskId(String newTrackingTaskId) { + String oldTrackingTaskId = trackingTaskId; + trackingTaskId = newTrackingTaskId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + IPos_DatamodelPackage.DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID, oldTrackingTaskId, + trackingTaskId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID: + return getTrackingTaskId(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID: + setTrackingTaskId((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID: + setTrackingTaskId(TRACKING_TASK_ID_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID: + return TRACKING_TASK_ID_EDEFAULT == null ? trackingTaskId != null + : !TRACKING_TASK_ID_EDEFAULT.equals(trackingTaskId); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (trackingTaskId: "); + result.append(trackingTaskId); + result.append(')'); + return result.toString(); + } + } //DataStorageQueryRequestImpl diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryResponseImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryResponseImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..62f001423a9714e636a51697e29c747d4c2cfbe1 --- /dev/null +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/DataStorageQueryResponseImpl.java @@ -0,0 +1,135 @@ +/** + */ +package ipos.project.DataModellntegration.iPos_Datamodel.impl; + +import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse; +import ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage; +import ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent; + +import java.util.Collection; + +import org.eclipse.emf.common.util.EList; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +import org.eclipse.emf.ecore.util.EObjectResolvingEList; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Data Storage Query Response</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.DataStorageQueryResponseImpl#getPositionEvents <em>Position Events</em>}</li> + * </ul> + * + * @generated + */ +public class DataStorageQueryResponseImpl extends MinimalEObjectImpl.Container implements DataStorageQueryResponse { + /** + * The cached value of the '{@link #getPositionEvents() <em>Position Events</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getPositionEvents() + * @generated + * @ordered + */ + protected EList<PositionEvent> positionEvents; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected DataStorageQueryResponseImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return IPos_DatamodelPackage.Literals.DATA_STORAGE_QUERY_RESPONSE; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<PositionEvent> getPositionEvents() { + if (positionEvents == null) { + positionEvents = new EObjectResolvingEList<PositionEvent>(PositionEvent.class, this, + IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS); + } + return positionEvents; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS: + return getPositionEvents(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @SuppressWarnings("unchecked") + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS: + getPositionEvents().clear(); + getPositionEvents().addAll((Collection<? extends PositionEvent>) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS: + getPositionEvents().clear(); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS: + return positionEvents != null && !positionEvents.isEmpty(); + } + return super.eIsSet(featureID); + } + +} //DataStorageQueryResponseImpl diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelFactoryImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelFactoryImpl.java index 247cecdcdbdcb66acc37f0e515f81d9f3dea1a4b..294c95f41efb2c8d23ba13248ec65ab03b8c8152 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelFactoryImpl.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelFactoryImpl.java @@ -150,6 +150,10 @@ public class IPos_DatamodelFactoryImpl extends EFactoryImpl implements IPos_Data return createPOI(); case IPos_DatamodelPackage.EVENT_FILTER_CONDITION: return createEventFilterCondition(); + case IPos_DatamodelPackage.ZONE_DESCRIPTOR: + return createZoneDescriptor(); + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE: + return createDataStorageQueryResponse(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } @@ -651,6 +655,26 @@ public class IPos_DatamodelFactoryImpl extends EFactoryImpl implements IPos_Data return eventFilterCondition; } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public ZoneDescriptor createZoneDescriptor() { + ZoneDescriptorImpl zoneDescriptor = new ZoneDescriptorImpl(); + return zoneDescriptor; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public DataStorageQueryResponse createDataStorageQueryResponse() { + DataStorageQueryResponseImpl dataStorageQueryResponse = new DataStorageQueryResponseImpl(); + return dataStorageQueryResponse; + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelPackageImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelPackageImpl.java index d05df34103dc0251e413e0b1b21f4f7e67fdbf85..c581d858fb63fb8f8f58f1c77488cfa30083064d 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelPackageImpl.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/IPos_DatamodelPackageImpl.java @@ -10,6 +10,7 @@ import ipos.project.DataModellntegration.iPos_Datamodel.Barcode; import ipos.project.DataModellntegration.iPos_Datamodel.Beacon; import ipos.project.DataModellntegration.iPos_Datamodel.Bluetooth; import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryRequest; +import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse; import ipos.project.DataModellntegration.iPos_Datamodel.DataStorageRequest; import ipos.project.DataModellntegration.iPos_Datamodel.Entity; import ipos.project.DataModellntegration.iPos_Datamodel.EventFilterCondition; @@ -43,6 +44,7 @@ import ipos.project.DataModellntegration.iPos_Datamodel.WorldModel; import ipos.project.DataModellntegration.iPos_Datamodel.WorldModelQueryRequest; import ipos.project.DataModellntegration.iPos_Datamodel.WorldModelUpdateRequest; import ipos.project.DataModellntegration.iPos_Datamodel.Zone; +import ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor; import ipos.project.DataModellntegration.iPos_Datamodel.ZoneMap; import java.util.ArrayList; @@ -381,6 +383,20 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data */ private EClass eventFilterConditionEClass = null; + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass zoneDescriptorEClass = null; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + private EClass dataStorageQueryResponseEClass = null; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1203,6 +1219,15 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data return (EAttribute) positionEventEClass.getEStructuralFeatures().get(2); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getPositionEvent_Zonedescriptors() { + return (EReference) positionEventEClass.getEStructuralFeatures().get(3); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1401,6 +1426,15 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data return dataStorageQueryRequestEClass; } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getDataStorageQueryRequest_TrackingTaskId() { + return (EAttribute) dataStorageQueryRequestEClass.getEStructuralFeatures().get(0); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1725,6 +1759,51 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data return (EAttribute) eventFilterConditionEClass.getEStructuralFeatures().get(10); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getZoneDescriptor() { + return zoneDescriptorEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getZoneDescriptor_ZoneId() { + return (EAttribute) zoneDescriptorEClass.getEStructuralFeatures().get(0); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EAttribute getZoneDescriptor_NotificationType() { + return (EAttribute) zoneDescriptorEClass.getEStructuralFeatures().get(1); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EClass getDataStorageQueryResponse() { + return dataStorageQueryResponseEClass; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getDataStorageQueryResponse_PositionEvents() { + return (EReference) dataStorageQueryResponseEClass.getEStructuralFeatures().get(0); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -1904,6 +1983,7 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data createEReference(positionEventEClass, POSITION_EVENT__PLACING); createEAttribute(positionEventEClass, POSITION_EVENT__TIME_STAMP); createEAttribute(positionEventEClass, POSITION_EVENT__LOBJECT_ID); + createEReference(positionEventEClass, POSITION_EVENT__ZONEDESCRIPTORS); trackingRequestEClass = createEClass(TRACKING_REQUEST); @@ -1933,6 +2013,7 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data worldModelQueryRequestEClass = createEClass(WORLD_MODEL_QUERY_REQUEST); dataStorageQueryRequestEClass = createEClass(DATA_STORAGE_QUERY_REQUEST); + createEAttribute(dataStorageQueryRequestEClass, DATA_STORAGE_QUERY_REQUEST__TRACKING_TASK_ID); agentRegistrationRequestEClass = createEClass(AGENT_REGISTRATION_REQUEST); @@ -1982,6 +2063,13 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data createEAttribute(eventFilterConditionEClass, EVENT_FILTER_CONDITION__CATEGORY_CONDITION); createEAttribute(eventFilterConditionEClass, EVENT_FILTER_CONDITION__POSITION_CONDITION_CELL_ID); + zoneDescriptorEClass = createEClass(ZONE_DESCRIPTOR); + createEAttribute(zoneDescriptorEClass, ZONE_DESCRIPTOR__ZONE_ID); + createEAttribute(zoneDescriptorEClass, ZONE_DESCRIPTOR__NOTIFICATION_TYPE); + + dataStorageQueryResponseEClass = createEClass(DATA_STORAGE_QUERY_RESPONSE); + createEReference(dataStorageQueryResponseEClass, DATA_STORAGE_QUERY_RESPONSE__POSITION_EVENTS); + // Create data types stringListEDataType = createEDataType(STRING_LIST); stringArrayEDataType = createEDataType(STRING_ARRAY); @@ -2254,6 +2342,9 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data initEAttribute(getPositionEvent_LObjectId(), ecorePackage.getEString(), "lObjectId", null, 0, 1, PositionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getPositionEvent_Zonedescriptors(), this.getZoneDescriptor(), null, "zonedescriptors", null, 0, + -1, PositionEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(trackingRequestEClass, TrackingRequest.class, "TrackingRequest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -2328,6 +2419,9 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data initEClass(dataStorageQueryRequestEClass, DataStorageQueryRequest.class, "DataStorageQueryRequest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getDataStorageQueryRequest_TrackingTaskId(), theXMLTypePackage.getString(), "trackingTaskId", + null, 0, 1, DataStorageQueryRequest.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, + !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(agentRegistrationRequestEClass, AgentRegistrationRequest.class, "AgentRegistrationRequest", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -2453,6 +2547,21 @@ public class IPos_DatamodelPackageImpl extends EPackageImpl implements IPos_Data "positionConditionCellId", null, 0, 1, EventFilterCondition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEClass(zoneDescriptorEClass, ZoneDescriptor.class, "ZoneDescriptor", !IS_ABSTRACT, !IS_INTERFACE, + IS_GENERATED_INSTANCE_CLASS); + initEAttribute(getZoneDescriptor_ZoneId(), theXMLTypePackage.getString(), "zoneId", null, 0, 1, + ZoneDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + initEAttribute(getZoneDescriptor_NotificationType(), theXMLTypePackage.getString(), "notificationType", null, 0, + 1, ZoneDescriptor.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, + !IS_DERIVED, IS_ORDERED); + + initEClass(dataStorageQueryResponseEClass, DataStorageQueryResponse.class, "DataStorageQueryResponse", + !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); + initEReference(getDataStorageQueryResponse_PositionEvents(), this.getPositionEvent(), null, "positionEvents", + null, 0, -1, DataStorageQueryResponse.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, + IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + // Initialize data types initEDataType(stringListEDataType, List.class, "StringList", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS, "java.util.List<java.lang.String>"); diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/PositionEventImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/PositionEventImpl.java index 9d25ef8f3cf84fd84cf35c801f9eb6f1a32ed879..452f4e2fa6d638b19a7cfdf90f31cf3631985132 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/PositionEventImpl.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/PositionEventImpl.java @@ -6,13 +6,17 @@ import ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage; import ipos.project.DataModellntegration.iPos_Datamodel.Placing; import ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent; +import ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor; +import java.util.Collection; import org.eclipse.emf.common.notify.Notification; +import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; +import org.eclipse.emf.ecore.util.EObjectResolvingEList; /** * <!-- begin-user-doc --> @@ -25,6 +29,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.PositionEventImpl#getPlacing <em>Placing</em>}</li> * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.PositionEventImpl#getTimeStamp <em>Time Stamp</em>}</li> * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.PositionEventImpl#getLObjectId <em>LObject Id</em>}</li> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.PositionEventImpl#getZonedescriptors <em>Zonedescriptors</em>}</li> * </ul> * * @generated @@ -80,6 +85,16 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P */ protected String lObjectId = LOBJECT_ID_EDEFAULT; + /** + * The cached value of the '{@link #getZonedescriptors() <em>Zonedescriptors</em>}' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getZonedescriptors() + * @generated + * @ordered + */ + protected EList<ZoneDescriptor> zonedescriptors; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -183,6 +198,19 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P oldLObjectId, lObjectId)); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EList<ZoneDescriptor> getZonedescriptors() { + if (zonedescriptors == null) { + zonedescriptors = new EObjectResolvingEList<ZoneDescriptor>(ZoneDescriptor.class, this, + IPos_DatamodelPackage.POSITION_EVENT__ZONEDESCRIPTORS); + } + return zonedescriptors; + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -199,6 +227,8 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P return getTimeStamp(); case IPos_DatamodelPackage.POSITION_EVENT__LOBJECT_ID: return getLObjectId(); + case IPos_DatamodelPackage.POSITION_EVENT__ZONEDESCRIPTORS: + return getZonedescriptors(); } return super.eGet(featureID, resolve, coreType); } @@ -208,6 +238,7 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P * <!-- end-user-doc --> * @generated */ + @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { @@ -220,6 +251,10 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P case IPos_DatamodelPackage.POSITION_EVENT__LOBJECT_ID: setLObjectId((String) newValue); return; + case IPos_DatamodelPackage.POSITION_EVENT__ZONEDESCRIPTORS: + getZonedescriptors().clear(); + getZonedescriptors().addAll((Collection<? extends ZoneDescriptor>) newValue); + return; } super.eSet(featureID, newValue); } @@ -241,6 +276,9 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P case IPos_DatamodelPackage.POSITION_EVENT__LOBJECT_ID: setLObjectId(LOBJECT_ID_EDEFAULT); return; + case IPos_DatamodelPackage.POSITION_EVENT__ZONEDESCRIPTORS: + getZonedescriptors().clear(); + return; } super.eUnset(featureID); } @@ -259,6 +297,8 @@ public class PositionEventImpl extends MinimalEObjectImpl.Container implements P return TIME_STAMP_EDEFAULT == null ? timeStamp != null : !TIME_STAMP_EDEFAULT.equals(timeStamp); case IPos_DatamodelPackage.POSITION_EVENT__LOBJECT_ID: return LOBJECT_ID_EDEFAULT == null ? lObjectId != null : !LOBJECT_ID_EDEFAULT.equals(lObjectId); + case IPos_DatamodelPackage.POSITION_EVENT__ZONEDESCRIPTORS: + return zonedescriptors != null && !zonedescriptors.isEmpty(); } return super.eIsSet(featureID); } diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/ZoneDescriptorImpl.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/ZoneDescriptorImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..fb9b988ccab577eeaf49221c0ffb1718cfc47e11 --- /dev/null +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/impl/ZoneDescriptorImpl.java @@ -0,0 +1,221 @@ +/** + */ +package ipos.project.DataModellntegration.iPos_Datamodel.impl; + +import ipos.project.DataModellntegration.iPos_Datamodel.IPos_DatamodelPackage; +import ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor; + +import org.eclipse.emf.common.notify.Notification; + +import org.eclipse.emf.ecore.EClass; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; +import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; + +/** + * <!-- begin-user-doc --> + * An implementation of the model object '<em><b>Zone Descriptor</b></em>'. + * <!-- end-user-doc --> + * <p> + * The following features are implemented: + * </p> + * <ul> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl#getZoneId <em>Zone Id</em>}</li> + * <li>{@link ipos.project.DataModellntegration.iPos_Datamodel.impl.ZoneDescriptorImpl#getNotificationType <em>Notification Type</em>}</li> + * </ul> + * + * @generated + */ +public class ZoneDescriptorImpl extends MinimalEObjectImpl.Container implements ZoneDescriptor { + /** + * The default value of the '{@link #getZoneId() <em>Zone Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getZoneId() + * @generated + * @ordered + */ + protected static final String ZONE_ID_EDEFAULT = null; + + /** + * The cached value of the '{@link #getZoneId() <em>Zone Id</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getZoneId() + * @generated + * @ordered + */ + protected String zoneId = ZONE_ID_EDEFAULT; + + /** + * The default value of the '{@link #getNotificationType() <em>Notification Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNotificationType() + * @generated + * @ordered + */ + protected static final String NOTIFICATION_TYPE_EDEFAULT = null; + + /** + * The cached value of the '{@link #getNotificationType() <em>Notification Type</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNotificationType() + * @generated + * @ordered + */ + protected String notificationType = NOTIFICATION_TYPE_EDEFAULT; + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected ZoneDescriptorImpl() { + super(); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + protected EClass eStaticClass() { + return IPos_DatamodelPackage.Literals.ZONE_DESCRIPTOR; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getZoneId() { + return zoneId; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setZoneId(String newZoneId) { + String oldZoneId = zoneId; + zoneId = newZoneId; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, IPos_DatamodelPackage.ZONE_DESCRIPTOR__ZONE_ID, + oldZoneId, zoneId)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public String getNotificationType() { + return notificationType; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNotificationType(String newNotificationType) { + String oldNotificationType = notificationType; + notificationType = newNotificationType; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + IPos_DatamodelPackage.ZONE_DESCRIPTOR__NOTIFICATION_TYPE, oldNotificationType, notificationType)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public Object eGet(int featureID, boolean resolve, boolean coreType) { + switch (featureID) { + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__ZONE_ID: + return getZoneId(); + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__NOTIFICATION_TYPE: + return getNotificationType(); + } + return super.eGet(featureID, resolve, coreType); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eSet(int featureID, Object newValue) { + switch (featureID) { + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__ZONE_ID: + setZoneId((String) newValue); + return; + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__NOTIFICATION_TYPE: + setNotificationType((String) newValue); + return; + } + super.eSet(featureID, newValue); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public void eUnset(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__ZONE_ID: + setZoneId(ZONE_ID_EDEFAULT); + return; + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__NOTIFICATION_TYPE: + setNotificationType(NOTIFICATION_TYPE_EDEFAULT); + return; + } + super.eUnset(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public boolean eIsSet(int featureID) { + switch (featureID) { + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__ZONE_ID: + return ZONE_ID_EDEFAULT == null ? zoneId != null : !ZONE_ID_EDEFAULT.equals(zoneId); + case IPos_DatamodelPackage.ZONE_DESCRIPTOR__NOTIFICATION_TYPE: + return NOTIFICATION_TYPE_EDEFAULT == null ? notificationType != null + : !NOTIFICATION_TYPE_EDEFAULT.equals(notificationType); + } + return super.eIsSet(featureID); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + @Override + public String toString() { + if (eIsProxy()) + return super.toString(); + + StringBuilder result = new StringBuilder(super.toString()); + result.append(" (zoneId: "); + result.append(zoneId); + result.append(", notificationType: "); + result.append(notificationType); + result.append(')'); + return result.toString(); + } + +} //ZoneDescriptorImpl diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelAdapterFactory.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelAdapterFactory.java index 18217b406eebd240c8e74f7c88bba827ac7619c1..fc55e17f431b9405d08e913102170864bc0568c1 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelAdapterFactory.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelAdapterFactory.java @@ -291,6 +291,16 @@ public class IPos_DatamodelAdapterFactory extends AdapterFactoryImpl { return createEventFilterConditionAdapter(); } + @Override + public Adapter caseZoneDescriptor(ZoneDescriptor object) { + return createZoneDescriptorAdapter(); + } + + @Override + public Adapter caseDataStorageQueryResponse(DataStorageQueryResponse object) { + return createDataStorageQueryResponseAdapter(); + } + @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -940,6 +950,34 @@ public class IPos_DatamodelAdapterFactory extends AdapterFactoryImpl { return null; } + /** + * Creates a new adapter for an object of class '{@link ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor <em>Zone Descriptor</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see ipos.project.DataModellntegration.iPos_Datamodel.ZoneDescriptor + * @generated + */ + public Adapter createZoneDescriptorAdapter() { + return null; + } + + /** + * Creates a new adapter for an object of class '{@link ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse <em>Data Storage Query Response</em>}'. + * <!-- begin-user-doc --> + * This default implementation returns null so that we can easily ignore cases; + * it's useful to ignore a case when inheritance will catch all the cases anyway. + * <!-- end-user-doc --> + * @return the new adapter. + * @see ipos.project.DataModellntegration.iPos_Datamodel.DataStorageQueryResponse + * @generated + */ + public Adapter createDataStorageQueryResponseAdapter() { + return null; + } + /** * Creates a new adapter for the default case. * <!-- begin-user-doc --> diff --git a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelSwitch.java b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelSwitch.java index 050ebfc116e7cb83312c238541bdb0c9320aad1a..b34c53055bcb1fe0aaf088c3a3c640be63e255d9 100644 --- a/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelSwitch.java +++ b/src/main/java/ipos/project/DataModellntegration/iPos_Datamodel/util/IPos_DatamodelSwitch.java @@ -431,6 +431,20 @@ public class IPos_DatamodelSwitch<T> extends Switch<T> { result = defaultCase(theEObject); return result; } + case IPos_DatamodelPackage.ZONE_DESCRIPTOR: { + ZoneDescriptor zoneDescriptor = (ZoneDescriptor) theEObject; + T result = caseZoneDescriptor(zoneDescriptor); + if (result == null) + result = defaultCase(theEObject); + return result; + } + case IPos_DatamodelPackage.DATA_STORAGE_QUERY_RESPONSE: { + DataStorageQueryResponse dataStorageQueryResponse = (DataStorageQueryResponse) theEObject; + T result = caseDataStorageQueryResponse(dataStorageQueryResponse); + if (result == null) + result = defaultCase(theEObject); + return result; + } default: return defaultCase(theEObject); } @@ -1111,6 +1125,36 @@ public class IPos_DatamodelSwitch<T> extends Switch<T> { return null; } + /** + * Returns the result of interpreting the object as an instance of '<em>Zone Descriptor</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Zone Descriptor</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseZoneDescriptor(ZoneDescriptor object) { + return null; + } + + /** + * Returns the result of interpreting the object as an instance of '<em>Data Storage Query Response</em>'. + * <!-- begin-user-doc --> + * This implementation returns null; + * returning a non-null result will terminate the switch. + * <!-- end-user-doc --> + * @param object the target of the switch. + * @return the result of interpreting the object as an instance of '<em>Data Storage Query Response</em>'. + * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) + * @generated + */ + public T caseDataStorageQueryResponse(DataStorageQueryResponse object) { + return null; + } + /** * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. * <!-- begin-user-doc --> diff --git a/src/main/java/ipos/project/Functionality/DataServices.java b/src/main/java/ipos/project/Functionality/DataServices.java index 18bd655dbb064fac74763b0d218c75008e045d90..67c656493120905aab2a7ac6e9b47be59d5b8cf4 100644 --- a/src/main/java/ipos/project/Functionality/DataServices.java +++ b/src/main/java/ipos/project/Functionality/DataServices.java @@ -5,6 +5,8 @@ import ipos.project.entity.IWorldModelAccess; import ipos.project.entity.LocalObjectWorldModel; import org.apache.logging.log4j.LogManager; +import java.util.HashMap; +import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -14,6 +16,8 @@ public class DataServices { private static IWorldModelAccess wma; + private static Map<String, List<PositionEvent>> trackingStorage = new HashMap<>(); + public static void clearWorldModel(){ wma = new LocalObjectWorldModel(); } @@ -64,6 +68,32 @@ public class DataServices { wma.addZone(zone_input); } + public static void persist(PositionEvent positionEvent, String trackingTaskId){ + List<PositionEvent> trackedPositions = trackingStorage.get(trackingTaskId); + if(trackedPositions == null){ + throw new IllegalArgumentException("unknown trackingTaskId"); + } + trackedPositions.add(positionEvent); + } + + public static List<PositionEvent> query(String trackingTaskId){ + List<PositionEvent> trackedPositions = trackingStorage.get(trackingTaskId); + if(trackedPositions == null){ + throw new IllegalArgumentException("unknown trackingTaskId"); + } + if (trackedPositions.equals(new LinkedList<PositionEvent>())){ + LOG.warn("No PositionEvents have been tracked for trackingTaskId " + trackingTaskId); + } + return trackedPositions; + } + + public static void initTrackingTask(String trackingTaskId){ + if (trackingStorage.get(trackingTaskId)!= null){ + LOG.warn("Cleaning tracking task " + trackingTaskId); + } + trackingStorage.put(trackingTaskId, new LinkedList<PositionEvent>()); + } + public static void addAgent(Agent agent_input) { for (Agent agent_loaded : wma.getAllAgents()){ if (agent_loaded.getId().equals(agent_input.getId())){ diff --git a/src/main/java/ipos/project/Functionality/SensorDataFusion.java b/src/main/java/ipos/project/Functionality/SensorDataFusion.java index ed20c0d265c8e41b8141f4a605c6268f02f825c0..0971f019a985e4906ee8d3524739b811bddef083 100644 --- a/src/main/java/ipos/project/Functionality/SensorDataFusion.java +++ b/src/main/java/ipos/project/Functionality/SensorDataFusion.java @@ -2,6 +2,7 @@ package ipos.project.Functionality; import ipos.project.DataModellntegration.iPos_Datamodel.Agent; import ipos.project.DataModellntegration.iPos_Datamodel.Gaussian; +import ipos.project.DataModellntegration.iPos_Datamodel.LocalizableObject; import ipos.project.DataModellntegration.iPos_Datamodel.PositionEvent; import ipos.project.UseCaseController.PositionMonitoring; import org.apache.logging.log4j.LogManager; @@ -50,17 +51,33 @@ public class SensorDataFusion { for (PositionEvent storedEvent : eventsForAgent){ float storedAccuracy = ((Gaussian) storedEvent.getPlacing().getPosition().getAccuracy()).getConfidenceInterval(); float eventAccuracy = ((Gaussian) positionEvent.getPlacing().getPosition().getAccuracy()).getConfidenceInterval();; + logging_sdf(positionEvent, storedEvent); if (storedAccuracy < eventAccuracy){ // it is important not to use <= here, as at least the current position event itself is contained in the list - LOG.info("SensorDataFusion rejected position-event: " + positionEvent.toString()); + logging_sdf(positionEvent); return false; } } return true; } + private static void logging_sdf(PositionEvent positionEvent, PositionEvent storedEvent) { + LocalDateTime eventTime = LocalDateTime.parse(positionEvent.getTimeStamp(), DateTimeFormatter.ISO_OFFSET_DATE_TIME); + LocalDateTime storedTime = LocalDateTime.parse(storedEvent.getTimeStamp(), DateTimeFormatter.ISO_OFFSET_DATE_TIME); + LOG.info("SDF: distance: " + Duration.between(storedTime, eventTime).toMillis()); + } + + private static void logging_sdf(PositionEvent positionEvent) { + LocalizableObject lObject = PositionMonitoring.getLObjectByIdOrNull(positionEvent.getLObjectId()); + String sensorType = lObject.getSensorType(); + String timestamp = positionEvent.getTimeStamp(); + String sensorId = positionEvent.getLObjectId(); + String agentId = lObject.getAgent().getId(); + LOG.info("SDF: SensorDataFusion rejected: sensorType: " + sensorType + " timestamp: " + timestamp + " sensorId: " + sensorId + "agentId: " + agentId); + } + private static void updateRecentEventStorage(List<PositionEvent> eventsForAgent, PositionEvent positionEvent) throws IllegalArgumentException { - eventsForAgent.add(0, positionEvent); removeOldEvents(eventsForAgent); + eventsForAgent.add(0, positionEvent); } /** @@ -78,6 +95,7 @@ public class SensorDataFusion { } LocalDateTime eventTime = LocalDateTime.parse(currEvent.getTimeStamp(), DateTimeFormatter.ISO_OFFSET_DATE_TIME); long eventAge = Duration.between(eventTime, now).toMillis(); + LOG.info("SDF: eventAge: " + eventAge + " ; timestamp: " + currEvent.getTimeStamp() + " ; now: " + now); if ( eventAge > PositionMonitoring.SDF_TIME_INTERVAL){ eventIt.remove(); removeSubsequentElements = true; diff --git a/src/main/java/ipos/project/Functionality/eventfilter/eventFilter.java b/src/main/java/ipos/project/Functionality/eventfilter/eventFilter.java index 9616305e980d2ba5c40dc92424b1919e74f6393e..99732ba87e808f6d2f5a193519bab83f493ecbf4 100644 --- a/src/main/java/ipos/project/Functionality/eventfilter/eventFilter.java +++ b/src/main/java/ipos/project/Functionality/eventfilter/eventFilter.java @@ -3,6 +3,7 @@ package ipos.project.Functionality.eventfilter; import ipos.project.Functionality.DataServices; import ipos.project.DataModellntegration.iPos_Datamodel.*; import ipos.project.UseCaseController.PositionMonitoring; +import org.apache.logging.log4j.LogManager; import java.sql.Timestamp; import java.lang.Math; @@ -14,6 +15,8 @@ import java.util.List; public class eventFilter { + private static org.apache.logging.log4j.Logger LOG = LogManager.getLogger(); + private boolean[] filterStructure; // private PositionEvent last_position_event; @@ -105,24 +108,24 @@ public class eventFilter { LocalizableObject lObject = DataServices.getLObjectByIdOrNull(event.getLObjectId()); boolean flag = false; //false for pass, true for block if (null == event.getPlacing() || null == event.getPlacing().getPosition() || null == event.getPlacing().getPosition().getPoint()){ - System.out.println("EventFilter: Warning: Received event with unknown Position. Sensor-id: " + event.getLObjectId()); + LOG.info("EventFilter: Warning: Received event with unknown Position. Sensor-id: " + event.getLObjectId()); return true; } if (null == lObject){ - System.out.println("EventFilter: Warning: Received event from sensor with unknown sensor-id: " + event.getLObjectId()); + LOG.info("EventFilter: Warning: Received event from sensor with unknown sensor-id: " + event.getLObjectId()); return true; } Agent agent = lObject.getAgent(); if (null == agent){ - System.out.println("EventFilter: Warning: Received event for sensor-id with unknown agent. Sensor-id: " + lObject.getId()); + LOG.info("EventFilter: Warning: Received event for sensor-id with unknown agent. Sensor-id: " + lObject.getId()); return true; } - System.out.println("Filter structure: " + filterStructure[0] + ", " + filterStructure[1] + ", " + filterStructure[2] + ", " + filterStructure[3] + ", " + filterStructure[4] + ", " + filterStructure[5] + ", " + filterStructure[6] + ", " + filterStructure[7]); + LOG.info("Eventfilter: Filter structure: " + filterStructure[0] + ", " + filterStructure[1] + ", " + filterStructure[2] + ", " + filterStructure[3] + ", " + filterStructure[4] + ", " + filterStructure[5] + ", " + filterStructure[6] + ", " + filterStructure[7]); //filter time conditions if (filterStructure[0]) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass - System.out.println("Time condition: " + timeCondition); + LOG.info("Eventfilter: Time condition: " + timeCondition); for (int i = 0; i < timeCondition.size(); i++) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); Date date = formatter.parse(event.getTimeStamp()); @@ -132,7 +135,7 @@ public class eventFilter { Timestamp lower_ts = new Timestamp(lower_date.getTime()); Timestamp upper_ts = new Timestamp(upper_date.getTime()); - System.out.println("Time in event" + ": " + date); + LOG.info("Eventfilter: Time in event" + ": " + date); if (lower_ts.equals(upper_ts) || ts.equals(lower_ts)) { flag = false; @@ -144,12 +147,12 @@ public class eventFilter { } } } - System.out.println("Filter status (Time) " + ": " + flag); + LOG.info("Eventfilter: Filter status (Time) " + ": " + flag); //filter category conditions if (filterStructure[1] && !flag) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass for (int i = 0; i < categoryCondition.size(); i++) { - System.out.println("Type in event: " + agent.getAgentType()); + LOG.info("Eventfilter: Type in event: " + agent.getAgentType()); if (agent.getAgentType().equals(categoryCondition.get(i))) { flag = false; @@ -157,7 +160,7 @@ public class eventFilter { } } } - System.out.println("Filter status (category) " + ": " + flag); + LOG.info("Eventfilter: Filter status (category) " + ": " + flag); //filter id conditions if (filterStructure[2] && !flag) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass @@ -168,7 +171,7 @@ public class eventFilter { } } } - System.out.println("Filter status (id) " + ": " + flag); + LOG.info("Eventfilter: Filter status (id) " + ": " + flag); //filter sensor_id conditions if (filterStructure[3] && !flag) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass @@ -181,13 +184,13 @@ public class eventFilter { } } } - System.out.println("Filter status (sensor_id) " + ": " + flag); + LOG.info("Eventfilter: Filter status (sensor_id) " + ": " + flag); //filter accuracy condition if (filterStructure[4] && !flag) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass - //System.out.println("Accuracy condition: " + accuracyCondition); - //System.out.println("Accuracy event: " + event.getPositionInfo().getPosition().getAccuracy()); + //LOG.info("Eventfilter: Accuracy condition: " + accuracyCondition); + //LOG.info("Eventfilter: Accuracy event: " + event.getPositionInfo().getPosition().getAccuracy()); if (event.getPlacing().getPosition().getAccuracy() instanceof Gaussian) { Gaussian gAccuracy = (Gaussian) event.getPlacing().getPosition().getAccuracy(); if (gAccuracy.getConfidenceInterval() <= accuracyCondition) { @@ -195,7 +198,7 @@ public class eventFilter { } } } - System.out.println("Filter status (accuracy) " + ": " + flag); + LOG.info("Eventfilter: Filter status (accuracy) " + ": " + flag); //filter position conditions @@ -216,7 +219,7 @@ public class eventFilter { } } } - System.out.println("Filter status (position) " + ": " + flag); + LOG.info("Eventfilter: Filter status (position) " + ": " + flag); //filter time_min_interval condition if (filterStructure[6] && !flag && last_position_event !=null) { flag = true; //switch the filter status to block, if the event meet the filter condition, switch to pass @@ -226,13 +229,13 @@ public class eventFilter { Date last_date = formatter.parse(last_position_event.getTimeStamp()); Timestamp last_ts = new Timestamp(last_date.getTime()); long interval = date.getTime() - last_date.getTime(); - //System.out.println("Time stamp" + ": " + ts); - //System.out.println("Interval" + ": " + interval); + //LOG.info("Eventfilter: Time stamp" + ": " + ts); + //LOG.info("Eventfilter: Interval" + ": " + interval); if (interval >= timeMinInterval) { flag = false; } } - System.out.println("Filter status (time_min_interval) " + ": " + flag); + LOG.info("Eventfilter: Filter status (time_min_interval) " + ": " + flag); //filter position_delta condition if (filterStructure[7] && !flag && last_position_event !=null) { @@ -244,14 +247,14 @@ public class eventFilter { Point3D cod2 = (Point3D) position2.getPoint(); float distance = cal_distance(cod1, cod2); - System.out.println("Distance: " + distance); + LOG.info("Eventfilter: Distance: " + distance); if (distance >= positionDelta) { flag = false; } } } - System.out.println("Filter status (position_delta) " + ": " + flag); + LOG.info("Eventfilter: Filter status (position_delta) " + ": " + flag); //filter positionCondition_cell condition if (filterStructure[8] && !flag) { @@ -266,7 +269,7 @@ public class eventFilter { } } } - System.out.println("Filter status (positionCondition_cell) " + ": " + flag); + LOG.info("Eventfilter: Filter status (positionCondition_cell) " + ": " + flag); if (!flag) { last_position_event = event; diff --git a/src/main/java/ipos/project/UseCaseController/PositionMonitoring.java b/src/main/java/ipos/project/UseCaseController/PositionMonitoring.java index 30a18d451ef7d9492ab767b0bc1bf3c87a14e584..e6a55e87118b6ad241ea34a3bd227a184702f273 100644 --- a/src/main/java/ipos/project/UseCaseController/PositionMonitoring.java +++ b/src/main/java/ipos/project/UseCaseController/PositionMonitoring.java @@ -37,7 +37,7 @@ public class PositionMonitoring { public static final String ZONE_ID_DOOR = "cobot1_door_zone"; public static final String ZONE_ID_WINDOW = "cobot1_window_zone"; - public static final int SDF_TIME_INTERVAL = 1000000; // recent milliseconds to take into account for sensor data fusion + public static final int SDF_TIME_INTERVAL = 2500; // recent milliseconds to take into account for sensor data fusion public PositionMonitoring(){} @@ -84,6 +84,7 @@ public class PositionMonitoring { filter.init(config); eventFilters.add(filter); LOG.info("EventFilter was created: " + filter.toString() + "; monitoringTaskId: " + filter.getMonitoringTaskId() + "; zone-id:" + filter.getFilterConditionConfig().getPositionConditionCellId()); + // TODO (tracking): init tracking task } private static boolean isDoor = false; @@ -91,14 +92,28 @@ public class PositionMonitoring { private static boolean isWindow = false; private static boolean firstMessage = true; + + public static void receiveMessage(DataStorageQueryRequest dsQueryRequest){ + // monitoringRequest is not necessary, as the name of the response-topic equals trackingTaskId + 'tracking' + // TODO: monitoringRequestId is important to find out which zones should be actually reported to the requester + // (there may be other zones that overlap the ones that tha requester wanted to monitor or track) + List<PositionEvent> trackedEvents = DataServices.query(dsQueryRequest.getTrackingTaskId()); + DataStorageQueryResponse dsQueryResponse = modelFactory.createDataStorageQueryResponse(); + dsQueryResponse.getPositionEvents().addAll(trackedEvents); + SimpleSceneIntegration.receiveMessage(dsQueryResponse, dsQueryRequest.getTrackingTaskId()); + } + // @JmsListener(destination = "/PositionEvent", containerFactory = "jmsListenFactory") public static void receiveMessage(PositionEvent posEvent) { // TODO: Update currentPlacing attribute of the affected localizableObject LOG.info("Received <" + posEvent + ">"); + logging_sdf(posEvent); + boolean posEventMeetsSdfAccuracyCondition = SensorDataFusion.isMostAccuratePositionAvailable(posEvent); List<Tuple4<PositionEvent, String, String, String>> entryNotifications = new LinkedList<>(); for (eventFilter eFilter : eventFilters){ - try { + // TODO (Tracking): inside this loop the zoneDescriptors of the PositionEvent have to be set + try { if (eFilterMayHandlePosEvent(posEvent, posEventMeetsSdfAccuracyCondition, eFilter)){ applyEfilterToPosEvent(posEvent, entryNotifications, eFilter); } @@ -109,6 +124,16 @@ public class PositionMonitoring { } } sendEntryNotifications(entryNotifications); + // TODO (tracking): after all zoneDescriptors have been added to the positionEvent it has to be persisted using DataServices-class + } + + private static void logging_sdf(PositionEvent posEvent) { + LocalizableObject lObject = PositionMonitoring.getLObjectByIdOrNull(posEvent.getLObjectId()); + String sensorType = lObject.getSensorType(); + String timestamp = posEvent.getTimeStamp(); + String sensorId = posEvent.getLObjectId(); + String agentId = lObject.getAgent().getId(); + LOG.info("SDF: Received: sensorType: " + sensorType + " timestamp: " + timestamp + " sensorId: " + sensorId + "agentId: " + agentId); } /** diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 69565e6a39825b79d82b36be8cdc83723eb049e8..9ba769a5384634476b7347bf8435dde1d52d34d5 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,6 +1,7 @@ logging: level: ipos: DEBUG + config: .\logback-spring.xml server: port: 7071 @@ -11,7 +12,7 @@ mqtt: setKeepAliveInterval: 10 connectionTimeout: 20 clientId: ipos.project.fw - hostname: 192.168.0.192 + hostname: 192.168.0.111 # hostname: broker.hivemq.com port: 1883 diff --git a/testdata_raw.txt b/testdata_raw.txt index e1f5ae5e18529d44e23e90fde37b0acfdb23a0e9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/testdata_raw.txt +++ b/testdata_raw.txt @@ -1,3 +0,0 @@ -{"sensorPositionEvent": [{"sensorId": "UWB_1", "position": {"refSystemId": "ROOT", "point": {"x": 3.0,"y": 1.5,"z": 3.0}, "accuracy": 1.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "lastPosUpdate": "2021-10-13T11:40:20+00:00"}]} -{"nfcRawDataEvent" : [ {"timestamp" : "2021-10-13T11:41:20+00:00", "tagId": "83221710", "type": "RFID", "scannerId": "98:CD:AC:26:2D:18"} ] } -{"sensorPositionEvent": [{"sensorId": "UWB_1", "position": {"refSystemId": "ROOT", "point": {"x": 3.0,"y": 1.5,"z": 3.0}, "accuracy": 1.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "lastPosUpdate": "2021-10-13T11:42:20+00:00"}]} \ No newline at end of file diff --git a/testdata_raw_full.txt b/testdata_raw_full.txt new file mode 100644 index 0000000000000000000000000000000000000000..4c97ebf4eb56221871137d006085b24dd2bc03fa --- /dev/null +++ b/testdata_raw_full.txt @@ -0,0 +1,3 @@ +{"sensorPositionEvent": [{"sensorId": "UWB_1", "position": {"refSystemId": "ROOT", "point": {"x": 3.0,"y": 1.5,"z": 3.0}, "accuracy": 1.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "lastPosUpdate": "2021-10-14T19:32:20+00:00"}]} +{"nfcRawDataEvent" : [ {"timestamp" : "2021-10-14T19:33:20+00:00", "tagId": "83221710", "type": "RFID", "scannerId": "98:CD:AC:26:2D:18"} ] } +{"sensorPositionEvent": [{"sensorId": "UWB_1", "position": {"refSystemId": "ROOT", "point": {"x": 3.0,"y": 1.5,"z": 3.0}, "accuracy": 1.0}, "orientation": {"x": 1.0,"y": 0.5,"z": 1.0, "w": 1.5}, "lastPosUpdate": "2021-10-14T19:34:20+00:00"}]} \ No newline at end of file