View Javadoc

1   /*
2   Copyright 2011-2014 AGH-UST, http://www.agh.edu.pl
3   Faculty of Computer Science, Electronics and Telecommunications
4   Department of Computer Science 
5   
6   See the NOTICE file distributed with this work for additional
7   information regarding copyright ownership
8   
9   Licensed under the Apache License, Version 2.0 (the "License");
10  you may not use this file except in compliance with the License.
11  You may obtain a copy of the License at
12  
13    http://www.apache.org/licenses/LICENSE-2.0
14  
15  Unless required by applicable law or agreed to in writing, software
16  distributed under the License is distributed on an "AS IS" BASIS,
17  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  See the License for the specific language governing permissions and
19  limitations under the License.
20  */
21  package org.universAAL.ri.gateway.eimanager.impl.importing;
22  
23  import java.io.Serializable;
24  import java.util.Arrays;
25  
26  import org.universAAL.ri.gateway.eimanager.impl.BusMemberType;
27  
28  public class ImportRequest implements Serializable {
29      /**
30       * 
31       */
32      private static final long serialVersionUID = -5069608110720753063L;
33      /**
34       * 
35       */
36      private String member;
37      private String id;
38  
39      /**
40       * Service import fields
41       */
42      private String serviceType;
43      private String serverNamespace;
44  
45      /**
46       * Context import fields
47       */
48      private String[] subjectURI;
49      private String[] cpe;
50      
51      private String modalityRegex;
52  
53      public ImportRequest(final BusMemberType member, final String id) {
54  	super();
55  	this.member = member.toString();
56  	this.id = id;
57      }
58  
59      public String getMember() {
60  	return member;
61      }
62  
63      public void setMember(final String member) {
64  	this.member = member;
65      }
66  
67      public String getId() {
68  	return id;
69      }
70  
71      public void setId(final String id) {
72  	this.id = id;
73      }
74  
75      public String getServiceType() {
76  	return serviceType;
77      }
78  
79      public void setServiceType(final String serviceType) {
80  	this.serviceType = serviceType;
81      }
82  
83      public String getServerNamespace() {
84  	return serverNamespace;
85      }
86  
87      public void setServerNamespace(final String serverNamespace) {
88  	this.serverNamespace = serverNamespace;
89      }
90  
91      public String[] getCpe() {
92  	return cpe;
93      }
94  
95      public void setCpe(final String[] cpe) {
96  	this.cpe = cpe;
97      }
98  
99      @Override
100     public String toString() {
101 	return "ImportRequest ["
102 		+ (cpe != null ? "cpe=" + Arrays.toString(cpe) + ", " : "")
103 		+ (id != null ? "id=" + id + ", " : "")
104 		+ (member != null ? "member=" + member + ", " : "")
105 		+ (serverNamespace != null ? "serverNamespace="
106 			+ serverNamespace + ", " : "")
107 		+ (serviceType != null ? "serviceType=" + serviceType : "")
108 		+ (modalityRegex != null ? "modalityRegex=" + modalityRegex: "")
109 		+ "]";
110     }
111 
112 	public String[] getSubjectURIs() {
113 		return subjectURI;
114 	}
115 
116 	public void setSubjectURIs(String[] subjectURI) {
117 		this.subjectURI = subjectURI;
118 	}
119 
120 	public String getModalityRegex() {
121 		return modalityRegex;
122 	}
123 
124 	public void setModalityRegex(String modalityRegex) {
125 		this.modalityRegex = modalityRegex;
126 	}
127 
128 }