Quintiq file version 2.0 
 | 
#parent: #root 
 | 
Method AddPeriodOfTimeDefinitionForExport ( 
 | 
  String uri, 
 | 
  String granularity 
 | 
) 
 | 
{ 
 | 
  Description: 'Verify duplicate then append PeriodOfTimeDefinition to PeriodOfTimeDefinitionCache.' 
 | 
  TextBody: 
 | 
  [* 
 | 
    // Check if the PeriodOfTimeDefinition is already existing 
 | 
    existingPeriodOfTimeDefinition := LibSCIPeriodOfTimeDefinition::FindLibSCIPeriodOfTimeDefinitionTypeIndex( uri ); 
 | 
    if( isnull( existingPeriodOfTimeDefinition ) ) 
 | 
    { 
 | 
      this.LibSCIPeriodOfTimeDefinition( relnew, 
 | 
                                         Uri := uri ); 
 | 
                          
 | 
      content := construct( Strings ); 
 | 
       
 | 
      content.Add( LibSCIIntegration_Utility::FormatString( uri ) );            // uri 
 | 
      content.Add( LibSCIIntegration_Utility::FormatString( uri ) );            // name 
 | 
      content.Add( LibSCIIntegration_Utility::FormatString( granularity ) );    // granularity 
 | 
     
 | 
      addedvalues := content.ToString( LibSCIIntegration_Utility::Tokenizer() ); 
 | 
      addedvalues := this.PeriodOfTimeDefinitionCache() + String::NewLine() + addedvalues; 
 | 
     
 | 
      this.PeriodOfTimeDefinitionCache( addedvalues ); 
 | 
    } 
 | 
  *] 
 | 
} 
 |