| Quintiq file version 2.0 | 
| #parent: #root | 
| Method AddResourceForExport ( | 
|   String uri, | 
|   String name, | 
|   String inhierarchyof | 
| ) | 
| { | 
|   Description: 'Verify duplicate then append Resource to ResourceCache' | 
|   TextBody: | 
|   [* | 
|     // Check if the Resource is already existing | 
|     existingResource := LibSCIResource::FindLibSCIResourceTypeIndex( uri ); | 
|     if( isnull( existingResource ) ) | 
|     { | 
|       this.LibSCIResource( relnew, | 
|                            Uri := uri, | 
|                            Name := name, | 
|                            InHierarchyOf := inhierarchyof ); | 
|                        | 
|       content := construct( Strings ); | 
|        | 
|       content.Add( LibSCIIntegration_Utility::FormatString( uri ) );            // uri | 
|       content.Add( LibSCIIntegration_Utility::FormatString( name ) );           // name | 
|       content.Add( LibSCIIntegration_Utility::FormatString( inhierarchyof ) );  // inHierarchyOf | 
|      | 
|       addedvalues := content.ToString( LibSCIIntegration_Utility::Tokenizer() ); | 
|       addedvalues := this.ResourceCache() + String::NewLine() + addedvalues; | 
|       this.ResourceCache( addedvalues );      | 
|     } | 
|   *] | 
| } |