Project

General

Profile

1
function NodeType(name, color, shape) {
2
	this.getName = function () {
3
		return name;
4
	}
5

    
6
	this.getColor = function () {
7
		return color;
8
	}
9

    
10
	this.getShape = function () {
11
		return shape;
12
	}
13
}
14

    
15
function EdgeType(name, color, width) {
16
	this.getName = function () {
17
		return name;
18
	}
19

    
20
	this.getColor = function () {
21
		return color;
22
	}
23

    
24
	this.getWidth = function () {
25
		return width;
26
	}
27
}
28

    
29
function Node(type, label, image, tooltip, url) {
30
	this.getType = function () {
31
		return type;
32
	}
33

    
34
	this.getLabel = function () {
35
		return label;
36
	};
37

    
38
	this.getImage = function () {
39
		return image;
40
	}
41

    
42
	this.getTooltip = function () {
43
		return tooltip;
44
	};
45

    
46
	this.getUrl = function () {
47
		return url;
48
	};
49
}
50

    
51
function Edge(from, to, type, label) {
52
	this.getFrom = function () {
53
		return from;
54
	};
55

    
56
	this.getTo = function () {
57
		return to;
58
	};
59

    
60
	this.getType = function () {
61
		return type;
62
	};
63

    
64
	this.getLabel = function () {
65
		return label;
66
	};
67
}
68

    
69
var nodes = [
70
		new Node(
71
			NodeType.ENHANCED_PUBLICATION,
72
			null,
73
			'http://vatopedi.di.uoa.gr:8080/space-invader/space-invader.png',
74
			'Enhanced Publication',
75
			'http://www.google.com/'
76
		),
77
		new Node(
78
			NodeType.E_PRINT,
79
			null,
80
			'http://i278.photobucket.com/albums/kk87/bigtruckskeepmoving/Hello/CopyofHELLO22.jpg',
81
			'E-print',
82
			null
83
		),
84
		new Node(
85
			NodeType.COMPOUND_OBJECT,
86
			'<font face="Verdana" size="8" color="#ff0000">Compound<br />Object</font>',
87
			null,
88
			'Compound Object',
89
			null
90
		),
91
		new Node(
92
			NodeType.NON_E_PRINT,
93
			'<font face="Arial" size="8" color="#00ff00">Non-E-print</font>',
94
			null,
95
			'Non-E-print',
96
			null
97
		),
98
		new Node(
99
			NodeType.RESEARCH_DATA,
100
			'<font face="Tahoma" size="8" color="#0000ff">Research<br />Data</font>',
101
			null,
102
			'Research Data',
103
			null
104
		),
105
		new Node(
106
			NodeType.UNKNOWN,
107
			'<font face="Courier" size="8" color="#000000">Unknown</font>',
108
			null,
109
			'Unknown',
110
			null
111
		)
112
	];
113

    
114
var edges = [
115
		new Edge(
116
			0,
117
			1,
118
			EdgeType.E_PRINT_EDGE,
119
			'<font face="Verdana" size="8" color="#000000">has E-print</font>'
120
		),
121
		new Edge(
122
			0,
123
			2,
124
			EdgeType.NORMAL_EDGE,
125
			'<font face="Verdana" size="8" color="#000000">has Compound Object</font>'
126
		),
127
		new Edge(
128
			2,
129
			3,
130
			EdgeType.NORMAL_EDGE,
131
			'<font face="Verdana" size="8" color="#000000">has Non-E-print</font>'
132
		),
133
		new Edge(
134
			0,
135
			4,
136
			EdgeType.NORMAL_EDGE,
137
			'<font face="Verdana" size="8" color="#000000">has Research Data</font>'
138
		),
139
		new Edge(
140
			2,
141
			5,
142
			EdgeType.NORMAL_EDGE,
143
			'<font face="Verdana" size="8" color="#000000">has Unknown</font>'
144
		)
145
	];
(1-1/5)