Click or drag to resize
FileBasedProject Class
This class provides an implementation of the IProject interface for working with SDL Trados Studio projects.
Inheritance Hierarchy
SystemObject
  Sdl.ProjectAutomation.FileBasedFileBasedProject

Namespace: Sdl.ProjectAutomation.FileBased
Assembly: Sdl.ProjectAutomation.FileBased (in Sdl.ProjectAutomation.FileBased.dll) Version: 3.0.0.0 (3.1.5799.0)
Syntax
public class FileBasedProject : IProject

The FileBasedProject type exposes the following members.

Constructors
  NameDescription
Public methodFileBasedProject(String)
Opens an existing project.
Public methodFileBasedProject(ProjectInfo)
Creates a new project based on the default project template set up in SDL Trados Studio.
Public methodFileBasedProject(ProjectInfo, ProjectReference)
Creates a new project based on an existing project.
Public methodFileBasedProject(ProjectInfo, ProjectTemplateReference)
Creates a new project based on a project template.
Public methodFileBasedProject(String, Boolean, String, String)
Opens an existing server project file.
Top
Properties
  NameDescription
Public propertyCredentials
Gets the ProjectCredentials which holds credentials for translation providers and termbase servers that will be used during project processing.
Public propertyFilePath
The file path of the project file.
Top
Methods
  NameDescription
Public methodAddBilingualReferenceFile(BilingualFileMapping)
Associates a bilingual reference file (previously translated version) to a file in the project using a BilingualFileMapping
Public methodAddBilingualReferenceFile(Guid, String)
Associates a bilingual reference file (previously translated version) to a file in the project.
Public methodAddBilingualReferenceFiles
Associates bilingual reference files (previously translated versions) to project files using an array of BilingualFileMapping objects
Public methodAddFiles(String)
Adds a set of files into the project, in the root folder.
Public methodAddFiles(String, String)
Adds a set of files into the project, below a specified project folder.
Public methodAddFolderWithFiles(String, Boolean)
Adds all the files from a folder into the project, in the root folder
Public methodAddFolderWithFiles(String, String, Boolean)
Adds all the files from a folder into the project, below a specified project folder.
Public methodAddMasterTM
Set master tm for target language
Public methodAddNewFileVersion
Adds the new file version.
Public methodCheckinFiles
Uploads the specifies including potentially related files that should be uploaded at the same time and checks them in.
Public methodCheckoutFiles
Public methodComplete
Change the project status to completed.
Public methodStatic memberCreateFromProjectPackage(String, String, ProjectPackageImport)
Creates a new project from a project package.
Public methodStatic memberCreateFromProjectPackage(String, String, EventHandlerProgressEventArgs, EventHandlerMessageEventArgs, ProjectPackageImport)
Creates a new project from a project package.
Public methodCreateManualTask(String, String, DateTime, TaskFileInfo)
Public methodCreateManualTask(String, String, DateTime, Guid)
Public methodCreateMergedProjectFile
Creates a merged file from a number of translatable files in the project. This allows manipulating the content of all the child files within one physical file. For more information, see MergedProjectFile.
Public methodCreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions)
Creates a project package. The package can then be obtained using SavePackageAs(Guid, String).
Public methodCreateProjectPackage(Guid, String, String, ProjectPackageCreationOptions, EventHandlerProgressEventArgs, EventHandlerMessageEventArgs)
Creates a project package. The package can then be obtained using SavePackageAs(Guid, String).
Public methodCreateReturnPackage(Guid, String, String)
Creates a return package from a set of files. The files must all have previously been received as part of a project package in order for the return package to be created.
Public methodCreateReturnPackage(Guid, String, String, EventHandlerProgressEventArgs, EventHandlerMessageEventArgs)
Creates a return package from a set of files. The files must all have previously been received as part of a project package in order for the return package to be created.
Public methodDelete
Deletes the project. This deletes the entire project folder.
Public methodDeleteFromServer
Deletes the project from the server
Public methodDownloadLatestServerVersion
Downloads the latest version of a file from the project server.
Public methodDownloadSpecificServerVersion
Downloads a specific version of a file from the server in to the specified location
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetAutomaticTask
Retrieves an existing automatic task.
Public methodGetFile
Gets the file.
Public methodGetFiles
Gets an array of files from an array of file ids.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetManualTask
Retrieves an existing manual task.
Public methodGetProjectFileVersionHistory
Public methodGetProjectInfo
Retrieves information about the project
Public methodGetProjectStatistics
Gets the aggregated analysis, word count and confirmation statistics for all the files in the project. This will not actually compute the statistics, but just return a snapshot of the statistics that where most recently computed. To update the statistics, run the relevant task: WordCount, AnalyzeFiles or TranslationCount.
Public methodGetSettings
Gets the project-level settings.
Public methodGetSettings(Language)
Gets the settings for a specific target language.
Public methodGetSourceLanguageFiles
Retrieves all source language files.
Public methodGetTargetLanguageFiles
Retrieves all target language files.
Public methodGetTargetLanguageFiles(Language)
Retrieves all files for the specified target language.
Public methodGetTermbaseConfiguration
Retrieves all termbase-related settings that are associated with this project.
Public methodGetTranslationProviderConfiguration
Gets the translation provider configuration for this project.
Public methodGetTranslationProviderConfiguration(Language)
Gets the translation provider configuration for the specified target language. If no specific configuration has been specified for the specified target language, this method returns an empty (not null!) configuration.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImportReturnPackage(String)
Imports a return package into this project.
Public methodImportReturnPackage(String, EventHandlerProgressEventArgs, EventHandlerMessageEventArgs)
Imports a return package into this project.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodOpenProjectFileStream
Returns a stream that can be used to save out the latest version of the file.
Public methodPublishProject
Publish this project to a Groupshare Project Server.
Public methodRemoveBilingualReferenceFile
Removes a bilingual reference file (previously translated version) from a project file
Public methodRunAutomaticTask(Guid, String)
Runs an automatic task on a set of files. Automatic task template IDs are defined in AutomaticTaskTemplateIds.
Public methodRunAutomaticTask(Guid, String, EventHandlerTaskStatusEventArgs, EventHandlerTaskMessageEventArgs)
Runs an automatic task on a set of files. Automatic task template IDs are defined in AutomaticTaskTemplateIds. This overload allows event handlers to be specified for task status and message events. These events support cancellation of the task.
Public methodRunAutomaticTasks(Guid, String)
Runs a sequence of automatic tasks on a set of project files. This can be more efficient than running tasks individually using RunAutomaticTask(Guid, String), because content processing tasks can be executed in parallel. See the comments on AnalyzeFiles for more details.
Public methodRunAutomaticTasks(Guid, String, EventHandlerTaskStatusEventArgs, EventHandlerTaskMessageEventArgs)
Runs a sequence of automatic tasks on a set of project files. This can be more efficient than running tasks individually using RunAutomaticTask(Guid, String), because content processing tasks can be executed in parallel. See the comments on AnalyzeFiles for more details.
Public methodRunDefaultTaskSequence(Guid)
Runs the default task sequence of automatic tasks on a set of project files.
Public methodRunDefaultTaskSequence(Guid, EventHandlerTaskStatusEventArgs, EventHandlerTaskMessageEventArgs)
Runs the default task sequence of automatic tasks on a set of project files.
Public methodSave
Persists the project file. The file has extension .sdlproj and is located in the folder given by LocalProjectFolder. The project file path can be obtained using FilePath.
Public methodSavePackageAs
Saves out the package to a specified file location.
Public methodSaveProjectFileAs
Saves out the file to a specified file location.
Public methodSaveTaskReportAs
Saves the task report out to a file, in the specified format
Public methodSetFileRole
Changes the role of the file. A Scan task (Scan) should be run after changing the file role in this way.
Public methodSynchronizeServerProjectData
Synchronizes the local project information with the information stored on the server
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUndoCheckoutFiles
Removes the lock on server files without changing the version of the file on the server
Public methodUpdateProject
Updates the project with the new information contained in projectInfo.
Public methodUpdateSettings(ISettingsBundle)
Updates the project-level settings.
Public methodUpdateSettings(Language, ISettingsBundle)
Updates the settings for a specific target language.
Public methodUpdateTermbaseConfiguration
Updates the termbase-related settings for this project.
Public methodUpdateTranslationProviderConfiguration(TranslationProviderConfiguration)
Updates the project-wide translation provider configuration.
Public methodUpdateTranslationProviderConfiguration(Language, TranslationProviderConfiguration)
Updates the translation provider configuration for a specific project target language.
Top
Remarks

An SDL Trados Studio project always resides in a dedicated project folder on disk. Within this, you can find the following: The project file: an XML file with the "sdlproj" extension that contains all the information about the project.The language folders: for every project language (source and target), the project folder contains a language sub-folder, named using the ISO abbreviation of the language. Within these folders, all the project files are stored (see ProjectFile). When adding a source file to the project, this will be copied into the source language folder. Each of the language folders can contain sub folders, which allows adding additional structure to the project (see Folder).The 'File Types' folder: this folder contain the file type definition files (*.sdlfiletype) that are used within the project. Which file types are used in a project is determined by the project template or the reference project upon which the project was based. The 'TM' folder: this folder contains any file-based project translation memories that are created for the project. The PopulateProjectTranslationMemories task will create a project translation memory for every target language and main translation memory. The use of project translation memories is optional. The 'Reports' folder: folder contains all the reports generated by automatic tasks. The reports are stored as XML files and can be saved into various output formats using SaveTaskReportAs(Guid, String, ReportFormat).

When creating a new FileBasedProject object, the project XML file is loaded into memory. Changes to the project are not saved automatically and only happen in memory. After doing a series of operations on a project, you need to call Save to save the project XML file. You may choose to do this at key points to prevent losing data in case your application crashes.

The FileBasedProject class can be used to open any type of SDL Trados Studio project. In order to create a project from a project package (*.sdlppx), use the static CreateFromProjectPackage(String, String, ProjectPackageImport) method.

Project created using the Project Automation API will not automatically be added to the SDL Trados Studio project list. In order to do this, simply open the project in SDL Trados Studio, which will add it to the list.

See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments