root/tools/routingservice/trunk/src/jp/co/orkney/restlet/util/Provider.java

Revision 164, 2.5 KB (checked in by anton, 3 years ago)

Distance limitation added

Line 
1package jp.co.orkney.restlet.util;
2
3/**
4 * Copyright (c) 2008 Orkney, Inc. <http://www.orkney.co.jp/>
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20
21import java.util.Vector;
22
23/**
24 * <b>Provider is a class which represents a provider.</b>
25 * <p>
26 * A provider is characterized by the following information:
27 * <ul>
28 * <li>A name</li>
29 * <li>A vector containing its services</li>
30 * </ul>
31 * </p>
32 *
33 * @author Matthieu Bilbille - Orkney Inc.
34 * @version 1.0
35 * @see Service
36 */
37public class Provider
38{
39        private String name;
40        private Vector<Service> services;
41       
42        private Service authService;
43
44        /**
45         * Constructor Provider.
46         * <p>1
47         * Creates a new provider with empty data (name,services)
48         * </p>
49         */
50        public Provider()
51        {
52                name = "";
53                services = new Vector<Service>();
54        }
55
56        /**
57         * Gets the name of the provider
58         *
59         * @return this provider's name
60         */
61        public String getName()
62        {
63                return name;
64        }
65
66        /**
67         * Sets the name of the provider to the specified string.
68         *
69         * @param name
70         *            the string that is to be this provider's name
71         */
72        public void setName(String name)
73        {
74                this.name = name;
75        }
76
77        /**
78         * Gets the services of the provider
79         *
80         * @return this provider's services
81         * @see Service
82         */
83        public Vector<Service> getServices()
84        {
85                return services;
86        }
87
88        /**
89         * Sets the services of the provider to the specified vector<Service>.
90         *
91         * @param services
92         *            the vector<Service> that is to be this provider's services
93         */
94        public void setServices(Vector<Service> services)
95        {
96                this.services = services;
97        }
98       
99        /**
100         * Gets the authentication service of the provider
101         *
102         * @return this provider's services
103         * @see Service
104         */
105        public Service getAuthService()
106        {
107                return authService;
108        }
109
110        /**
111         * Sets the authentication service of the provider.
112         *
113         * @param services
114         *            the vector<Service> that is to be this provider's services
115         */
116        public void setAuthService(Service service)
117        {
118                this.authService = service;
119        }       
120}
Note: See TracBrowser for help on using the browser.