![]() |
|||
DimensionSubsetListImpl.javaGo to the documentation of this file.00001 /* 00002 * DimensionSubsetListImpl.java 00003 * 00004 * Copyright (C) 2003 Alain MENSEGUEN 00005 * www.net2map.org 00006 * 00007 * This program is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU General Public License 00009 * as published by the Free Software Foundation; either version 2 00010 * of the License, or (at your option) any later version. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00020 */ 00021 package org.net2map.pov.server; 00022 00023 import java.util.*; 00024 import java.rmi.*; 00025 import java.rmi.server.*; 00026 00028 public class DimensionSubsetListImpl extends UnicastRemoteObject implements org.net2map.pov.server.DimensionSubsetList 00029 { 00031 public DimensionSubsetListImpl(ParameterSet params, DatabaseConnection con) throws RemoteException 00032 { 00033 pParameters = params; 00034 cConnection = con; 00035 } 00036 00037 private LinkedList colSubsets = new LinkedList(); 00038 00042 public void addSubset(DimensionSubset s) 00043 { 00044 s.setOrderNb( colSubsets.size() + 1 ); 00045 colSubsets.add( s ); 00046 } 00047 00052 public DimensionSubset getSubset( int n ) 00053 { 00054 return (DimensionSubset)colSubsets.get( n ); 00055 } 00056 00060 public long count() 00061 { 00062 return colSubsets.size(); 00063 } 00064 00068 public void removeSubset( int n ) 00069 { 00070 colSubsets.remove( n ); 00071 } 00072 00078 public void addDimensionDate(long from, long to) throws RemoteException 00079 { 00080 DimensionSubsetDate dDimension = new DimensionSubsetDate( from, to, pParameters ); 00081 this.addSubset( dDimension ); 00082 } 00083 00089 public void addDimensionRank(double from, double to) throws RemoteException 00090 { 00091 DimensionSubsetRank dDimension = new DimensionSubsetRank( from, to, pParameters ); 00092 this.addSubset( dDimension ); 00093 } 00094 00099 public void addDimensionWord(String expression) throws RemoteException 00100 { 00101 if (wStopwords == null) 00102 { 00103 wStopwords = new WordList( pParameters ); 00104 } 00105 00106 if (pAffixes == null) 00107 { 00108 pAffixes = new AffixList( pParameters ); 00109 pAffixes.load( cConnection ); 00110 } 00111 00112 DimensionSubsetWord dDimension = new DimensionSubsetWord( expression, 00113 pParameters, 00114 cConnection, 00115 wStopwords, 00116 pAffixes ); 00117 this.addSubset( dDimension ); 00118 } 00119 00120 public void addDimensionExtension(String extensions) throws RemoteException 00121 { 00122 DimensionSubsetExtension dDimension = new DimensionSubsetExtension( extensions, pParameters ); 00123 this.addSubset( dDimension ); 00124 } 00125 00126 private ParameterSet pParameters; 00127 private DatabaseConnection cConnection; 00128 private WordList wStopwords; 00129 private AffixList pAffixes; 00130 } |
|||
|
Accueil | Téléchargement | Manuel
| Doc. technique | Sources CVS |
Faq | Nous contacter
©2003 - All Rights Reserved |
|||