Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB |
|
Before Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 48 KiB |
@ -0,0 +1,58 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- chartController: ChartController
|
||||
+ startPage()
|
||||
+ displayDataAndChart(data: ProjectData, chart: Chart)
|
||||
+ openOpenRankSegment()
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getProjectData(): ProjectData
|
||||
}
|
||||
|
||||
class ChartController <<control>> {
|
||||
+ generateChart(data: ProjectData): Chart
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- projectData: List<ProjectData>
|
||||
+ getProjectData(): ProjectData
|
||||
}
|
||||
|
||||
class ProjectData <<entity>> {
|
||||
- id: String
|
||||
- name: String
|
||||
- openRankData: List<Double>
|
||||
+ getId(): String
|
||||
+ getName(): String
|
||||
+ getOpenRankData(): List<Double>
|
||||
}
|
||||
|
||||
class Chart <<entity>> {
|
||||
- type: String
|
||||
- data: Object
|
||||
- title: String
|
||||
+ render(): void
|
||||
+ getType(): String
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> AlgorithmController : "调用"
|
||||
MainUI --> ChartController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> ProjectData : "返回"
|
||||
ChartController ..> Chart : "生成"
|
||||
DateBase "1" *-- "many" ProjectData : "包含"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,141 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- webUI: WebUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToNetworkGraphPage()
|
||||
}
|
||||
|
||||
class WebUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- chartController: ChartController
|
||||
+ showNetworkGraphPage()
|
||||
+ displayNetworkGraph(graph: NetworkGraph)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getNetworkGraphData(): NetworkData
|
||||
}
|
||||
|
||||
class ChartController <<control>> {
|
||||
+ drawNetworkGraph(data: NetworkData): NetworkGraph
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
- projectData: List<ProjectData>
|
||||
- relationshipData: List<RelationshipData>
|
||||
+ getDeveloperData(): List<DeveloperData>
|
||||
+ getProjectData(): List<ProjectData>
|
||||
+ getRelationshipData(): List<RelationshipData>
|
||||
}
|
||||
|
||||
class NetworkData <<entity>> {
|
||||
- developers: List<DeveloperData>
|
||||
- projects: List<ProjectData>
|
||||
- relationships: List<RelationshipData>
|
||||
+ getDevelopers(): List<DeveloperData>
|
||||
+ getProjects(): List<ProjectData>
|
||||
+ getRelationships(): List<RelationshipData>
|
||||
}
|
||||
|
||||
class NetworkGraph <<entity>> {
|
||||
- graphId: String
|
||||
- graphType: String
|
||||
- nodes: List<GraphNode>
|
||||
- edges: List<GraphEdge>
|
||||
- layout: GraphLayout
|
||||
+ render(): void
|
||||
+ exportAsImage(format: String): void
|
||||
+ getGraphData(): Object
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- name: String
|
||||
- avatar: String
|
||||
- projects: List<String>
|
||||
+ getDeveloperId(): String
|
||||
+ getName(): String
|
||||
+ getProjects(): List<String>
|
||||
}
|
||||
|
||||
class ProjectData <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- contributors: List<String>
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getContributors(): List<String>
|
||||
}
|
||||
|
||||
class RelationshipData <<entity>> {
|
||||
- sourceId: String
|
||||
- targetId: String
|
||||
- relationshipType: String
|
||||
- strength: double
|
||||
+ getSourceId(): String
|
||||
+ getTargetId(): String
|
||||
+ getRelationshipType(): String
|
||||
+ getStrength(): double
|
||||
}
|
||||
|
||||
class GraphNode <<entity>> {
|
||||
- nodeId: String
|
||||
- nodeType: String
|
||||
- label: String
|
||||
- position: Point
|
||||
- properties: Map<String, Object>
|
||||
+ getNodeId(): String
|
||||
+ getLabel(): String
|
||||
+ getPosition(): Point
|
||||
}
|
||||
|
||||
class GraphEdge <<entity>> {
|
||||
- edgeId: String
|
||||
- sourceNodeId: String
|
||||
- targetNodeId: String
|
||||
- weight: double
|
||||
- label: String
|
||||
+ getSourceNodeId(): String
|
||||
+ getTargetNodeId(): String
|
||||
+ getWeight(): double
|
||||
}
|
||||
|
||||
class GraphLayout <<entity>> {
|
||||
- layoutType: String
|
||||
- parameters: Map<String, Object>
|
||||
- nodePositions: Map<String, Point>
|
||||
+ calculateLayout(nodes: List<GraphNode>, edges: List<GraphEdge>): void
|
||||
+ getNodePosition(nodeId: String): Point
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> WebUI : "跳转"
|
||||
WebUI --> AlgorithmController : "调用"
|
||||
WebUI --> ChartController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> NetworkData : "返回"
|
||||
ChartController ..> NetworkGraph : "生成"
|
||||
DateBase "1" *-- "many" DeveloperData : "包含"
|
||||
DateBase "1" *-- "many" ProjectData : "包含"
|
||||
DateBase "1" *-- "many" RelationshipData : "包含"
|
||||
NetworkData "1" *-- "many" DeveloperData : "包含"
|
||||
NetworkData "1" *-- "many" ProjectData : "包含"
|
||||
NetworkData "1" *-- "many" RelationshipData : "包含"
|
||||
NetworkGraph "1" *-- "many" GraphNode : "包含"
|
||||
NetworkGraph "1" *-- "many" GraphEdge : "包含"
|
||||
NetworkGraph "1" *-- "1" GraphLayout : "使用"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,126 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayPRData(prData: List<PullRequestData>)
|
||||
+ displayIssueData(issueData: List<IssueData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getProjectIssueData(): List<IssueData>
|
||||
+ getProjectPRData(): List<PullRequestData>
|
||||
+ storeIssueData(issueData: List<IssueData>): boolean
|
||||
+ storePRData(prData: List<PullRequestData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestProjectIssueData(projectId: String): List<IssueData>
|
||||
+ requestProjectPRData(projectId: String): List<PullRequestData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- issueData: List<IssueData>
|
||||
- prData: List<PullRequestData>
|
||||
- projects: List<Project>
|
||||
+ storeIssueData(issueData: List<IssueData>): boolean
|
||||
+ storePRData(prData: List<PullRequestData>): boolean
|
||||
+ getIssueData(projectId: String): List<IssueData>
|
||||
+ getPRData(projectId: String): List<PullRequestData>
|
||||
}
|
||||
|
||||
class IssueData <<entity>> {
|
||||
- issueId: String
|
||||
- projectId: String
|
||||
- title: String
|
||||
- state: String
|
||||
- creator: String
|
||||
- createdAt: Date
|
||||
- closedAt: Date
|
||||
- labels: List<String>
|
||||
- commentsCount: int
|
||||
+ getIssueId(): String
|
||||
+ getProjectId(): String
|
||||
+ getState(): String
|
||||
+ calculateDuration(): long
|
||||
+ isClosed(): boolean
|
||||
}
|
||||
|
||||
class PullRequestData <<entity>> {
|
||||
- prId: String
|
||||
- projectId: String
|
||||
- title: String
|
||||
- state: String
|
||||
- author: String
|
||||
- createdAt: Date
|
||||
- mergedAt: Date
|
||||
- closedAt: Date
|
||||
- reviewComments: int
|
||||
- commits: int
|
||||
+ getPRId(): String
|
||||
+ getProjectId(): String
|
||||
+ getState(): String
|
||||
+ isMerged(): boolean
|
||||
+ calculateMergeTime(): long
|
||||
}
|
||||
|
||||
class Project <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- repositoryUrl: String
|
||||
- description: String
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getRepositoryUrl(): String
|
||||
}
|
||||
|
||||
class IssueStatistics <<entity>> {
|
||||
- projectId: String
|
||||
- totalIssues: int
|
||||
- openIssues: int
|
||||
- closedIssues: int
|
||||
- averageResolutionTime: double
|
||||
- issueTrend: Map<Date, int>
|
||||
+ calculateStatistics(issueData: List<IssueData>): void
|
||||
+ getOpenIssueCount(): int
|
||||
+ getClosedIssueCount(): int
|
||||
}
|
||||
|
||||
class PRStatistics <<entity>> {
|
||||
- projectId: String
|
||||
- totalPRs: int
|
||||
- openPRs: int
|
||||
- mergedPRs: int
|
||||
- averageMergeTime: double
|
||||
- prTrend: Map<Date, int>
|
||||
+ calculateStatistics(prData: List<PullRequestData>): void
|
||||
+ getMergedPRCount(): int
|
||||
+ getOpenPRCount(): int
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> IssueData : "返回"
|
||||
GithubApi ..> PullRequestData : "返回"
|
||||
DateBase "1" *-- "many" IssueData : "存储"
|
||||
DateBase "1" *-- "many" PullRequestData : "存储"
|
||||
DateBase "1" *-- "many" Project : "包含"
|
||||
IssueStatistics ..> IssueData : "分析"
|
||||
PRStatistics ..> PullRequestData : "分析"
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,163 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayDeveloperData(developerData: List<DeveloperData>)
|
||||
+ displayRepositoryData(repositoryData: List<RepositoryData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getProjectDeveloperData(): List<DeveloperData>
|
||||
+ getRepositoryData(): List<RepositoryData>
|
||||
+ storeProjectDeveloperData(developerData: List<DeveloperData>): boolean
|
||||
+ storeRepositoryData(repositoryData: List<RepositoryData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestProjectDeveloperData(projectId: String): List<DeveloperData>
|
||||
+ requestRepositoryData(projectId: String): List<RepositoryData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
- repositoryData: List<RepositoryData>
|
||||
- organizations: List<Organization>
|
||||
+ storeProjectDeveloperData(developerData: List<DeveloperData>): boolean
|
||||
+ storeRepositoryData(repositoryData: List<RepositoryData>): boolean
|
||||
+ getDeveloperData(projectId: String): List<DeveloperData>
|
||||
+ getRepositoryData(organizationId: String): List<RepositoryData>
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- username: String
|
||||
- email: String
|
||||
- organization: String
|
||||
- repositories: List<String>
|
||||
- joinDate: Date
|
||||
+ getDeveloperId(): String
|
||||
+ getUsername(): String
|
||||
+ getOrganization(): String
|
||||
+ getRepositories(): List<String>
|
||||
}
|
||||
|
||||
class RepositoryData <<entity>> {
|
||||
- repositoryId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- organization: String
|
||||
- createdAt: Date
|
||||
- lastUpdated: Date
|
||||
- language: String
|
||||
+ getRepositoryId(): String
|
||||
+ getName(): String
|
||||
+ getOrganization(): String
|
||||
+ getLanguage(): String
|
||||
}
|
||||
|
||||
class Organization <<entity>> {
|
||||
- organizationId: String
|
||||
- name: String
|
||||
- description: String
|
||||
- memberCount: int
|
||||
- repositoryCount: int
|
||||
+ getOrganizationId(): String
|
||||
+ getName(): String
|
||||
+ getMemberCount(): int
|
||||
+ getRepositoryCount(): int
|
||||
}
|
||||
|
||||
class DeveloperStatistics <<entity>> {
|
||||
- organizationId: String
|
||||
- totalDevelopers: int
|
||||
- activeDevelopers: int
|
||||
- newDevelopersThisMonth: int
|
||||
- developerGrowthRate: double
|
||||
- topLanguages: Map<String, int>
|
||||
+ calculateStatistics(developerData: List<DeveloperData>): void
|
||||
+ getTotalDevelopers(): int
|
||||
+ getDeveloperGrowthRate(): double
|
||||
}
|
||||
|
||||
class RepositoryStatistics <<entity>> {
|
||||
- organizationId: String
|
||||
- totalRepositories: int
|
||||
- publicRepositories: int
|
||||
- privateRepositories: int
|
||||
- newRepositoriesThisMonth: int
|
||||
- repositoryGrowthRate: double
|
||||
- topLanguages: Map<String, int>
|
||||
+ calculateStatistics(repositoryData: List<RepositoryData>): void
|
||||
+ getTotalRepositories(): int
|
||||
+ getRepositoryGrowthRate(): double
|
||||
}
|
||||
|
||||
class LanguageStatistics <<entity>> {
|
||||
- language: String
|
||||
- developerCount: int
|
||||
- repositoryCount: int
|
||||
- popularityScore: double
|
||||
+ getLanguage(): String
|
||||
+ getDeveloperCount(): int
|
||||
+ getRepositoryCount(): int
|
||||
+ calculatePopularityScore(): double
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> DeveloperData : "返回"
|
||||
GithubApi ..> RepositoryData : "返回"
|
||||
DateBase "1" *-- "many" DeveloperData : "存储"
|
||||
DateBase "1" *-- "many" RepositoryData : "存储"
|
||||
DateBase "1" *-- "many" Organization : "包含"
|
||||
DeveloperStatistics ..> DeveloperData : "分析"
|
||||
RepositoryStatistics ..> RepositoryData : "分析"
|
||||
LanguageStatistics ..> DeveloperData : "关联"
|
||||
LanguageStatistics ..> RepositoryData : "关联"
|
||||
|
||||
note right of DateController::getProjectDeveloperData
|
||||
获取项目开发者数据
|
||||
包括从API获取和存储
|
||||
end note
|
||||
|
||||
note right of DateController::getRepositoryData
|
||||
获取仓库数据
|
||||
包括从API获取和存储
|
||||
end note
|
||||
|
||||
note right of GithubApi::requestProjectDeveloperData
|
||||
调用GitHub API
|
||||
获取项目开发者数据
|
||||
end note
|
||||
|
||||
note right of GithubApi::requestRepositoryData
|
||||
调用GitHub API
|
||||
获取仓库数据
|
||||
end note
|
||||
|
||||
note right of DeveloperStatistics::calculateStatistics
|
||||
计算开发者统计信息
|
||||
包括数量和增长率
|
||||
end note
|
||||
|
||||
note right of RepositoryStatistics::calculateStatistics
|
||||
计算仓库统计信息
|
||||
包括数量和增长率
|
||||
end note
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,143 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- dateController: DateController
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ displayCommitData(commitData: List<CommitData>)
|
||||
+ displayRepositoryStarData(starData: List<RepositoryStarData>)
|
||||
}
|
||||
|
||||
class DateController <<control>> {
|
||||
- githubApi: GithubApi
|
||||
- database: DateBase
|
||||
+ getRepositoryStarData(): List<RepositoryStarData>
|
||||
+ getCommitData(): List<CommitData>
|
||||
+ storeRepositoryStarData(starData: List<RepositoryStarData>): boolean
|
||||
+ storeCommitData(commitData: List<CommitData>): boolean
|
||||
}
|
||||
|
||||
class GithubApi <<boundary>> {
|
||||
- apiKey: String
|
||||
- baseUrl: String
|
||||
+ requestRepositoryStarData(projectId: String): List<RepositoryStarData>
|
||||
+ requestCommitData(projectId: String): List<CommitData>
|
||||
+ authenticate(apiKey: String): boolean
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- repositoryStarData: List<RepositoryStarData>
|
||||
- commitData: List<CommitData>
|
||||
- projects: List<Project>
|
||||
+ storeRepositoryStarData(starData: List<RepositoryStarData>): boolean
|
||||
+ storeCommitData(commitData: List<CommitData>): boolean
|
||||
+ getRepositoryStarData(projectId: String): List<RepositoryStarData>
|
||||
+ getCommitData(projectId: String): List<CommitData>
|
||||
}
|
||||
|
||||
class RepositoryStarData <<entity>> {
|
||||
- repositoryId: String
|
||||
- starCount: int
|
||||
- stargazers: List<Stargazer>
|
||||
- starHistory: Map<Date, int>
|
||||
- date: Date
|
||||
+ getRepositoryId(): String
|
||||
+ getStarCount(): int
|
||||
+ getStargazers(): List<Stargazer>
|
||||
+ calculateStarGrowth(startDate: Date, endDate: Date): int
|
||||
}
|
||||
|
||||
class CommitData <<entity>> {
|
||||
- commitId: String
|
||||
- repositoryId: String
|
||||
- author: String
|
||||
- date: Date
|
||||
- message: String
|
||||
- filesChanged: int
|
||||
- linesAdded: int
|
||||
- linesDeleted: int
|
||||
+ getCommitId(): String
|
||||
+ getRepositoryId(): String
|
||||
+ getAuthor(): String
|
||||
+ getDate(): Date
|
||||
+ getChangeSummary(): String
|
||||
}
|
||||
|
||||
class Project <<entity>> {
|
||||
- projectId: String
|
||||
- name: String
|
||||
- repositoryUrl: String
|
||||
- description: String
|
||||
+ getProjectId(): String
|
||||
+ getName(): String
|
||||
+ getRepositoryUrl(): String
|
||||
}
|
||||
|
||||
class Stargazer <<entity>> {
|
||||
- userId: String
|
||||
- username: String
|
||||
- starredAt: Date
|
||||
+ getUserId(): String
|
||||
+ getUsername(): String
|
||||
+ getStarredAt(): Date
|
||||
}
|
||||
|
||||
class StarStatistics <<entity>> {
|
||||
- repositoryId: String
|
||||
- totalStars: int
|
||||
- starsThisMonth: int
|
||||
- starsThisYear: int
|
||||
- starGrowthRate: double
|
||||
- topStargazers: List<Stargazer>
|
||||
+ calculateStatistics(starData: List<RepositoryStarData>): void
|
||||
+ getStarGrowthRate(): double
|
||||
+ getTopStargazers(count: int): List<Stargazer>
|
||||
}
|
||||
|
||||
class CommitStatistics <<entity>> {
|
||||
- repositoryId: String
|
||||
- totalCommits: int
|
||||
- commitsThisMonth: int
|
||||
- commitsThisYear: int
|
||||
- topContributors: List<Contributor>
|
||||
- commitFrequency: Map<Date, int>
|
||||
+ calculateStatistics(commitData: List<CommitData>): void
|
||||
+ getTotalCommits(): int
|
||||
+ getTopContributors(count: int): List<Contributor>
|
||||
}
|
||||
|
||||
class Contributor <<entity>> {
|
||||
- contributorId: String
|
||||
- username: String
|
||||
- commitCount: int
|
||||
- firstCommit: Date
|
||||
- lastCommit: Date
|
||||
+ getContributorId(): String
|
||||
+ getUsername(): String
|
||||
+ getCommitCount(): int
|
||||
+ getActivityPeriod(): TimeSpan
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DateController : "调用"
|
||||
DateController --> GithubApi : "请求数据"
|
||||
DateController --> DateBase : "存储/查询"
|
||||
GithubApi ..> RepositoryStarData : "返回"
|
||||
GithubApi ..> CommitData : "返回"
|
||||
DateBase "1" *-- "many" RepositoryStarData : "存储"
|
||||
DateBase "1" *-- "many" CommitData : "存储"
|
||||
DateBase "1" *-- "many" Project : "包含"
|
||||
RepositoryStarData "1" *-- "many" Stargazer : "包含"
|
||||
StarStatistics ..> RepositoryStarData : "分析"
|
||||
CommitStatistics ..> CommitData : "分析"
|
||||
CommitStatistics "1" *-- "many" Contributor : "统计"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,102 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- codehubUI: CodehubUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToRepositoryAnalysis()
|
||||
}
|
||||
|
||||
class CodehubUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
+ showRepositoryAnalysisPage()
|
||||
+ displayRepositoryAnalysisResult(result: RepositoryAnalysisResult)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
- pylint: Pylint
|
||||
+ getRepositoryCodeData(): RepositoryAnalysisResult
|
||||
}
|
||||
|
||||
class Pylint <<control>> {
|
||||
+ analyzeRepository(codeData: RepositoryCodeData): RepositoryAnalysisResult
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- repositoryData: List<RepositoryCodeData>
|
||||
+ getRepositoryCodeData(): RepositoryCodeData
|
||||
}
|
||||
|
||||
class RepositoryCodeData <<entity>> {
|
||||
- repositoryId: String
|
||||
- repositoryName: String
|
||||
- codeFiles: List<CodeFile>
|
||||
- commitHistory: List<Commit>
|
||||
- contributors: List<Contributor>
|
||||
+ getRepositoryId(): String
|
||||
+ getRepositoryName(): String
|
||||
+ getCodeFiles(): List<CodeFile>
|
||||
+ getCommitHistory(): List<Commit>
|
||||
}
|
||||
|
||||
class RepositoryAnalysisResult <<entity>> {
|
||||
- repositoryId: String
|
||||
- repositoryName: String
|
||||
- qualityScore: double
|
||||
- activityScore: double
|
||||
- communityScore: double
|
||||
- overallScore: double
|
||||
- analysisMetrics: Map<String, Object>
|
||||
+ getOverallScore(): double
|
||||
+ getDetailedScores(): Map<String, double>
|
||||
+ generateReport(): String
|
||||
}
|
||||
|
||||
class CodeFile <<entity>> {
|
||||
- fileName: String
|
||||
- filePath: String
|
||||
- language: String
|
||||
- size: long
|
||||
- complexity: int
|
||||
+ getComplexity(): int
|
||||
+ getLanguage(): String
|
||||
}
|
||||
|
||||
class Commit <<entity>> {
|
||||
- commitId: String
|
||||
- author: String
|
||||
- date: Date
|
||||
- message: String
|
||||
- changes: int
|
||||
+ getAuthor(): String
|
||||
+ getChanges(): int
|
||||
}
|
||||
|
||||
class Contributor <<entity>> {
|
||||
- contributorId: String
|
||||
- name: String
|
||||
- commitCount: int
|
||||
+ getCommitCount(): int
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> CodehubUI : "跳转"
|
||||
CodehubUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController --> Pylint : "委托分析"
|
||||
Pylint ..> RepositoryAnalysisResult : "生成"
|
||||
DateBase "1" *-- "many" RepositoryCodeData : "包含"
|
||||
RepositoryCodeData "1" *-- "many" CodeFile : "包含"
|
||||
RepositoryCodeData "1" *-- "many" Commit : "包含"
|
||||
RepositoryCodeData "1" *-- "many" Contributor : "包含"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,76 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- developerUI: DeveloperUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToDeveloperAnalysis()
|
||||
}
|
||||
|
||||
class DeveloperUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
+ showDeveloperAnalysisPage()
|
||||
+ displayDeveloperAnalysisResult(result: DeveloperAnalysisResult)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ getDeveloperContributionData(): DeveloperAnalysisResult
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- developerData: List<DeveloperData>
|
||||
+ getDeveloperData(): DeveloperData
|
||||
}
|
||||
|
||||
class DeveloperData <<entity>> {
|
||||
- developerId: String
|
||||
- developerName: String
|
||||
- contributions: List<Contribution>
|
||||
- commitCount: int
|
||||
- codeLines: int
|
||||
+ getDeveloperId(): String
|
||||
+ getDeveloperName(): String
|
||||
+ getContributions(): List<Contribution>
|
||||
+ calculateContributionScore(): double
|
||||
}
|
||||
|
||||
class DeveloperAnalysisResult <<entity>> {
|
||||
- developerId: String
|
||||
- developerName: String
|
||||
- contributionScore: double
|
||||
- analysisDetails: Map<String, Object>
|
||||
- ranking: int
|
||||
+ getContributionScore(): double
|
||||
+ getAnalysisDetails(): Map<String, Object>
|
||||
+ getRanking(): int
|
||||
+ generateReport(): String
|
||||
}
|
||||
|
||||
class Contribution <<entity>> {
|
||||
- type: String
|
||||
- value: double
|
||||
- date: Date
|
||||
+ getType(): String
|
||||
+ getValue(): double
|
||||
+ getDate(): Date
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> DeveloperUI : "跳转"
|
||||
DeveloperUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "查询"
|
||||
AlgorithmController ..> DeveloperAnalysisResult : "生成"
|
||||
DateBase "1" *-- "many" DeveloperData : "包含"
|
||||
DeveloperData "1" *-- "many" Contribution : "包含"
|
||||
DeveloperAnalysisResult ..> DeveloperData : "基于"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
@ -0,0 +1,94 @@
|
||||
@startuml
|
||||
|
||||
skinparam class {
|
||||
BackgroundColor<<boundary>> LightSkyBlue
|
||||
BackgroundColor<<control>> LightGreen
|
||||
BackgroundColor<<entity>> Gold
|
||||
}
|
||||
|
||||
class MainUI <<boundary>> {
|
||||
- configUI: ConfigUI
|
||||
+ startPage()
|
||||
+ showMainInterface()
|
||||
+ navigateToSystemConfigPage()
|
||||
}
|
||||
|
||||
class ConfigUI <<boundary>> {
|
||||
- algorithmController: AlgorithmController
|
||||
- currentConfig: SystemConfig
|
||||
+ showSystemConfigPage()
|
||||
+ displayModificationSuccess(message: String)
|
||||
+ modifyAlgorithmParameters(params: Map<String, Object>)
|
||||
}
|
||||
|
||||
class AlgorithmController <<control>> {
|
||||
- database: DateBase
|
||||
+ modifyAlgorithmParameters(params: Map<String, Object>): boolean
|
||||
+ getCurrentConfig(): SystemConfig
|
||||
}
|
||||
|
||||
class DateBase <<entity>> {
|
||||
- systemConfig: SystemConfig
|
||||
- configHistory: List<ConfigHistory>
|
||||
+ getSystemConfig(): SystemConfig
|
||||
+ updateSystemConfig(config: SystemConfig): boolean
|
||||
+ saveConfigHistory(history: ConfigHistory): boolean
|
||||
}
|
||||
|
||||
class SystemConfig <<entity>> {
|
||||
- configId: String
|
||||
- version: String
|
||||
- parameters: Map<String, Object>
|
||||
- lastModified: Date
|
||||
- modifiedBy: String
|
||||
+ getParameter(key: String): Object
|
||||
+ setParameter(key: String, value: Object): void
|
||||
+ getAllParameters(): Map<String, Object>
|
||||
+ validateParameters(): boolean
|
||||
}
|
||||
|
||||
class ConfigHistory <<entity>> {
|
||||
- historyId: String
|
||||
- configId: String
|
||||
- oldValues: Map<String, Object>
|
||||
- newValues: Map<String, Object>
|
||||
- modifiedBy: String
|
||||
- modificationTime: Date
|
||||
+ getChangeDescription(): String
|
||||
+ rollback(): SystemConfig
|
||||
}
|
||||
|
||||
class AlgorithmParameter <<entity>> {
|
||||
- parameterName: String
|
||||
- parameterType: String
|
||||
- defaultValue: Object
|
||||
- minValue: Object
|
||||
- maxValue: Object
|
||||
- description: String
|
||||
+ validateValue(value: Object): boolean
|
||||
+ getDescription(): String
|
||||
}
|
||||
|
||||
class User <<entity>> {
|
||||
- userId: String
|
||||
- username: String
|
||||
- role: String
|
||||
- permissions: List<String>
|
||||
+ getUserId(): String
|
||||
+ getUsername(): String
|
||||
+ hasPermission(permission: String): boolean
|
||||
}
|
||||
|
||||
' 关联关系
|
||||
MainUI --> ConfigUI : "跳转"
|
||||
ConfigUI --> AlgorithmController : "调用"
|
||||
AlgorithmController --> DateBase : "更新"
|
||||
DateBase "1" *-- "1" SystemConfig : "当前配置"
|
||||
DateBase "1" *-- "many" ConfigHistory : "配置历史"
|
||||
SystemConfig "1" *-- "many" AlgorithmParameter : "包含参数"
|
||||
ConfigHistory ..> SystemConfig : "关联"
|
||||
ConfigHistory ..> User : "记录操作者"
|
||||
|
||||
|
||||
|
||||
@enduml
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue