forked from processing-js/processing-js
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathXMLAttribute.js
More file actions
executable file
·80 lines (77 loc) · 2.02 KB
/
Copy pathXMLAttribute.js
File metadata and controls
executable file
·80 lines (77 loc) · 2.02 KB
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
/**
* XMLAttribute is an attribute of a XML element.
*
* @param {String} fname the full name of the attribute
* @param {String} n the short name of the attribute
* @param {String} namespace the namespace URI of the attribute
* @param {String} v the value of the attribute
* @param {String }t the type of the attribute
*
* @see XMLElement
*/
module.exports = function() {
var XMLAttribute = function (fname, n, nameSpace, v, t){
this.fullName = fname || "";
this.name = n || "";
this.namespace = nameSpace || "";
this.value = v;
this.type = t;
};
XMLAttribute.prototype = {
/**
* @member XMLAttribute
* The getName() function returns the short name of the attribute
*
* @return {String} the short name of the attribute
*/
getName: function() {
return this.name;
},
/**
* @member XMLAttribute
* The getFullName() function returns the full name of the attribute
*
* @return {String} the full name of the attribute
*/
getFullName: function() {
return this.fullName;
},
/**
* @member XMLAttribute
* The getNamespace() function returns the namespace of the attribute
*
* @return {String} the namespace of the attribute
*/
getNamespace: function() {
return this.namespace;
},
/**
* @member XMLAttribute
* The getValue() function returns the value of the attribute
*
* @return {String} the value of the attribute
*/
getValue: function() {
return this.value;
},
/**
* @member XMLAttribute
* The getValue() function returns the type of the attribute
*
* @return {String} the type of the attribute
*/
getType: function() {
return this.type;
},
/**
* @member XMLAttribute
* The setValue() function sets the value of the attribute
*
* @param {String} newval the new value
*/
setValue: function(newval) {
this.value = newval;
}
};
return XMLAttribute;
};