Interface IComparisonDataSource
- 
- All Known Subinterfaces:
- IActiveComparisonDataSource
 
 public interface IComparisonDataSourceThe data source of a side of a comparison process.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPROJECT_FILEStandard name of the Eclipse project descriptor filestatic StringPROJECT_SOURCE_FOLDERStandard folder of EDT project sources
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description IComparisonDataSourceTransactionbeginTransaction()Begins the data source operation transaction.booleanfileExists(Path path)Checks whether a file for the specified path exists.IBmModelgetBmModel()Gets the BM model associated with the sourceList<String>getCollectionSymlinks(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference collectionReference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)Returns a list of symbolic links for objects owned by this data source and referenced by the specified multi-reference from the specified context object.DistributionDescriptiongetDistributionDescription()Returns the distribution support information for this data source.IDtProjectgetDtProject()Gets theIDtProjectinstance associated with this data source and related to the project being represented by this sourceList<Path>getFileListRecursively(Path path)Returns the file list for given folder path and all its subfolders.InputStreamgetFileStream(Path path)Returns a file stream for the specified path.IModelEditingSupportgetModelEditingSupport()Returns the model editing support provider for this data source.org.eclipse.emf.ecore.EObjectgetObjectById(long id)Returns an object by the specified Id.StringgetPath(String symlink, org.eclipse.emf.ecore.EClass eClass)Gets the path for the given symlink andEClassClass contextStringgetProjectName()Returns project name for this data source.StringgetProjectNature()Returns the stored project nature.StringgetSymlink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EObject eObject, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)Returns a symbolic link for an object owned by this data source.StringgetSymlink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider)Returns a symbolic link for an object owned by this data source, as defined by a single reference from a context object.Map<org.eclipse.emf.ecore.EClass,List<String>>getSymlinksOfTopObjects(org.eclipse.xtext.scoping.IScopeProvider scopeProvider, List<org.eclipse.emf.ecore.EClass> eClasses)Gets all top level object symlinks for a given set ofEClass'es.VersiongetTargetRuntimeVersion()Gets the target runtime version for the project behind this sourceorg.eclipse.emf.ecore.EObjectgetTopLevelObject(String symlink, org.eclipse.emf.ecore.EClass eClass)Returns a top-level MD object by the specified symbolic link.longgetTopObjectIdByFqn(String fqn)Gets top-level object Id by FQN.DataSourceTypegetType()Gets the type of the data source.booleanisOverlayOf(IComparisonDataSource comparisonDataSource)Checks if this data source overlays the provided source.voidprepareTopObjectInfos(List<TopObjectInfo> topObjectInfos)Prepares information for the specified top objects.voidstartIfNecessary(org.eclipse.core.runtime.IProgressMonitor progressMonitor)Starts the data source in the flow of the comparison session creation.voidstop()Stops the data source in the flow of the comprison session closure.voidsynchronize(org.eclipse.core.runtime.IProgressMonitor progressMonitor)Synchronizes the data source with external changes being made to this source.booleantopObjectExists(String symlink, org.eclipse.emf.ecore.EClass eClass)Checks if the referenced top object exists in the data source.
 
- 
- 
- 
Field Detail- 
PROJECT_SOURCE_FOLDERstatic final String PROJECT_SOURCE_FOLDER Standard folder of EDT project sources- See Also:
- Constant Field Values
 
 - 
PROJECT_FILEstatic final String PROJECT_FILE Standard name of the Eclipse project descriptor file- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
prepareTopObjectInfosvoid prepareTopObjectInfos(List<TopObjectInfo> topObjectInfos) Prepares information for the specified top objects. Deletes top object info if the referenced top object doesn't exist in the data source.- Parameters:
- topObjectInfos- the list of top object information containers, cannot be- null
 
 - 
getTopLevelObjectorg.eclipse.emf.ecore.EObject getTopLevelObject(String symlink, org.eclipse.emf.ecore.EClass eClass) Returns a top-level MD object by the specified symbolic link.- Parameters:
- symlink- the symbolic link (FQN) of the MD object, not- null; an exception will be thrown for an invalid or a non-top object argument
- eClass- The- EClassthat defines the context of the symlink resolution, may be- null
- Returns:
- the object, never null
 
 - 
getSymlinkString getSymlink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.emf.ecore.EObject eObject, org.eclipse.xtext.scoping.IScopeProvider scopeProvider) Returns a symbolic link for an object owned by this data source.- Parameters:
- context- the referencing object, not- null
- reference- the reference feature, not- null
- eObject- the referenced object, not- null
- scopeProvider- the scope provider
- Returns:
- the symbolic link, never null
 
 - 
getSymlinkString getSymlink(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference reference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider) Returns a symbolic link for an object owned by this data source, as defined by a single reference from a context object.- Parameters:
- context- the referencing object, not- null
- reference- the referencing feature, not- null, must be single reference
- eObject- the referenced object, not- null
- scopeProvider- the scope provider
- Returns:
- the symbolic link, never null
 
 - 
getCollectionSymlinksList<String> getCollectionSymlinks(org.eclipse.emf.ecore.EObject context, org.eclipse.emf.ecore.EReference collectionReference, org.eclipse.xtext.scoping.IScopeProvider scopeProvider) Returns a list of symbolic links for objects owned by this data source and referenced by the specified multi-reference from the specified context object.- Parameters:
- context- the referencing object, not- null
- collectionReference- the referencing feature, not- null, must be multi-reference
- scopeProvider- the scope provider
- Returns:
- a list of symbolic links, never null
 
 - 
getFileStreamInputStream getFileStream(Path path) Returns a file stream for the specified path.- Parameters:
- path- the string with the path
- Returns:
- the input stream
 
 - 
topObjectExistsboolean topObjectExists(String symlink, org.eclipse.emf.ecore.EClass eClass) Checks if the referenced top object exists in the data source. The implementation of this method should be as quick as possible.- Parameters:
- symlink- The symlink to check existence for.
- eClass- The eClass of expected object.
- Returns:
- True if the data source is able to retrieve referenced object; false otherwise.
 
 - 
getTargetRuntimeVersionVersion getTargetRuntimeVersion() Gets the target runtime version for the project behind this source- Returns:
- The version of the target 1C runtime. Cannot be null
 
 - 
getSymlinksOfTopObjectsMap<org.eclipse.emf.ecore.EClass,List<String>> getSymlinksOfTopObjects(org.eclipse.xtext.scoping.IScopeProvider scopeProvider, List<org.eclipse.emf.ecore.EClass> eClasses) Gets all top level object symlinks for a given set ofEClass'es. If this data source is associated with Configuration-aware project, the order of the returned instances will be the same as in the corresponding collection of the Configuration.- Parameters:
- scopeProvider- the scope provider for symbolic links, cannot be- null
- eClasses- the given set of- EClass'es, may be- null
- Returns:
- all top level object symlinks for a given set of EClass'es, nevernull
 
 - 
beginTransactionIComparisonDataSourceTransaction beginTransaction() Begins the data source operation transaction.- Returns:
- The newly started transaction. Cannot be null
 
 - 
getFileListRecursivelyList<Path> getFileListRecursively(Path path) Returns the file list for given folder path and all its subfolders.- Parameters:
- path- the relative folder path to get the file list for, can not be- null
- Returns:
- the list of relative file paths, never null
 
 - 
getProjectNatureString getProjectNature() Returns the stored project nature.- Returns:
- the stored project nature, may be ICoreConstants.V8_CONFIGURATION_NATUREorICoreConstants.V8_EXTENSION_NATUREorICoreConstants.V8_EXTERNAL_OBJECTS_NATUREornullif the data source does not store V8 project
 
 - 
getProjectNameString getProjectName() Returns project name for this data source.- Returns:
- the project name, never null
 
 - 
getModelEditingSupportIModelEditingSupport getModelEditingSupport() Returns the model editing support provider for this data source.- Returns:
- the model editing support provider or nullif no provider for this data source was specified
 
 - 
getDistributionDescriptionDistributionDescription getDistributionDescription() Returns the distribution support information for this data source.- Returns:
- the distribution support information or nullif no information for this data source was specified
 
 - 
fileExistsboolean fileExists(Path path) Checks whether a file for the specified path exists.- Parameters:
- path- the specified path to check the existence for, cannot be- null
- Returns:
- trueif the file exists,- falseotherwise
 
 - 
getTypeDataSourceType getType() Gets the type of the data source.- Returns:
- The type of the data source. May not be null
 
 - 
getPathString getPath(String symlink, org.eclipse.emf.ecore.EClass eClass) Gets the path for the given symlink andEClassClass context- Parameters:
- symlink- The symlink to check existence for.
- eClass- The eClass of expected object.
- Returns:
- The Stringrepresentation of the path within the source. May benull
 
 - 
startIfNecessaryvoid startIfNecessary(org.eclipse.core.runtime.IProgressMonitor progressMonitor) Starts the data source in the flow of the comparison session creation. Implementation should take care about multiple attempts of start request being submitted to the data source- Parameters:
- progressMonitor- Progress monitor of a start sequence. May not be- null
 
 - 
stopvoid stop() Stops the data source in the flow of the comprison session closure. Should be failure-proof to not hinder othe sources sequential stops
 - 
synchronizevoid synchronize(org.eclipse.core.runtime.IProgressMonitor progressMonitor) Synchronizes the data source with external changes being made to this source. Until this method call the data source should store any change tasks without applying- Parameters:
- progressMonitor- Progress monitor of a update/synchronization sequence. May not be- null
 
 - 
isOverlayOfboolean isOverlayOf(IComparisonDataSource comparisonDataSource) Checks if this data source overlays the provided source. Used to syncrhonize the data in case of underlying data source data changes- Returns:
 
 - 
getBmModelIBmModel getBmModel() Gets the BM model associated with the source- Returns:
- The BM model instance. May not be null
 
 - 
getDtProjectIDtProject getDtProject() Gets theIDtProjectinstance associated with this data source and related to the project being represented by this source- Returns:
- The IDtProjectinstance. May not benull
 
 - 
getObjectByIdorg.eclipse.emf.ecore.EObject getObjectById(long id) Returns an object by the specified Id.- Parameters:
- id- the Id
- Returns:
- the object found or null
 
 - 
getTopObjectIdByFqnlong getTopObjectIdByFqn(String fqn) Gets top-level object Id by FQN.- Parameters:
- fqn- the FQN to get Id by, may not be- null
- Returns:
- the Id or -1Lif there is no object with the specified FQN
 
 
- 
 
-