Class DependencyModelImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.dependency.impl.DependencyModelImpl
-
- All Implemented Interfaces:
DependencyModel
public class DependencyModelImpl extends Object implements DependencyModel
Implementation ofDependencyModel.- Author:
- Rahol Kumar, Alexander Schultheis
-
-
Constructor Summary
Constructors Constructor Description DependencyModelImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddDependencies(Collection<Dependency> dependencies)Method, that adds a collection of dependencies to the dependency model.voidaddDependency(Dependency dependency)Method, that adds a dependency to the dependency model.voidaddDependencySimilarity(DependencyType sourceDependencyType, DependencyType targetDependencyType, double similarity)Method, that stores a similarity between two dependency types.voidaddDependencyType(DependencyType dependencyType)Method, that stores a new dependency type in the model.Set<Dependency>getDependencies()Method, that returns all dependencies saved in the model.Set<Dependency>getDependencies(String dependencyName, DataObject sourceObject, DataObject targetObject)Method, that returns a set of dependencies, that match the given name of the dependency class and the used source and target objects.doublegetDependencySimilarity(DependencyType sourceDependencyType, DependencyType targetDependencyType)DependencyTypegetDependencyType(String dependencyTypeName)Method, that gets the name of a dependency type and returns the corresponding object.Set<DependencyType>getDependencyTypes()Method, that returns the dependency types, which were saved in the dependency model.Set<String>getDependencyTypesAsString()Method, that returns the names of the dependency types, which were used in the dependencies, saved in the model.
-
-
-
Method Detail
-
addDependency
public void addDependency(Dependency dependency)
Description copied from interface:DependencyModelMethod, that adds a dependency to the dependency model.- Specified by:
addDependencyin interfaceDependencyModel- Parameters:
dependency- The dependency to be added to the model.
-
addDependencies
public void addDependencies(Collection<Dependency> dependencies)
Description copied from interface:DependencyModelMethod, that adds a collection of dependencies to the dependency model.- Specified by:
addDependenciesin interfaceDependencyModel- Parameters:
dependencies- The dependencies to be added to the model.
-
getDependencies
public Set<Dependency> getDependencies()
Description copied from interface:DependencyModelMethod, that returns all dependencies saved in the model.- Specified by:
getDependenciesin interfaceDependencyModel- Returns:
- A set of all dependencies.
-
getDependencyTypesAsString
public Set<String> getDependencyTypesAsString()
Description copied from interface:DependencyModelMethod, that returns the names of the dependency types, which were used in the dependencies, saved in the model.- Specified by:
getDependencyTypesAsStringin interfaceDependencyModel- Returns:
- A set of strings, containing the dependency type names.
-
getDependencyTypes
public Set<DependencyType> getDependencyTypes()
Description copied from interface:DependencyModelMethod, that returns the dependency types, which were saved in the dependency model.- Specified by:
getDependencyTypesin interfaceDependencyModel- Returns:
- All available dependency types.
-
getDependencyType
public DependencyType getDependencyType(String dependencyTypeName)
Description copied from interface:DependencyModelMethod, that gets the name of a dependency type and returns the corresponding object.- Specified by:
getDependencyTypein interfaceDependencyModel- Parameters:
dependencyTypeName- The name of the specific dependency type.- Returns:
- The required dependency type. If it does not exist, null is returned.
-
getDependencies
public Set<Dependency> getDependencies(String dependencyName, DataObject sourceObject, DataObject targetObject)
Description copied from interface:DependencyModelMethod, that returns a set of dependencies, that match the given name of the dependency class and the used source and target objects.- Specified by:
getDependenciesin interfaceDependencyModel- Parameters:
dependencyName- The name of the dependency type.sourceObject- The source object used in the dependency.targetObject- The target object used in the dependency.- Returns:
- A set of dependencies, that match the given constraints.
-
addDependencyType
public void addDependencyType(DependencyType dependencyType)
Description copied from interface:DependencyModelMethod, that stores a new dependency type in the model.- Specified by:
addDependencyTypein interfaceDependencyModel- Parameters:
dependencyType- The dependency type, that should be added to the model.
-
addDependencySimilarity
public void addDependencySimilarity(DependencyType sourceDependencyType, DependencyType targetDependencyType, double similarity)
Description copied from interface:DependencyModelMethod, that stores a similarity between two dependency types. Both dependency types must exist in the model, otherwise, an exception is thrown.- Specified by:
addDependencySimilarityin interfaceDependencyModel- Parameters:
sourceDependencyType- The dependency type from which the similarity originates.targetDependencyType- The dependency type to which the similarity exists.similarity- The similarity value between those both dependency types.
-
getDependencySimilarity
public double getDependencySimilarity(DependencyType sourceDependencyType, DependencyType targetDependencyType)
- Specified by:
getDependencySimilarityin interfaceDependencyModel
-
-