Revision 42928 trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.symbology/org.gvsig.symbology.lib/org.gvsig.symbology.lib.impl/src/test/java/org/gvsig/symbology/fmap/mapcontext/rendering/legend/TestIClassifiedLegend.java

View differences:

TestIClassifiedLegend.java
40 40
import org.gvsig.fmap.dal.DataStoreParameters;
41 41
import org.gvsig.fmap.dal.exception.DataException;
42 42
import org.gvsig.fmap.dal.exception.ReadException;
43
import org.gvsig.fmap.dal.feature.DummyFetureStore;
43 44
import org.gvsig.fmap.dal.feature.EditableFeature;
44 45
import org.gvsig.fmap.dal.feature.EditableFeatureType;
45 46
import org.gvsig.fmap.dal.feature.Feature;
......
127 128
	// private static final Value v9 = (Value)ValueFactory.createValue(9);
128 129

  
129 130
	private AbstractIntervalLegend[] intervalLegends;
130
//	private MockDataSource mockDataSource = new MockDataSource();
131
	//private DummyFetureStore mockDataSource = new DummyFetureStore();
131 132

  
132
	/**
133
	 * To avoid duplicated validation logic in the test a mock object is created
134
	 * to use a DataSource for this test.
135
	 *
136
	 */
137
	private class MockDataSource implements FeatureStore {
138 133

  
139
		public boolean allowWrite() {
140

  
141
			return false;
142
		}
143

  
144
		public void beginEditingGroup(String description)
145
				throws NeedEditingModeException {
146

  
147

  
148
		}
149

  
150
		public boolean canWriteGeometry(int gvSIGgeometryType)
151
				throws DataException {
152

  
153
			return false;
154
		}
155

  
156
		public void cancelEditing() throws DataException {
157

  
158

  
159
		}
160

  
161
		public FeatureSelection createFeatureSelection() throws DataException {
162

  
163
			return null;
164
		}
165

  
166
		public FeatureIndex createIndex(FeatureType featureType,
167
				String attributeName, String indexName) throws DataException {
168

  
169
			return null;
170
		}
171

  
172
		public EditableFeature createNewFeature() throws DataException {
173

  
174
			return null;
175
		}
176

  
177
		public EditableFeature createNewFeature(FeatureType type,
178
				Feature defaultValues) throws DataException {
179

  
180
			return null;
181
		}
182

  
183
		public EditableFeature createNewFeature(FeatureType type,
184
				boolean defaultValues) throws DataException {
185

  
186
			return null;
187
		}
188

  
189
		public EditableFeature createNewFeature(boolean defaultValues)
190
				throws DataException {
191

  
192
			return null;
193
		}
194

  
195
		public void delete(Feature feature) throws DataException {
196

  
197

  
198
		}
199

  
200
		public void edit() throws DataException {
201

  
202

  
203
		}
204

  
205
		public void edit(int mode) throws DataException {
206

  
207

  
208
		}
209

  
210
		public void endEditingGroup() throws NeedEditingModeException {
211

  
212

  
213
		}
214

  
215
		public void finishEditing() throws DataException {
216

  
217

  
218
		}
219

  
220
		public FeatureType getDefaultFeatureType() throws DataException {
221

  
222
			return null;
223
		}
224

  
225
		public Envelope getEnvelope() {
226

  
227
			return null;
228
		}
229

  
230
		public Feature getFeatureByReference(FeatureReference reference)
231
				throws DataException {
232

  
233
			return null;
234
		}
235

  
236
		public Feature getFeatureByReference(FeatureReference reference,
237
				FeatureType featureType) throws DataException {
238

  
239
			return null;
240
		}
241

  
242
		public FeatureSelection getFeatureSelection() throws DataException {
243

  
244
			return null;
245
		}
246

  
247
		public FeatureSet getFeatureSet() throws DataException {
248

  
249
			return null;
250
		}
251

  
252
		public FeatureSet getFeatureSet(FeatureQuery featureQuery)
253
				throws DataException {
254

  
255
			return null;
256
		}
257

  
258
		public void getFeatureSet(FeatureQuery featureQuery, Observer observer)
259
				throws DataException {
260

  
261

  
262
		}
263

  
264
		public void getFeatureSet(Observer observer) throws DataException {
265

  
266

  
267
		}
268

  
269
		public List getFeatureTypes() throws DataException {
270

  
271
			return null;
272
		}
273

  
274
		public FeatureIndexes getIndexes() {
275

  
276
			return null;
277
		}
278

  
279
		public FeatureLocks getLocks() throws DataException {
280

  
281
			return null;
282
		}
283

  
284
		public DataStoreParameters getParameters() {
285

  
286
			return null;
287
		}
288

  
289
		public IProjection getSRSDefaultGeometry() throws DataException {
290

  
291
			return null;
292
		}
293

  
294
		public FeatureStoreTransforms getTransforms() {
295

  
296
			return null;
297
		}
298

  
299
		public void insert(EditableFeature feature) throws DataException {
300

  
301

  
302
		}
303

  
304
		public boolean isAppendModeSupported() {
305

  
306
			return false;
307
		}
308

  
309
		public boolean isAppending() {
310

  
311
			return false;
312
		}
313

  
314
		public boolean isEditing() {
315

  
316
			return false;
317
		}
318

  
319
		public boolean isLocksSupported() {
320

  
321
			return false;
322
		}
323

  
324
		public void setSelection(FeatureSet selection) throws DataException {
325

  
326

  
327
		}
328

  
329
		public void update(EditableFeatureType featureType)
330
				throws DataException {
331

  
332

  
333
		}
334

  
335
		public void update(EditableFeature feature) throws DataException {
336

  
337

  
338
		}
339

  
340
		public void validateFeatures(int mode) throws DataException {
341

  
342

  
343
		}
344

  
345
		public DataSet createSelection() throws DataException {
346

  
347
			return null;
348
		}
349

  
350
		public void dispose() {
351

  
352

  
353
		}
354

  
355
		public Iterator getChildren() {
356

  
357
			return null;
358
		}
359

  
360
		public DataSet getDataSet() throws DataException {
361

  
362
			return null;
363
		}
364

  
365
		public DataSet getDataSet(DataQuery dataQuery) throws DataException {
366

  
367
			return null;
368
		}
369

  
370
		public void getDataSet(Observer observer) throws DataException {
371

  
372

  
373
		}
374

  
375
		public void getDataSet(DataQuery dataQuery, Observer observer)
376
				throws DataException {
377

  
378

  
379
		}
380

  
381
		public DataServerExplorer getExplorer() throws DataException {
382

  
383
			return null;
384
		}
385

  
386
		public String getName() {
387

  
388
			return null;
389
		}
390

  
391
		public DataSet getSelection() throws DataException {
392

  
393
			return null;
394
		}
395

  
396
		public void refresh() throws DataException {
397

  
398

  
399
		}
400

  
401
		public void setSelection(DataSet selection) throws DataException {
402

  
403

  
404
		}
405

  
406
		public void beginComplexNotification() {
407

  
408

  
409
		}
410

  
411
		public void disableNotifications() {
412

  
413

  
414
		}
415

  
416
		public void enableNotifications() {
417

  
418

  
419
		}
420

  
421
		public void endComplexNotification() {
422

  
423

  
424
		}
425

  
426
		public void addObserver(Observer o) {
427

  
428

  
429
		}
430

  
431
		public void deleteObserver(Observer o) {
432

  
433

  
434
		}
435

  
436
		public void deleteObservers() {
437

  
438

  
439
		}
440

  
441
		public void saveToState(PersistentState state)
442
				throws PersistenceException {
443

  
444

  
445
		}
446

  
447
		public void loadFromState(PersistentState state) throws PersistenceException {
448

  
449

  
450
		}
451

  
452
		public FeatureQuery createFeatureQuery() {
453

  
454
			return null;
455
		}
456

  
457
		public boolean canRedo() {
458

  
459
			return false;
460
		}
461

  
462
		public boolean canUndo() {
463

  
464
			return false;
465
		}
466

  
467
		public List getRedoInfos() {
468

  
469
			return null;
470
		}
471

  
472
		public List getUndoInfos() {
473

  
474
			return null;
475
		}
476

  
477
		public void redo() throws RedoException {
478

  
479

  
480
		}
481

  
482
		public void redo(int num) throws RedoException {
483

  
484

  
485
		}
486

  
487
		public void undo() throws UndoException {
488

  
489

  
490
		}
491

  
492
		public void undo(int num) throws UndoException {
493

  
494

  
495
		}
496

  
497
		public FeatureIndex createIndex(FeatureType featureType,
498
				String attributeName, String indexName, Observer observer)
499
				throws DataException {
500

  
501
			return null;
502
		}
503

  
504
		public Object getMetadataID() {
505

  
506
			return null;
507
		}
508

  
509
		public void delegate(DynObject dynObject) {
510

  
511

  
512
		}
513

  
514
		public DynClass getDynClass() {
515

  
516
			return null;
517
		}
518

  
519
		public Object getDynValue(String name) throws DynFieldNotFoundException {
520

  
521
			return null;
522
		}
523

  
524
		public boolean hasDynValue(String name) {
525

  
526
			return false;
527
		}
528

  
529
		public void implement(DynClass dynClass) {
530

  
531

  
532
		}
533

  
534
		public Object invokeDynMethod(String name, DynObject context)
535
				throws DynMethodException {
536

  
537
			return null;
538
		}
539

  
540
		public Object invokeDynMethod(int code, DynObject context)
541
				throws DynMethodException {
542

  
543
			return null;
544
		}
545

  
546
		public void setDynValue(String name, Object value)
547
				throws DynFieldNotFoundException {
548

  
549

  
550
		}
551

  
552
		/*
553
		 * (non-Javadoc)
554
		 *
555
		 * @see org.gvsig.metadata.Metadata#getMetadataChildren()
556
		 */
557
		public Set getMetadataChildren() {
558

  
559
			return null;
560
		}
561

  
562
		/*
563
		 * (non-Javadoc)
564
		 *
565
		 * @see org.gvsig.metadata.Metadata#getMetadataName()
566
		 */
567
		public String getMetadataName() {
568

  
569
			return null;
570
		}
571

  
572
		public FeatureType getFeatureType(String featureTypeId)
573
				throws DataException {
574

  
575
			return null;
576
		}
577

  
578
		public DataQuery createQuery() {
579

  
580
			return null;
581
		}
582

  
583
		public long getFeatureCount() throws DataException {
584

  
585
			return 0;
586
		}
587

  
588
		public void accept(Visitor visitor, DataQuery dataQuery)
589
				throws BaseException {
590
		}
591

  
592
		public void accept(Visitor visitor) throws BaseException {
593
		}
594

  
595
		public void createCache(String name,
596
				DynObject parameters) throws DataException {
597
			// Do nothing
598
		}
599

  
600
		public FeatureCache getCache() {
601
			return null;
602
		}
603

  
604
		public void clear() {
605
			// Nothing to do
606
		}
607

  
608
		public void export(DataServerExplorer explorer, String provider,
609
				NewFeatureStoreParameters params) throws DataException {
610

  
611
		}
612

  
613
		public String getProviderName() {
614
			return null;
615
		}
616

  
617
		public String getFullName() {
618
			// TODO Auto-generated method stub
619
			return null;
620
		}
621

  
622
        public boolean isKnownEnvelope() {
623
            // TODO Auto-generated method stub
624
            return false;
625
        }
626

  
627
        public boolean hasRetrievedFeaturesLimit() {
628
            // TODO Auto-generated method stub
629
            return false;
630
        }
631

  
632
        public int getRetrievedFeaturesLimit() {
633
            // TODO Auto-generated method stub
634
            return 0;
635
        }
636

  
637
        public FeatureIndex createIndex(String indexTypeName,
638
            FeatureType featureType, String attributeName, String indexName)
639
            throws DataException {
640
            // TODO Auto-generated method stub
641
            return null;
642
        }
643

  
644
        public FeatureIndex createIndex(String indexTypeName,
645
            FeatureType featureType, String attributeName, String indexName,
646
            Observer observer) throws DataException {
647
            // TODO Auto-generated method stub
648
            return null;
649
        }
650

  
651
        public Interval getInterval() {
652
            // TODO Auto-generated method stub
653
            return null;
654
        }
655

  
656
        public Collection getTimes() {
657
            // TODO Auto-generated method stub
658
            return null;
659
        }
660

  
661
        public Collection getTimes(Interval interval) {
662
            // TODO Auto-generated method stub
663
            return null;
664
        }
665

  
666
        public Object clone() throws CloneNotSupportedException {
667
            // TODO Auto-generated method stub
668
            return super.clone();
669
        }
670

  
671
        /* (non-Javadoc)
672
         * @see org.gvsig.fmap.dal.feature.FeatureStore#commitChanges()
673
         */
674
        public void commitChanges() throws DataException {
675
            // TODO Auto-generated method stub
676

  
677
        }
678

  
679
        /* (non-Javadoc)
680
         * @see org.gvsig.fmap.dal.feature.FeatureStore#canCommitChanges()
681
         */
682
        public boolean canCommitChanges() throws DataException {
683
            // TODO Auto-generated method stub
684
            return false;
685
        }
686

  
687
        public Feature getFeature(DynObject dynobject) {
688
            // TODO Auto-generated method stub
689
            return null;
690
        }
691

  
692
        @Override
693
        public EditableFeature createNewFeature(Feature defaultValues) throws DataException {
694
            throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
695
        }
696

  
697
        @Override
698
        public Iterator iterator() {
699
            throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
700
        }
701

  
702
	}
703

  
704 134
	//private static final FInterval interval0=new FInterval(0,2);
705 135
	//private static final FInterval interval1=new FInterval(3,5);
706 136
	//private static final FInterval interval2=new FInterval(6,2);

Also available in: Unified diff