﻿<?xml version="1.0" encoding="utf-8" ?>
<EgrpFilesConfig xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xmlns="http://tempuri.org/EgrpFilesConfigSchema.xsd">
  <Versions>
    <Version SchemaPath=".\EGRP_v03\01_EXTRACT_OBJ.xsd" VersionNumber="03">
      <ObjectInfo TypeId="5ffe0d15-c09d-4980-8fc7-95c0c744ff8d">
        <Elements>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.CadastralNumber">
            <View Type="Text">
              <RelationInfo Field="KADASTR_NO" IsRefElement="false" IsUseForFilter="true" />
            </View>
            <LoadInReestr Field="KADASTR_NO" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.ObjectTypeText">
            <View Type="Text">
              <RelationInfo Field="NAME" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="NAME" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.GroundCategory">
            <View Type="Text">
              <RelationInfo Field="CAT_ZU_ID" IsRefElement="true" IsUseForFilter="false" IsReviseByValue="true" />
            </View>
            <LoadInReestr Field="CAT_ZU" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Area.Area">
            <View Type="Text">
              <RelationInfo Field="PL_COMMON" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="PL_COMMON" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Inv_No">
            <View Type="Text">
              <RelationInfo Field="INVENTORY_NO" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="INVENTORY_NO" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Address">
            <View Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]">
              <RelationInfo Field="ADRESS" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="ADRESS" Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Address.Code_OKATO">
            <View Type="Text">
              <RelationInfo Field="OKTMO_REG" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="OKTMO" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Assignation_Code">
            <View Type="Text">
              <RelationInfo Field="DESTINATION" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="DESTINATION" Type="Text" />
          </ElementInfo>
          <ElementInfo Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.ObjectDesc.Assignation_Code_Text">
            <View Type="Text">
              <RelationInfo Field="DESTINATION" IsRefElement="false" IsUseForFilter="false" />
            </View>
            <LoadInReestr Field="DESTINATION" Type="Text" />
          </ElementInfo>
        </Elements>
      </ObjectInfo>
      <Templates>
        <Template Type="Person">
          <Element>
            <Elements>
              <ElementInfo Path="Content">
                <View Type="Text">
                  <RelationInfo Field="FULLNAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FIO">
                <View Type="Union" Rule="{Surname} {First}[ {Patronymic}]">
                  <RelationInfo Field="NAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FIO.Surname">
                <View Type="Text">
                  <RelationInfo Field="FIO" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FIO.First">
                <View Type="Text">
                  <RelationInfo Field="FIO_I" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FIO.Patronymic">
                <View Type="Text">
                  <RelationInfo Field="FIO_O" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="DateBirth">
                <View Type="Text">
                  <RelationInfo Field="BIRTHDAY" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Place_Birth">
                <View Type="Text">
                  <RelationInfo Field="BIRTHPLACE" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Document">
                <View Type="Union" Rule="[{Series} ]{Number}">
                  <RelationInfo Field="PASP_NUMBER" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Document.Date">
                <View Type="Text">
                  <RelationInfo Field="PASP_DATE" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Document.IssueOrgan">
                <View Type="Text">
                  <RelationInfo Field="PASP_KEM" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Document.DeptCode">
                <View Type="Text">
                  <RelationInfo Field="RECVIZ_KOD" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="INN">
                <View Type="Text">
                  <RelationInfo Field="INN" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Location">
                <View Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]">
                  <RelationInfo Field="ADRESS" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FactLocation">
                <View Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]">
                  <RelationInfo Field="ADRESS_FACT" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="SNILS">
                <View Type="Text">
                  <RelationInfo Field="SNILS" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
            </Elements>
          </Element>
        </Template>
        <Template Type="Organization">
          <Element>
            <Elements>
              <ElementInfo Path="Content">
                <View Type="Text">
                  <RelationInfo Field="FULLNAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Code_OPF">
                <View Type="Text">
                  <RelationInfo Field="OKOPF" IsRefElement="true" IsReviseByValue="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Name">
                <View Type="Text">
                  <RelationInfo Field="NAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="INN">
                <View Type="Text">
                  <RelationInfo Field="INN" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Code_OGRN">
                <View Type="Text">
                  <RelationInfo Field="OGRN" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="RegDate">
                <View Type="Text">
                  <RelationInfo Field="OGRN_DATE" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Code_CPP">
                <View Type="Text">
                  <RelationInfo Field="KPP" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Location">
                <View Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]">
                  <RelationInfo Field="ADRESS" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="FactLocation">
                <View Type="Union" Rule="{Region.Name}[, {District.Name}[ {District.Type}]][, [{City.Type}. ]{City.Name}][, [{Locality.Type}. ]{Locality.Name}][, {Street.Type}. {Street.Name}][, {Level1.Value}]">
                  <RelationInfo Field="ADRESS_FACT" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="E-mail">
                <View Type="Text">
                  <RelationInfo Field="EMAIL" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
            </Elements>
          </Element>
        </Template>
        <Template Type="Governance">
          <Element>
            <Elements>
              <ElementInfo Path="Content">
                <View Type="Text">
                  <RelationInfo Field="FULLNAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Name">
                <View Type="Text">
                  <RelationInfo Field="NAME" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="OKATO_Code">
                <View Type="Text">
                  <RelationInfo Field="OKTMO_REG" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Address">
                <View Type="Text">
                  <RelationInfo Field="ADRESS" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
            </Elements>
          </Element>
        </Template>
        <Template Type="Document">
          <Element>
            <Elements>
              <ElementInfo Path="Content">
                <View Type="Text">
                  <RelationInfo Field="NOTE" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Name">
                <View Type="Text">
                  <RelationInfo Field="NAME" IsRefElement="false" IsUseForFilter="false" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Number">
                <View Type="Text">
                  <RelationInfo Field="DOG_NO" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Date">
                <View Type="Text">
                  <RelationInfo Field="DOG_DATE" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Number">
                <View Type="Text">
                  <RelationInfo Field="DOC_NO" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
              <ElementInfo Path="Date">
                <View Type="Text">
                  <RelationInfo Field="DOC_DATE" IsRefElement="false" IsUseForFilter="true" />
                </View>
              </ElementInfo>
            </Elements>
          </Element>
        </Template>
      </Templates>
      <Right>
        <Owner Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.Right.Owner">
          <Ifs>
            <If ElementName="Person" TemplateType="Person"/>
            <If ElementName="Governance" TemplateType="Governance"/>
            <If ElementName="Organization" TemplateType="Organization"/>
          </Ifs>
        </Owner>
        <Registration Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.Right.Registration">
          <RegNo IsAttr="false" Path="RegNumber" Type="Text"/>
          <Name  IsAttr="false" Path="Name" Type="Text"/>
          <RegDate IsAttr="false" Path="RegDate" Type="Text"/>
          <EndDate IsAttr="false" Path="EndDate" Type="Text"/>
          <ShareNumerator IsAttr="true" Path="Share.Numerator" Type="Text"/>
          <ShareDenominator IsAttr="true" Path="Share.Denominator" Type="Text"/>
          <ShareText IsAttr="false" Path="ShareText" Type="Text"/>
          <Document ElementName="DocFound" TemplateType="Document" />
          <Type Path="Type">
            <Ifs>
              <If RelationTypeId="5625F496-4DDC-4EEE-9F85-199228414FF9" Value="Собственность" />
              <If RelationTypeId="5625F496-4DDC-4EEE-9F85-199228414FF9" Value="Долевая собственность" />
              <If RelationTypeId="C80B766A-EDFC-4C98-ABA2-03CCC376486B" Value="Совместная собственность" />
              <If RelationTypeId="D73DA2A2-447D-4EF1-A0E4-87291A33B208" Value="Хозяйственное ведение" />
              <If RelationTypeId="3EE5F4A6-1AD2-41A6-859E-65672081D478" Value="Оперативное управление" />
              <If RelationTypeId="25F40B70-CB31-4E6B-918D-B133E83D57E4" Value="Пожизненное наследуемое владение" />
              <If RelationTypeId="5FBA1B30-715A-4B04-84E5-85FAE710E1C8" Value="Постоянное (бессрочное) пользование" />
              <!--
              <If RelationTypeId="" Value="Сервитут (право)" />
              <If RelationTypeId="" Value="Иные права" />
              -->
            </Ifs>
          </Type>
        </Registration>
        <Encumbrance Path="Extract.ReestrExtract.ExtractObjectRight.ExtractObject.ObjectRight.Right.Encumbrance">
          <Type Path="Type">
            <Ifs>
              <If RelationTypeId="445FCA50-9927-42B9-9E81-4B2A4977612B" Value="Сервитут"/>
              <If RelationTypeId="445FCA50-9927-42B9-9E81-4B2A4977612B" Value="Публичный сервитут"/>
              <If RelationTypeId="445FCA50-9927-42B9-9E81-4B2A4977612B" Value="Частный сервитут"/>
              <If RelationTypeId="AB95B479-F306-4121-A6A8-D4B34EDC4A71" Value="Аренда (в том числе субаренда, лизинг)"/>
              <If RelationTypeId="0C3F93F3-069D-460E-877E-195E40ABBCF4" Value="Залог"/>
              <!--
              <If RelationTypeId="" Value="Арест"/>
              <If RelationTypeId="" Value="Запрещение"/>
              <If RelationTypeId="" Value="Ограничение прав на землю, предусмотренное статьей 56 Земельного кодекса Российской Федерации (Особый режим использования земли)"/>
              <If RelationTypeId="" Value="Решение об изъятии земельного участка, жилого помещения"/>
              <If RelationTypeId="" Value="Ипотека"/>
              <If RelationTypeId="" Value="Иные ограничения (обременения) прав"/>
              -->
            </Ifs>
          </Type>
          <RegNo IsAttr="false" Path="RegNumber" Type="Text"/>
          <Name IsAttr="false" Path="Name" Type="Text"/>
          <ShareText IsAttr="false" Path="ShareText" Type="Text"/>
          <RegDate IsAttr="false" Path="RegDate" Type="Text"/>
          <DurationStarted IsAttr="false" Path="Duration.Started" Type="Text"/>
          <DurationStopped IsAttr="false" Path="Duration.Stopped" Type="Text"/>
          <DurationTerm IsAttr="false" Path="Duration.Term" Type="Text"/>
          <Owner Path="Owner">
            <Ifs>
              <If ElementName="Person" TemplateType="Person"/>
              <If ElementName="Governance" TemplateType="Governance"/>
              <If ElementName="Organization" TemplateType="Organization"/>
            </Ifs>
          </Owner>
          <AllShareOwner IsAttr="false" Path="AllShareOwner" Type="Text"/>
          <Document ElementName="DocFound" TemplateType="Document"/>
        </Encumbrance>
      </Right>
    </Version>
  </Versions>
</EgrpFilesConfig>