TDXMXMLConf.xml – TDXMPP main configuration file.

In this section are defined macros used in all XMLConfig file. Using macros is optional.

<ConfigMacros>
  <Macro Name="root" Value="C:\Tsl.dev\HHApps\TDXM\Current" />
  <Macro Name="dbpath" Value="$(root)\DB.RFS" />
  <Macro Name="tdxmpp" Value="$(root)\TDXMPP" />
  <Macro Name="configs" Value="$(tdxmpp)" />
  <Macro Name="bin" Value="$(tdxmpp)\bin" />
  <Macro Name="drwpath" Value="$(PredefinedMacroInputDir)" />
  <Macro Name="DebugDir" Value="$(PredefinedMacroOutputDir)"/>
  <Macro Name="TobisAvailable" Value="1" />
  <Macro Name="UIEnabled" Value="1" />
  <Macro Name="TobisUser" Value="TOBISAdmin" />
  <Macro Name="TobisPass" Value="TOBIS" />
  <Macro Name="XMLID" Value="XMLID" />
  <Macro Name="UpdateObjects" Value="1" />
  <Macro Name="HandleDeletedObjs" Value="1" />
</ConfigMacros>

In this section are set attributes common for all nodes.

<NodeTemplate>
  <UIConfig Enabled="$(UIEnabled)" ShowClassName="1">
    <States>
      <State name="siNotInit" icon="st_notinp.ico" />
      <State name="siInputValid" icon="st_inpval.ico" />
      <State name="siProcess" icon="st_process.ico" />
      <State name="siReady" icon="st_ready.ico" />
      <State name="siApproved" icon="st_appr.ico" />
      <State name="siInvalid" icon="st_inval.ico" />
    </States>
  </UIConfig>
  <Config>
    <DebugDir Name="$(DebugDir)" />
    <TOBIS Available="$(TobisAvailable)"
           URL="http://localhost/tobis/TOBISWebService.asmx">
      <Security PasswordMode="plain" User="$(TobisUser)" Pass="$(TobisPass)" />
    </TOBIS>
    <HDocDB PasswordMode="ini" IniFile="$(dbpath)\hdocRFS_0.ini" UserName="" Password=""/>
    <ClassInfo Name="$(configs)\TDXM2ClassInfoRFS.xml" />
    <ObjectsUniqueId Name="$(XMLID)" />
    <Channel UpdateObjects="$(UpdateObjects)" />
    <Export Apply="0"/>
  </Config>
</NodeTemplate>

This is an example of UIConfig section in Node element.

<UIConfig ID="1" Caption="Input Node" Assembly="TDXMUI"
          Class="Tessel.TDXM.UI4Generic" Description="Getting input XML">
  <ExtraUIParams>
    <Param Name="ColumnNumber" Value="2" />
    <Param Name="ShownXML" Value="Out" />
  </ExtraUIParams>
  <Filters ColumnName="Object class">
    <Filter name="Fastighet" expr="@Class = 'FI2FASTIGHET'"
            icon="i_prop.ico" />
    <Filter name="Byggnad" expr="@Class = 'FI2BYGGNADSVERK'"
            icon="i_house.ico" />
    <Filter name="Plan" expr="@Class = 'FI2PLAN'"
            icon="i_floor.ico" />
    <Filter name="Utrymme" expr="@Class = 'FI2UTRYMME'"
            icon="i_room.ico" />
  </Filters>
</UIConfig>
<Node Number="4" Assembly="TFMOValidateNode" Class="Tessel.TDXM.ValidateNode">
  <Config Name="TFMOValidateNodeConfig">
    <Errors>
      <Error Problem="IncompleteRepresentation" Action="Delete" Processor="Own"/>
      <Error Problem="OrphanedSpots" Action="Delete" Processor="Own"/>
      <Error Problem="TooShortEdges" Action="Repair" Processor="VDB"/>
      <Error Problem="TooSmallAngles" Action="Report" Processor="VDB"/>
      <Error Problem="OverlappedSpaces" Action="Report" Processor="VDB"/>
      <Error Problem="NonParallelEdges" Action="Report" Processor="VDB"/>
      <Error Problem="HolesNotInside" Action="Repair" Processor="VDB"/>
      <Error Problem="HolesInHoles" Action="Repair" Processor="VDB"/>
      <Error Problem="PolysInPolys" Action="Report" Processor="VDB"/>
    </Errors>
    <StdLayers>
      <StdLayer Name="BRA"></StdLayer>
      <StdLayer Name="BTA"></StdLayer>
      <StdLayer Name="NTA"></StdLayer>
    </StdLayers>
    <Problems>
      <Problem Name="IncompleteRepresentation" Value="0"></Problem>
      <Problem Name="OrphanedSpots" Value="0"></Problem>
      <Problem Name="TooShortEdges" Value="1"></Problem>
      <Problem Name="TooSmallAngles" Value="2"></Problem>
      <Problem Name="OverlappedSpaces" Value="4"></Problem>
      <Problem Name="NonParallelEdges" Value="8"></Problem>
      <Problem Name="HolesNotInside" Value="16"></Problem>
      <Problem Name="HolesInHoles" Value="32"></Problem>
      <Problem Name="PolysInPolys" Value="64"></Problem>
    </Problems>
    <Actions>
      <Action Name="Ignore" Value="0"></Action>
      <Action Name="Report" Value="1"></Action>
      <Action Name="Delete" Value="2"></Action>
      <Action Name="Repair" Value="3"></Action>
    </Actions>
    <Solutions>
      <Solution Name="Reported" Value="0"></Solution>
      <Solution Name="Deleted" Value="1"></Solution>
      <Solution Name="Repaired" Value="3"></Solution>
    </Solutions>
    <Processors>
      <Processor Name="Own" Value="0"></Processor>
      <Processor Name="VDB" Value="1"></Processor>
    </Processors>
  </Config>
</Node>

So far we cope with 9 different Problem classes. The one – incomplete representation – is a structural error and the rest consists of geometry errors.

Parameters such a minimal length of spot’s edge or a minimal angle between two consecutive spot edges are defined INI file that is described elsewhere.

<Node Number="5" Assembly="TDXMMatchNode" Class="Tessel.TDXM.MatchingNode">
  <Config XSL="HObjComp.xsl">
    <XSDFile Apply="0" Name="XSD file path name" />
    <HDocDB DocTimeStampField="DOCUMENT_ADD3" />
    <CrossDomainInfo Name="$(configs)\TDXMDBConfigRFS.xml" />
    <ExtraMatchFields Apply="0" UseIDBlock="0"
                      ClassInfo="$(configs)\TDXM2ClassInfo.xml">
      <Object Class="LEVEL_4">
        <ObjectAttr Name="LEVEL_4_DESCRIPTION"/>
      </Object>
    </ExtraMatchFields>
    <FindDeletedObjects Apply="$(HandleDeletedObjs)" ToBeDeletedRootClass="LEVEL_7"/>
    <Actions>
      <Event Id="evErrKey" Action="fixTobis" />
      <Event Id="evBadParent" Action="skip" />
      <Event Id="evDuplGUIDInDB" Action="skip" />
      <Event Id="evDuplKeysInDB" Action="skip" />
    </Actions>
  </Config>
</Node>
<Node Number="6" Assembly="TDXMUpdateNode" Class="Tessel.TDXM.UpdateNode">
  <Config>
    <XSDFile Apply="0" Name="XSD file path name" />
    <Actions>
      <Event Id="evErrRegisterNewObject"  Action="ask" />
      <Event Id="evErrChangeObjectIDBlock"  Action="ask" />
      <Event Id="evErrChangeGUID" Action="ask" />
      <Event Id="evErrRegisterObjectAliasToGUID" Action="ask" />
      <Event Id="evErrRegisterNewObjectWithGUID" Action="ask" />
      <Event Id="evErrGetDomainId" Action="ask" />
      <Event Id="evErrGetObjectClassId" Action="ask" />
    </Actions>
    <StripDeletedObjectsInfoToAvoidDelFromDB Apply="$(HandleDeletedObjs)" />
    <SelectiveVectorsUpdate>
      <Spots Apply="1" >
        <Layer Name="BRA" Status="clr" />
        <Layer Name="BTA" Status="clr" />
        <Layer Name="NTA" Status="clr" />
      </Spots>
    </SelectiveVectorsUpdate>
  </Config>
</Node>

TDXMDBConfig.xml is a target database configuration description.

File TDXMDBConfig.xml describes relation between database structure and external domain format. It defines Object definitions and Document definition separately.

Object definition contains definition of root object and other objects which have to be exported to HyperDoc DB.

Example of Root object for RFS database:

<Object FI2Object="Root" DBObject="Root">
  <Object DBObject="LEVEL_1" Opt="1">
    <Attrib FI2FieldXPath="tdxm:GenerateGUID(concat('LEVEL_1',generate-id($x)))"
            DBField="LEVEL_1_ID"
            DBKey="1"
    />
    <Attrib DBField="XMLID" Value="LEVEL_1_XMLID" />
    <Attrib DBField="LEVEL_1_NAME" Value="unknown" Opt="1" />
    <Attrib DBField="LEVEL_1_DESCRIPTION" Value="unknown" Opt="1" />

    <Object DBObject="LEVEL_2" Opt="1">
      <Attrib FI2FieldXPath="tdxm:GenerateGUID(concat('LEVEL_2',generate-id($x)))"
              DBField="LEVEL_2_ID"
              DBKey="1"
      />
      <Attrib DBField="XMLID" Value="LEVEL_2_XMLID" />
      <Attrib DBField="LEVEL_2_NAME" Value="unknown" Opt="1" />
      <Attrib DBField="LEVEL_2_DESCRIPTION" Value="unknown" Opt="1" />
  
      <Object DBObject="LEVEL_3" Opt="1">
        <Attrib FI2FieldXPath="tdxm:GenerateGUID(concat('LEVEL_3',generate-id($x)))"
                DBField="LEVEL_3_ID"
                DBKey="1"
        />
        <Attrib DBField="XMLID" Value="LEVEL_3_XMLID" />
        <Attrib DBField="LEVEL_3_NAME" Value="unknown" Opt="1" />
        <Attrib DBField="LEVEL_3_DESCRIPTION" Value="unknown" Opt="1" />
 
        <Process Class="FI2FASTIGHET"/>

      </Object>
    </Object>
  </Object>
</Object>

<Object FI2Object="FI2FASTIGHET" DBObject="LEVEL_4">
  <Attrib
    FI2FieldXPath="tdxm:GenerateGUID(concat('LEVEL_4',generate-id($x)))"
    DBField="LEVEL_4_ID"
    DBKey="1"
  />
  <Attrib FI2Field="FI2FastighetGlobalID" DBField="LEVEL_4_GUID" />
  <Attrib FI2Field="XMLID" DBField="XMLID" FI2Key="1" />
  <Attrib FI2Field="FI2FastighetID" DBField="LEVEL_4_DESCRIPTION" Opt="1" MissingAction="ignore" EmptyAction="clear"/>
  <Process Class="FI2BYGGNADSVERK"/>
</Object>

Example of Documents section:

<Documents DefDocType="Fi2Dokument" 
IDXPath="concat('ID',/*/*/*/*/HObject/ObjectAttr[@Name='FI2FastighetSystemID']/@Value,
                     /*/*/*/*/*/HObject/ObjectAttr[@Name='FI2ByggnadsSystemID']/@Value,
                     /*/*/*/*/*/*/HObject/ObjectAttr[@Name='FI2UtrymmessystemSystemID']/@Value)" >
  <Document DocType="Fi2Dokument" >
    <Attrib FI2Field="FI2DokumentversionUpprattaddatum" DBField="DOCUMENT_ADD3" />
  </Document>

  <AttribSet Name="DocAttrCommon1">
    <Attrib FI2Field="FI2DokumentID" DBField="DOCUMENT_ID" />
    <Attrib FI2Field="FI2DokumentKlass" DBField="DOCUMENT_TYPE_ID" />
    <Attrib FI2Field="FI2DokumentversionArkiveringsdatum" DBField="DOCUMENT_ADD1"/>
    <Attrib FI2Field="FI2DokumentversionSlutdatum" DBField="DOCUMENT_ADD2" />
    <Attrib FI2Field="FI2DokumentversionUpprattaddatum" DBField="DOCUMENT_ADD3" />
  </AttribSet>

  <Document DocType="Mark" AttribSet="DocAttrCommon1">
    <Attrib FI2Field="FI2DokumentSkala" DBField="SKALA" />
  </Document>
</Documents>
loading table of contents...