1 package rydeen.utils;
2
3 import java.io.Serializable;
4
5
6
7
8
9
10
11
12 public class Provider implements Serializable{
13 private static final long serialVersionUID = 8577013159346892136L;
14
15
16
17
18 public static final Provider RYDEEN_PROVIDER = new Provider(
19 "Rydeen Provider",
20 new Author[] { new Author("Haruaki Tamada", "tama3@users.sourceforge.jp"), }
21 );
22
23
24
25 public static final Provider UNKNOWN = new Provider("unknown");
26
27 private String name;
28 private Author[] authors;
29 private Organization org;
30
31
32
33
34
35
36 public Provider(String name){
37 this(name, null, null);
38 }
39
40
41
42
43
44
45 public Provider(String name, Author[] authors){
46 this(name, authors, null);
47 }
48
49
50
51
52
53
54 public Provider(String name, Organization org){
55 this(name, null, org);
56 }
57
58
59
60
61
62
63 public Provider(String name, Author[] initAuthors, Organization org){
64 if(name == null){
65 throw new NullPointerException();
66 }
67 this.name = name;
68 this.org = org;
69 if(initAuthors != null && initAuthors.length != 0){
70 authors = new Author[initAuthors.length];
71 System.arraycopy(initAuthors, 0, authors, 0, authors.length);
72 }
73 else{
74 authors = new Author[0];
75 }
76 }
77
78
79
80
81
82 public Author[] getAuthors(){
83 Author[] newAuthors = new Author[authors.length];
84 System.arraycopy(authors, 0, newAuthors, 0, authors.length);
85 return newAuthors;
86 }
87
88
89
90
91
92 public Organization getOrganization(){
93 return org;
94 }
95
96
97
98
99 public String getName(){
100 return name;
101 }
102 }