Subversion Repositories eFlore/Archives.cel-v2

Rev

Rev 12 | Rev 18 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 12 Rev 16
Line 89... Line 89...
89
			if(image.get(key).isString() != null)
89
			if(image.get(key).isString() != null)
90
			{
90
			{
91
				String valeur = image.get(key).isString().stringValue() ;
91
				String valeur = image.get(key).isString().stringValue() ;
92
				this.put(key, valeur) ;
92
				this.put(key, valeur) ;
93
			}
93
			}
-
 
94
			else
-
 
95
			{
-
 
96
				String valeur = " " ;
-
 
97
				this.put(key, valeur) ;
-
 
98
			}
Line 94... Line 99...
94
			
99
			
Line 95... Line 100...
95
		}
100
		}
Line -... Line 101...
-
 
101
 
-
 
102
	}
-
 
103
	
-
 
104
	public String toString()
-
 
105
	{
-
 
106
		String valeur = " ";
-
 
107
		
-
 
108
		for (Iterator iterator = this.keySet().iterator(); iterator.hasNext();) {
-
 
109
			
-
 
110
			
-
 
111
			String key = (String) iterator.next();
-
 
112
			if(this.get(key) != null)
-
 
113
			{
-
 
114
				valeur += "cle : "+key+" valeur :"+(String)this.get(key)+"\n" ;
-
 
115
			}
-
 
116
			
-
 
117
		}
-
 
118
		
96
 
119
		return valeur ;
97
	}
120
	}
98
	
121
	
99
	public String renvoyerValeurCorrecte(String cle)
122
	public String renvoyerValeurCorrecte(String cle)
100
	{
123
	{
Line 122... Line 145...
122
		return renvoyerValeurCorrecte("ci_ordre") ;
145
		return renvoyerValeurCorrecte("ci_ordre") ;
123
	}
146
	}
Line 124... Line 147...
124
	
147
	
125
	public String getBaseUrl()
148
	public String getBaseUrl()
126
	{
149
	{
127
		return "http://localhost/Documents/images_serveur/" ;
150
		return "http://162.38.234.9/Documents/images_serveur/" ;
Line 128... Line 151...
128
	}
151
	}
Line 129... Line 152...
129
 
152
 
Line 164... Line 187...
164
 
187
 
Line 165... Line 188...
165
	public String getModel() {
188
	public String getModel() {
166
		
189
		
-
 
190
		return renvoyerValeurCorrecte("ci_meta_model") ;
-
 
191
	}
-
 
192
	
-
 
193
	public String[][] getMetadonnesIptc() {
-
 
194
		
-
 
195
		String[][] metaIptc = new String[12][2] ;
-
 
196
		int elem = 0 ;
-
 
197
		
-
 
198
		for (Iterator it = this.keySet().iterator(); it.hasNext();) 
-
 
199
		{
-
 
200
						
-
 
201
			String key = (String)it.next();
-
 
202
			
-
 
203
				// on filtre le "ci"
-
 
204
				String type[] = key.split("_",3) ;
-
 
205
				
-
 
206
				
-
 
207
				// si c'est une metadonnee exif ou iptc
-
 
208
				if(type[1].equals("meta"))
-
 
209
				{
-
 
210
					String[] genre =  type[2].split("_",2) ;
-
 
211
					if(genre[0].equals("iptc"))
-
 
212
					{
-
 
213
						String nom = genre[1] ;
-
 
214
						metaIptc[elem][0] = nom ;
-
 
215
						metaIptc[elem][1] = renvoyerValeurCorrecte(key) ;
-
 
216
						elem++ ;	
-
 
217
					}
-
 
218
					
-
 
219
				}	
-
 
220
							    	
-
 
221
		}
-
 
222
		
-
 
223
		return metaIptc ;
-
 
224
	}
-
 
225
	
-
 
226
	public Object[][] getMetadonnesExif() {
-
 
227
		
-
 
228
		String[][] metaExif = new String[31][2] ;
-
 
229
		int elem = 0 ;
-
 
230
		
-
 
231
		for (Iterator it = this.keySet().iterator(); it.hasNext();) 
-
 
232
		{
-
 
233
						
-
 
234
			String key = (String)it.next();
-
 
235
			
-
 
236
				// on filtre le "ci"
-
 
237
				String type[] = key.split("_",3) ;
-
 
238
				
-
 
239
				
-
 
240
				// si c'est une metadonnee exif ou iptc
-
 
241
				if(type[1].equals("meta"))
-
 
242
				{
-
 
243
					String[] genre =  type[2].split("_",2) ;
-
 
244
					if(genre[0].equals("exif"))
-
 
245
					{
-
 
246
						String nom = genre[1] ;
-
 
247
						metaExif[elem][0] = nom ;
-
 
248
						metaExif[elem][1] = renvoyerValeurCorrecte(key) ;
-
 
249
						elem++ ;	
-
 
250
					}
-
 
251
					
-
 
252
				}	
-
 
253
							    	
-
 
254
		}
-
 
255
		
-
 
256
		return metaExif ;
167
		return renvoyerValeurCorrecte("ci_meta_model") ;
257