Class RelevantFile
- java.lang.Object
-
- de.unirostock.sems.ModelCrawler.databases.PMR2.RelevantFile
-
public class RelevantFile extends Object
The Class RelevantFile.
-
-
Constructor Summary
Constructors Constructor Description RelevantFile(String filePath)
The Constructor.RelevantFile(String filePath, String fileId)
The Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChange(PmrChange change)
Adds a change to the changeSet and creates one if necessary.String
generateFileId(String repoUrl)
Generate file id.PmrChangeSet
getChangeSet()
Return the changeSet or null, if no one was setted and no change added.String
getFileId()
Gets the file id.String
getFilePath()
Gets the file path.Date
getLatestKnownVersionDate()
Gets the latest known VersionDate.String
getLatestKnownVersionId()
Gets the latest known VersionId.Date
getLatestVersionDate()
Gets the real latest versionDate.String
getLatestVersionId()
Gets the real latest versionId.URL
getRepositoryUrl()
Gets the repository url.int
getType()
Gets the type.void
setLatestKnownVersion(String latestVersionId, Date latestVersionDate)
Sets the latest known Version of this model.void
setLatestKnownVersion(String latestVersionId, Date latestVersionDate, PmrChangeSet changeSet)
Sets the latest known Version of this model and the changeSet of it.void
setType(int type)
Sets the type.
-
-
-
Method Detail
-
generateFileId
public String generateFileId(String repoUrl) throws MalformedURLException, URISyntaxException
Generate file id.- Parameters:
repoUrl
- the repo url- Returns:
- the string
- Throws:
MalformedURLException
- the malformed url exceptionURISyntaxException
- the URI syntax exception
-
getFilePath
public String getFilePath()
Gets the file path.- Returns:
- the file path
-
getRepositoryUrl
public URL getRepositoryUrl()
Gets the repository url.- Returns:
- the repository url
-
getFileId
public String getFileId()
Gets the file id.- Returns:
- the file id
-
setLatestKnownVersion
public void setLatestKnownVersion(String latestVersionId, Date latestVersionDate, PmrChangeSet changeSet)
Sets the latest known Version of this model and the changeSet of it.- Parameters:
latestVersionId
- the latest version idlatestVersionDate
- the latest version datechangeSet
- the change set
-
setLatestKnownVersion
public void setLatestKnownVersion(String latestVersionId, Date latestVersionDate)
Sets the latest known Version of this model.- Parameters:
latestVersionId
- the latest version idlatestVersionDate
- the latest version date
-
getLatestKnownVersionId
public String getLatestKnownVersionId()
Gets the latest known VersionId. Not the real latest, but the versionId setted with setLatestKnownVersion()- Returns:
- versionId
-
getLatestKnownVersionDate
public Date getLatestKnownVersionDate()
Gets the latest known VersionDate. Not the real latest, but the versionDate setted with setLatestKnownVersion()- Returns:
- versionDate
-
getLatestVersionId
public String getLatestVersionId()
Gets the real latest versionId. Either from the latestKnownVersion() or from the changeSet- Returns:
- versionId
-
getLatestVersionDate
public Date getLatestVersionDate()
Gets the real latest versionDate. Either from the latestKnownVersion() or from the changeSet- Returns:
- versionDate
-
getChangeSet
public PmrChangeSet getChangeSet()
Return the changeSet or null, if no one was setted and no change added.- Returns:
- PmrChangeSet or null
-
addChange
public void addChange(PmrChange change)
Adds a change to the changeSet and creates one if necessary.- Parameters:
change
- the change
-
getType
public int getType()
Gets the type.- Returns:
- the type
-
setType
public void setType(int type)
Sets the type.- Parameters:
type
- the type
-
-