SurveyApi.xid.xml 7.88 KB
<?xml version="1.0" encoding="UTF-8" ?>

<specification xmlns="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               xmlns:xid="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd https://xid.location.studio/schema/V1.0.0/XtensibleInterfaceDefinition.xsd"
               identity="SurveyApi.xid.xml">
  <title>SLAM Survey API Specifications</title>
  <comment>
    This file defines the SLAM survey API.  The survey API is used to bulk load high-definition survey
    data from one or more probe data sets.
  </comment>

  <!-- Include all known definitions -->
  <import ref="https://xid.location.studio/HPE/V1.2/HpeGnss.xid.xml" local="HpeGnss.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.2/HpeCellular.xid.xml" local="HpeCellular.xid.xml" />
  <import ref="https://xid.location.studio/HPE/V1.2/HpeWiFi.xid.xml" local="HpeWiFi.xid.xml" />
  <import ref="https://xid.location.studio/Tensor/V1.1/ApiBase.xid.xml" local="ApiBase.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/SpatialDefs.xid.xml" local="SpatialDefs.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/Address.xid.xml" local="Address.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/Contact.xid.xml" local="Contact.xid.xml" />
  <import ref="https://xid.location.studio/GeoSpatial/V1.0/PointOfInterest.xid.xml" local="PointOfInterest.xid.xml" />

  <namespace name="SLAM">
    <using namespace="HPE"/>
    <using namespace="Tensor"/>


<!-- 
    *************************************
    * SurveyInfo Definition. 
    *************************************
    -->
    <struct name="SurveyInfo">
      <comment>General information about the survey.</comment>
      <elem name="name" multiplicity ="1" type="string" >
        <comment>Optional name to describe the identify of the survey</comment>
      </elem>
      <elem name="flrmax" multiplicity ="1" type="int8" default ="0">
        <comment>Optional maximum floor identifier, default is zero meaning the ground floor</comment>
      </elem>
      <elem name="flrmin" multiplicity ="1" type="int8" default ="0">
        <comment>Optional minimum floor identifier, default is zero meaning the ground floor</comment>
      </elem>
      <elem name="appid" multiplicity ="1" type="string" >
        <comment>Application identifier used to collect the survey data. Default is empty "".</comment>
      </elem>
      <elem name="appver" multiplicity ="1" type="string" >
        <comment>Application version used to collect the survey data. Default is empty "".</comment>
      </elem>
      <elem name="createdate" type="datetime" multiplicity="1">
        <comment>Date and time the survey was created or conducted.</comment>
      </elem>
      <elem name="contact" multiplicity ="0..1" type="GeoSpatial.ContactInfo" >
        <comment>Optional contact information.</comment>
      </elem>
      <elem name="address" multiplicity ="0..1" type="GeoSpatial.AddressInfo" >
        <comment>Optional address information.</comment>
      </elem>
      <elem name="datestart" type="datetime" multiplicity="0..1">
        <comment>Date and time of when this survey is valid.  Do not define if unknown.</comment>
      </elem>
      <elem name="dateend" type="datetime" multiplicity="0..1">
        <comment>Last date and time of when this survey is valid.  Do not define if unknown.</comment>
      </elem>
    </struct>



    <!-- 
    *************************************
    * SurveyRecord Definition. 
    *************************************
    -->
    <struct name="SurveyRecord" >
      <comment>A Survey Record.</comment>
      <elem name="state" multiplicity="1" type="StateInfo">
        <comment>
          Required device position and other state information. At least one of
          observations or state is required, otherwise there is insufficient data to process.
        </comment>
      </elem>

      <elem name="floor" multiplicity="1" type ="int8" default="0">
        <comment>The floor number of this scan</comment>
      </elem>
      <elem name="observations" multiplicity="1" type="ObservationSet" >
        <comment>
          Optional Set of observation data encoded in the format specified by encObs.\n
          At  least one of observations or state is required,
          otherwise there is insufficient data to process.
        </comment>
      </elem>
    </struct>

    <!-- 
    *************************************
    * SurveyData Definition. 
    *************************************
    -->
    <struct name ="SurveyData">
      
      <elem name ="surveyid" type="Tensor.UUID" multiplicity="1" >
        <comment>Identifies the unique id of the survey</comment>
      </elem>

      <elem name ="part" type="int32" multiplicity="1" default="0">
        <comment>Zero based part index of survey indicating data is in parts.</comment>
      </elem>

      <elem name ="type" type="uri" multiplicity="1">
        <comment>Type uri, provides information on the type of survey. This can indicate a variety of things and is used for search.</comment>
      </elem>      
      
      <elem name ="source" type="uri" multiplicity="1">
        <comment>Source uri, provides information on how survey data was sourced, potentially ownership.</comment>
      </elem>

      <elem name ="veracity" type="float32" multiplicity="1">
        <comment>Veracity of the survey data contained.  This is a measure between 0 and 1 about the quality and trustworthiness of the data collected.  Veracity of 1 is the highest trust.</comment>
      </elem>


      <elem name="info" multiplicity="1" type="SurveyInfo">
        <comment>
          Optional survey information.
        </comment>
      </elem>
      
      <elem name="records" multiplicity="0..*" type="SurveyRecord">
        <comment>
          Survey record(s) collected by the survey.
        </comment>
      </elem>
      
      <elem name="pois" multiplicity="0..*" type="GeoSpatial.PointOfInterest">
        <comment>
          Points of interest collected by the survey.
        </comment>
      </elem>
    
    </struct>

    <!-- 
    *******************************************************
    Survey Submission API
    *******************************************************
    -->
    <interface name="Survey">
      <comment>Interface for submitting SLAM compliant survey data.</comment>

      <operation name="Submit">
        <comment>
          Interaction submits survey data and outputs submission result and UUID.
        </comment>
        <input name="input" type="Tensor.InputBase"  sid="0x1030">
          <elem name="survey" multiplicity="1" type="SurveyData"></elem>
        </input>
        <output name="output" type="Tensor.OutputBase" sid="0x1031">
          <comment>Survey submission output returns status and UUID of the submitted survey.</comment>
          <elem name="id" multiplicity="1" type="Tensor.UUID"/>
        </output>
      </operation>

      <operation name="Download">
        <comment>Downloads survey data given id.</comment>
        <input name="input" type="Tensor.InputBase"  sid="0x1032">
          <elem name="id" multiplicity="1" type="Tensor.UUID">
            <comment>UUID of Survey set.</comment>
          </elem>
          <elem name="part" multiplicity="1" type="Tensor.int32" default="-1">
            <comment>Survey part id of interest. Default value is -1, which will return all survey parts. </comment>
          </elem>
        </input>
        <output name="output" type="Tensor.OutputBase" sid="0x1033">
          <comment>Survey download output data structure contains a zero or more surveys.</comment>
          <elem name="surveys" multiplicity="0..*" type="SurveyData"></elem>
        </output>
      </operation>
    </interface>

    

  </namespace>
</specification>