-
Notifications
You must be signed in to change notification settings - Fork 17
/
swordappstatemententry.php
70 lines (54 loc) · 1.86 KB
/
swordappstatemententry.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
<?php
class SWORDAppStatementEntry {
// The scheme of the entry
public $sac_scheme;
// The term of the entry
public $sac_term;
// The label for the entry
public $sac_label;
// The content type
public $sac_content_type;
// The content source
public $sac_content_source;
// The packaging format used
public $sac_packaging;
// When it was deposited
public $sac_deposited_on;
// Who deposited it
public $sac_deposited_by;
// Construct a new statement atom entry
function __construct($sac_scheme, $sac_term, $sac_label) {
$this->sac_scheme = $sac_scheme;
$this->sac_term = $sac_term;
$this->sac_label = $sac_label;
}
// Set the content type and source
function addContent($sac_type, $sac_src) {
$this->sac_content_type = $sac_type;
$this->sac_content_source = $sac_src;
}
// Set the packaging
function setPackaging($sac_packaging) {
$this->sac_packaging = $sac_packaging;
}
// Set the deposited date
function setDepositedOn($sac_deposited_on) {
$this->sac_deposited_on = $sac_deposited_on;
}
// Set the deposited by
function setDepositedBy($sac_deposited_by) {
$this->sac_deposited_by = $sac_deposited_by;
}
// Print out a representation of the statement
function toString() {
print " - Entry:\n";
print " - Scheme: " . $this->sac_scheme . "\n";
print " - Term: " . $this->sac_term . "\n";
print " - Label: " . $this->sac_label . "\n";
print " - Content: Type=" . $this->sac_content_type . " Source=" . $this->sac_content_source . "\n";
print " - Packaging: " . $this->sac_packaging . "\n";
print " - Deposited On: " . $this->sac_deposited_on . "\n";
print " - Deposited By: " . $this->sac_deposited_by . "\n";
}
}
?>