Package com.ibm.dbb.dependency
Class PhysicalDependency
- java.lang.Object
-
- com.ibm.dbb.dependency.LogicalDependency
-
- com.ibm.dbb.dependency.PhysicalDependency
-
public class PhysicalDependency extends LogicalDependency
The PhysicalDependency class represents a logical dependency that has been processed by theDependencyResolver
. It may or may not have been resolved to a physical file on the build file system. If unresolved then the resolved flag is set tofalse
and the three resolution fields (collection, sourceDir, file) are set tonull
.
-
-
Constructor Summary
Constructors Constructor Description PhysicalDependency()
PhysicalDependency(LogicalDependency dependency)
Public ConstructorPhysicalDependency(LogicalDependency dependency, java.lang.String collection, java.lang.String sourceDir, java.lang.String file)
Public Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getArchive()
Returns the archive path for this dependencyjava.lang.String
getCollection()
Returns the repository collection name the dependency was located injava.lang.String
getFile()
Returns the resolved physical file for this dependencyjava.lang.String
getSourceDir()
Returns the root source directory the physical file will be located inint
hashCode()
boolean
isExcluded()
Flag indicating if the PhysicalDependency was excluded from searchPath find() (likely due to path)boolean
isResolved()
Flag indicating if the logical dependency was resolved to a physical filevoid
parseFromJSON(com.google.gson.JsonObject jsonObject)
Sets the logical name, library, and category according to a JSON representation of the objectvoid
setArchive(java.lang.String archive)
Sets the archive path for this dependencyvoid
setCollection(java.lang.String collection)
Sets the repository collection name the dependency was located invoid
setExcluded(boolean excluded)
Set the flag indicating if the PhysicalDependency was excluded from searchvoid
setFile(java.lang.String file)
Sets the resolved physical file for this dependencyvoid
setResolved(boolean value)
Set the flag indicating if the logical dependency was resolved to a physical filevoid
setSourceDir(java.lang.String sourceDir)
Sets the root source directory the physical file will be located incom.google.gson.JsonObject
toJSON()
Returns a JSON representation of the objectjava.lang.String
toString()
-
Methods inherited from class com.ibm.dbb.dependency.LogicalDependency
getCategory, getLibrary, getLname, setCategory, setLibrary, setLname
-
-
-
-
Constructor Detail
-
PhysicalDependency
public PhysicalDependency()
-
PhysicalDependency
public PhysicalDependency(LogicalDependency dependency)
Public Constructor- Parameters:
dependency
- Logical dependency this physical dependency is based on
-
PhysicalDependency
public PhysicalDependency(LogicalDependency dependency, java.lang.String collection, java.lang.String sourceDir, java.lang.String file)
Public Constructor- Parameters:
dependency
- Logical dependency this physical dependency is base oncollection
- Repository collection name the dependency was located insourceDir
- The root source directory the physical file is located infile
- The resolved file for this dependency
-
-
Method Detail
-
getCollection
public java.lang.String getCollection()
Returns the repository collection name the dependency was located in- Returns:
- the repository collection name the dependendcy was located in
-
setCollection
public void setCollection(java.lang.String collection)
Sets the repository collection name the dependency was located in- Parameters:
collection
- the repository collection name the dependency was located in
-
getSourceDir
public java.lang.String getSourceDir()
Returns the root source directory the physical file will be located in- Returns:
- the root source diredctory the physical fiel will be located in
-
setSourceDir
public void setSourceDir(java.lang.String sourceDir)
Sets the root source directory the physical file will be located in- Parameters:
sourceDir
- the root source directory the physical file will be located in
-
getFile
public java.lang.String getFile()
Returns the resolved physical file for this dependency- Returns:
- the resolved physical file for this dependency
-
setFile
public void setFile(java.lang.String file)
Sets the resolved physical file for this dependency- Parameters:
file
- the resolved physical file for this dependency
-
getArchive
public java.lang.String getArchive()
Returns the archive path for this dependency- Returns:
- archive the absolute path to the archive
-
setArchive
public void setArchive(java.lang.String archive)
Sets the archive path for this dependency- Parameters:
archive
- the absolute path to the archive
-
isResolved
public boolean isResolved()
Flag indicating if the logical dependency was resolved to a physical file- Returns:
- the flag indicating if the logical dependency was resolved to a physical file
-
setResolved
public void setResolved(boolean value)
Set the flag indicating if the logical dependency was resolved to a physical file- Parameters:
value
- the flag indicating if the logical dependency was resolved to a physical file
-
isExcluded
public boolean isExcluded()
Flag indicating if the PhysicalDependency was excluded from searchPath find() (likely due to path)
-
setExcluded
public void setExcluded(boolean excluded)
Set the flag indicating if the PhysicalDependency was excluded from search- Parameters:
value
- the flag indicating if PhysicalDependency was found
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classLogicalDependency
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classLogicalDependency
-
toJSON
public com.google.gson.JsonObject toJSON()
Description copied from class:LogicalDependency
Returns a JSON representation of the object- Overrides:
toJSON
in classLogicalDependency
- Returns:
- the JSON representation of the object
-
parseFromJSON
public void parseFromJSON(com.google.gson.JsonObject jsonObject)
Description copied from class:LogicalDependency
Sets the logical name, library, and category according to a JSON representation of the object- Overrides:
parseFromJSON
in classLogicalDependency
- Parameters:
jsonObject
- the JSON representation of the object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classLogicalDependency
-
-