This repository has been archived by the owner on May 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolrFile.php
122 lines (100 loc) · 3.46 KB
/
SolrFile.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
namespace SolrKDE;
require_once 'MailContentMiner.php';
class SolrFile {
private $id;
private $subject;
private $project;
private $from;
private $commitDate;
private $message;
private $bug;
private $fixesBug;
private $revision;
private $isRevision;
private $isTranslation;
private $translationLanguage;
private $projectType;
private $authorInitials;
public function setFromMail($sourceMail) {
$this->setId($sourceMail) ;
$this->setSubject($sourceMail) ;
$this->setProject($sourceMail) ;
$this->setFrom($sourceMail) ;
$this->setCommitdate($sourceMail) ;
$this->setMessage($sourceMail) ;
$this->setBug($sourceMail) ;
$this->setFixesBug($sourceMail) ;
$this->setRevision($sourceMail) ;
$this->setIsrevision($sourceMail) ;
$this->setIstranslation($sourceMail) ;
$this->setTranslationLanguage($sourceMail) ;
$this->setProjectType($sourceMail) ;
$this->setAuthorInitials($sourceMail) ;
}
public function getJson() {
$commitArray = array (
"id" => $this->id,
"subject" => $this->subject,
"project" => $this->project,
"from" => $this->from,
"date" =>$this->commitDate,
"message" => $this->message,
"bug" => $this->bug,
"fixesbug" => $this->fixesBug,
"revision" => $this->revision,
"isrevision" => $this->isRevision,
"istranslation" => $this->isTranslation,
"translationlanguage" => $this->translationLanguage,
"type" => $this->projectType,
"authorinitials" => $this->authorInitials,
);
return \json_encode($commitArray, JSON_PRETTY_PRINT,512);
}
public function getId() {
return $this->id;
}
private function setId($sourceMail) {
$this->id = MailContentMiner::getId( $sourceMail );
}
private function setProjectType($sourceMail) {
$this->projectType = MailContentMiner::getProjectType( $sourceMail );
}
private function setTranslationLanguage($sourceMail) {
$this->translationLanguage = MailContentMiner::getTranslationLanguage( $sourceMail );
}
private function setSubject($sourceMail) {
$this->subject = MailContentMiner::getSubject( $sourceMail);
}
private function setProject($sourceMail) {
$this->project = MailContentMiner::getProject ($sourceMail);
}
private function setFrom($sourceMail) {
$this->from = MailContentMiner::getFrom ($sourceMail);
}
private function setCommitdate($sourceMail) {
$this->commitDate = MailContentMiner::getCommitDate ($sourceMail);
}
private function setMessage($sourceMail) {
$this->message = MailContentMiner::getMessage($sourceMail);
}
private function setBug($sourceMail) {
$this->bug = MailContentMiner::getBug($sourceMail);
}
private function setFixesBug($sourceMail) {
$this->fixesBug = MailContentMiner::getFixesBug($sourceMail);
}
private function setRevision($sourceMail) {
$this->revision = MailContentMiner::getRevision($sourceMail);
}
private function setIsrevision($sourceMail) {
$this->isRevision= MailContentMiner::getIsRevision($sourceMail);
}
private function setIstranslation($sourceMail) {
$this->isTranslation = MailContentMiner::getIstranslation($sourceMail);
}
private function setAuthorInitials($sourceMail) {
$this->authorInitials = MailContentMiner::getAuthorInitials($sourceMail);
}
}
?>