Changeset 2551
- Timestamp:
- 10/28/08 17:17:28 (2 months ago)
- Files:
-
- trunk/plugins/analysis/edu.iu.nwb.analysis.extractdirectednetfromtable/src/edu/iu/nwb/analysis/extractdirectednetfromtable/algorithms/ExtractDirectedNetworkAlgorithm.java (modified) (2 diffs)
- trunk/plugins/analysis/edu.iu.nwb.analysis.extractnetfromtable/src/edu/iu/nwb/analysis/extractnetfromtable/components/GraphContainer.java (modified) (9 diffs)
- trunk/plugins/composite/edu.iu.nwb.composite.extractcowordfromtable/src/edu/iu/nwb/composite/extractcowordfromtable/ExtractCoWordNetworkAlgorithm.java (modified) (3 diffs)
- trunk/plugins/composite/edu.iu.nwb.composite.extractcowordfromtable/src/edu/iu/nwb/composite/extractcowordfromtable/ExtractCoWordNetworkAlgorithmFactory.java (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/plugins/analysis/edu.iu.nwb.analysis.extractdirectednetfromtable/src/edu/iu/nwb/analysis/extractdirectednetfromtable/algorithms/ExtractDirectedNetworkAlgorithm.java
r2402 r2551 2 2 3 3 import java.util.Dictionary; 4 import java.util.Enumeration; 4 5 import java.util.Properties; 5 6 … … 47 48 final prefuse.data.Table dataTable = (prefuse.data.Table) data[0].getData(); 48 49 49 String split= null;50 String delimiter = null; 50 51 String sourceColumn = null; 51 String targetColumn = null;52 String targetColumn = null; 52 53 Object functionFile = null; 53 54 Properties functions = null; 54 55 55 split= this.parameters.get("delimiter").toString();56 delimiter = this.parameters.get("delimiter").toString(); 56 57 sourceColumn = this.parameters.get("sourceColumn").toString(); 57 58 targetColumn = this.parameters.get("targetColumn").toString(); 58 59 functionFile = this.parameters.get("aff"); 59 60 60 if(functionFile != null){ 61 functions = PropertyHandler.getProperties(functionFile.toString(),this.logger); 61 if(functionFile != null) 62 { 63 functions = PropertyHandler.getProperties(functionFile.toString(), this.logger); 62 64 } 63 65 64 try{ 65 GraphContainer gc = GraphContainer.initializeGraph(dataTable, sourceColumn, targetColumn, true,functions, this.logger,this.progressMonitor); 66 Graph directedNetwork = gc.buildGraph(sourceColumn, targetColumn, split, this.logger); 66 try 67 { 68 GraphContainer gc = GraphContainer.initializeGraph(dataTable, sourceColumn, 69 targetColumn, true, functions, this.logger, this.progressMonitor); 70 71 Graph directedNetwork = 72 gc.buildGraph(sourceColumn, targetColumn, delimiter, this.logger); 67 73 68 Data network = ExtractDirectedNetworkAlgorithm.constructData(data[0],(Object)directedNetwork,prefuse.data.Graph.class.toString(),DataProperty.NETWORK_TYPE, 74 Data network = ExtractDirectedNetworkAlgorithm.constructData(data[0], 75 (Object)directedNetwork, prefuse.data.Graph.class.toString(), DataProperty.NETWORK_TYPE, 69 76 "Network with directed edges from " + sourceColumn + " to " + targetColumn+ "."); 70 77 71 return new Data[] {network}; 72 }catch(InvalidColumnNameException ice){ 73 throw new AlgorithmExecutionException(ice.getMessage(),ice); 78 return new Data[] {network}; 79 } 80 catch(InvalidColumnNameException ice) 81 { 82 throw new AlgorithmExecutionException(ice.getMessage(), ice); 74 83 } 75 84 trunk/plugins/analysis/edu.iu.nwb.analysis.extractnetfromtable/src/edu/iu/nwb/analysis/extractnetfromtable/components/GraphContainer.java
r2402 r2551 41 41 42 42 public Graph buildGraph(String sourceColumnName, String targetColumnName, String splitString, LogService log){ 43 if(this.graph.isDirected()){ 44 return buildDirectedGraph(sourceColumnName,targetColumnName,splitString,log); 45 }else{ 46 return buildUndirectedGraph(sourceColumnName,targetColumnName,splitString,log); 47 } 48 } 49 50 private Graph buildUndirectedGraph(String sourceColumnName, String targetColumnName, String splitString, LogService log){ 43 String[] targetColumnNames = targetColumnName.split("\\,"); 44 45 if(this.graph.isDirected()) 46 return buildDirectedGraph(sourceColumnName, targetColumnNames, splitString, log); 47 // else 48 return buildUndirectedGraph(sourceColumnName, targetColumnNames, splitString, log); 49 } 50 51 private Graph buildUndirectedGraph(String sourceColumnName, String[] targetColumnNames, 52 String delimiter, LogService log) { 51 53 boolean dupValues = false; 52 54 final HashMap dupValuesErrorMessages = new HashMap(); … … 54 56 int count = 0; 55 57 56 if(this.progMonitor != null) {58 if(this.progMonitor != null) { 57 59 this.progMonitor.start(ProgressMonitor.WORK_TRACKABLE, rows); 58 60 } … … 62 64 Node node2 = null; 63 65 int row = ((Integer)it.next()).intValue(); 64 final String s = (String) this.table.get(row, targetColumnName); 66 67 final String targetString = 68 buildRowTargetStringFromColumnNames(row, targetColumnNames, this.table, delimiter); 65 69 66 70 Set seenObject = new HashSet(); 67 71 68 if(s != null){ //no values to extract from 69 final Pattern p = Pattern.compile("\\Q" + splitString + "\\E"); 70 final String[] objects = p.split(s); 71 72 for (int i = objects.length - 1; i >= 0; i--) { 73 if(seenObject.add(objects[i])){ //no duplicate nodes. 74 node1 = NodeContainer.mutateNode(objects[i], this.graph, this.table, row, this.nodeMap, AggregateFunctionMappings.SOURCEANDTARGET); 72 if(targetString != null) { //no values to extract from 73 final Pattern splitPattern = Pattern.compile("\\Q" + delimiter + "\\E"); 74 final String[] splitTargetStringArray = splitPattern.split(targetString); 75 76 for (int i = splitTargetStringArray.length - 1; i >= 0; i--) { 77 if(seenObject.add(splitTargetStringArray[i])) { // No duplicate nodes. 78 node1 = NodeContainer.mutateNode(splitTargetStringArray[i], this.graph, 79 this.table, row, this.nodeMap, AggregateFunctionMappings.SOURCEANDTARGET); 75 80 } 76 node1 = this.graph.getNode(this.nodeMap.getFunctionRow(objects[i]).getRowNumber()); 81 82 node1 = this.graph.getNode(this.nodeMap.getFunctionRow(splitTargetStringArray[i]).getRowNumber()); 83 77 84 for (int j = 0; j < i; j++) { 78 if(!objects[j].equals(objects[i])){ 79 if(seenObject.add(objects[j])){ //no duplicate nodes. 80 node2 = NodeContainer.mutateNode(objects[j], this.graph, this.table, row, this.nodeMap, AggregateFunctionMappings.SOURCEANDTARGET); 85 if(!splitTargetStringArray[j].equals(splitTargetStringArray[i])) { 86 if(seenObject.add(splitTargetStringArray[j])) { //No duplicate nodes. 87 node2 = NodeContainer.mutateNode(splitTargetStringArray[j], 88 this.graph, this.table, row, this.nodeMap, 89 AggregateFunctionMappings.SOURCEANDTARGET); 81 90 82 91 } 83 92 //create or modify an edge as necessary 84 node2 = this.graph.getNode(this.nodeMap.getFunctionRow( objects[j]).getRowNumber());93 node2 = this.graph.getNode(this.nodeMap.getFunctionRow(splitTargetStringArray[j]).getRowNumber()); 85 94 EdgeContainer.mutateEdge(node1, node2, this.graph, this.table, row, this.edgeMap); 86 }else{ 95 } 96 else { 87 97 dupValues = true; //detected a self-loop 88 98 } … … 113 123 } 114 124 115 private Graph buildDirectedGraph(String sourceColumnName, String targetColumnName, String splitString, LogService log){116 final Pattern p = Pattern.compile("\\Q" + splitString+ "\\E");125 private Graph buildDirectedGraph(String sourceColumnName, String[] targetColumnNames, String delimiter, LogService log){ 126 final Pattern splitPattern = Pattern.compile("\\Q" + delimiter + "\\E"); 117 127 final HashMap dupValuesErrorMessages = new HashMap(); 118 128 Column sourceColumn = this.table.getColumn(sourceColumnName); 119 Column targetColumn = this.table.getColumn(targetColumnName);120 129 Node node1; 121 130 Node node2; … … 127 136 this.progMonitor.start(ProgressMonitor.WORK_TRACKABLE, rows); 128 137 } 129 130 for (Iterator it = this.table.rows(); it.hasNext();){ 131 138 139 for (Iterator it = this.table.rows(); it.hasNext();) { 132 140 int row = ((Integer)it.next()).intValue(); 133 141 final String sourceString = (String) sourceColumn.get(row); 134 final String targetString = (String) targetColumn.get(row); 142 143 final String targetString = 144 buildRowTargetStringFromColumnNames(row, targetColumnNames, this.table, delimiter); 135 145 136 146 Set seenSource = new HashSet(); 137 147 Set seenTarget;// = seenSource; 138 148 139 if(sourceString != null && targetString != null){ //ensure we have values to extract 140 141 final String[] sources = p.split(sourceString); 142 final String[] targets = p.split(targetString); 149 if(sourceString != null && targetString != null) { //ensure we have values to extract 150 final String[] sources = splitPattern.split(sourceString); 151 final String[] targets = splitPattern.split(targetString); 143 152 144 153 for (int i = 0; i < sources.length; i++) { 145 if(seenSource.add(sources[i])){ 146 node1 = NodeContainer.mutateNode(sources[i],this.graph,this.table,row,this.nodeMap,AggregateFunctionMappings.SOURCE); 154 if(seenSource.add(sources[i])) { 155 node1 = NodeContainer.mutateNode(sources[i], this.graph, this.table, row, 156 this.nodeMap, AggregateFunctionMappings.SOURCE); 157 147 158 seenTarget = new HashSet(); 148 159 149 160 for (int j = 0; j < targets.length; j++) { 150 if(seenTarget.add(targets[j])){ 151 node2 = NodeContainer.mutateNode(targets[j],this.graph,this.table,row,this.nodeMap,AggregateFunctionMappings.TARGET); 161 if(seenTarget.add(targets[j])) { 162 node2 = NodeContainer.mutateNode(targets[j], this.graph, 163 this.table, row, this.nodeMap, AggregateFunctionMappings.TARGET); 152 164 153 165 EdgeContainer.mutateEdge(node1,node2,this.graph,this.table,row,this.edgeMap); … … 157 169 } 158 170 } 159 else {160 // String title = (String)pdt.get(row,pdt.getColumnNumber("TI"));171 else { 172 // String title = (String)pdt.get(row,pdt.getColumnNumber("TI")); 161 173 String title = "unknown"; 162 //ExtractNetworkFromTable.printNoValueToExtractError(title, sourceColumnName, log); 163 } 164 count = count+1; 174 // ExtractNetworkFromTable.printNoValueToExtractError(title, sourceColumnName, log); 175 } 176 177 count = count + 1; 178 165 179 if(this.progMonitor != null) 166 180 this.progMonitor.worked(count); 167 181 } 182 168 183 for(Iterator dupIter = dupValuesErrorMessages.keySet().iterator(); dupIter.hasNext();){ 169 184 log.log(LogService.LOG_WARNING, (String)dupValuesErrorMessages.get(dupIter.next())); 170 185 } 171 186 172 173 187 return this.graph; 174 188 } … … 180 194 if(inputSchema.getColumnIndex(sourceColumnName) < 0) 181 195 throw new InvalidColumnNameException(sourceColumnName + " was not a column in this table.\n"); 182 183 if(inputSchema.getColumnIndex(targetColumnName) < 0) 196 197 // Get all of the target column names. 198 String[] targetColumnNameArray = targetColumnName.split("\\,"); 199 200 // Make sure the one or more column name(s) is/are valid. 201 if ((targetColumnNameArray == null) || (targetColumnNameArray.length == 0)) 184 202 throw new InvalidColumnNameException(targetColumnName + " was not a column in this table.\n"); 203 else 204 { 205 for (int ii = 0; ii < targetColumnNameArray.length; ii++) 206 { 207 if (inputSchema.getColumnIndex(targetColumnNameArray[ii]) < 0) 208 { 209 throw new InvalidColumnNameException(targetColumnNameArray[ii] + 210 " was not a column in this table.\n"); 211 } 212 } 213 } 185 214 186 215 Schema nodeSchema = createNodeSchema(); … … 208 237 if(inputSchema.getColumnIndex(sourceColumnName) < 0) 209 238 throw new InvalidColumnNameException(sourceColumnName + " was not a column in this table.\n"); 210 211 if(inputSchema.getColumnIndex(targetColumnName) < 0) 239 240 // Get all of the target column names. 241 String[] targetColumnNameArray = targetColumnName.split("\\,"); 242 243 // Make sure the one or more column name(s) is/are valid. 244 if ((targetColumnNameArray == null) || (targetColumnNameArray.length == 0)) 212 245 throw new InvalidColumnNameException(targetColumnName + " was not a column in this table.\n"); 246 else 247 { 248 for (int ii = 0; ii < targetColumnNameArray.length; ii++) 249 { 250 if (inputSchema.getColumnIndex(targetColumnNameArray[ii]) < 0) 251 { 252 throw new InvalidColumnNameException(targetColumnNameArray[ii] + 253 " was not a column in this table.\n"); 254 } 255 } 256 } 213 257 214 258 Schema nodeSchema = createNodeSchema(); … … 242 286 return edgeSchema; 243 287 } 288 289 private static String buildRowTargetStringFromColumnNames(int row, String[] targetColumnNames, 290 Table table, String delimiter) { 291 StringBuilder targetStringBuilder = new StringBuilder(); 292 293 // This is outside of the proceeding for loop because that loop appends the delmiter first. 294 Column targetColumn = table.getColumn(targetColumnNames[0]); 295 targetStringBuilder.append((String)targetColumn.getString(row)); 296 297 for (int iColumn = 1; iColumn < targetColumnNames.length; iColumn++) { 298 targetColumn = table.getColumn(targetColumnNames[iColumn]); 299 targetStringBuilder.append(delimiter); 300 targetStringBuilder.append((String)targetColumn.getString(row)); 301 } 302 303 return targetStringBuilder.toString(); 304 } 244 305 } trunk/plugins/composite/edu.iu.nwb.composite.extractcowordfromtable/src/edu/iu/nwb/composite/extractcowordfromtable/ExtractCoWordNetworkAlgorithm.java
r2270 r2551 3 3 import java.util.Dictionary; 4 4 import java.util.Hashtable; 5 import java.util.Enumeration; 5 6 6 7 import org.cishell.framework.CIShellContext; … … 39 40 40 41 public Data[] execute() throws AlgorithmExecutionException { 41 try { 42 this.logger.log (LogService.LOG_INFO, "Class: " + extractDirectedNetwork.getClass().getName()); 43 44 try 45 { 46 // Form a new parameters object which contains the target column as the combined string of 47 // chosen columns. 48 StringBuilder targetColumn = new StringBuilder(); 49 boolean firstColumnHasBeenAdded = false; 50 Dictionary newParameters = new Hashtable(); 51 52 for (Enumeration parameterKeys = parameters.keys(); parameterKeys.hasMoreElements();) 53 { 54 String parameterKey = (String)parameterKeys.nextElement(); 55 Object parameterValue = parameters.get(parameterKey); 56 // Explode the current key based on "_" to separate the "column" and original_name. 57 String[] explodedParameterKey = parameterKey.split("\\_"); 58 59 // Does the key start with "column_"? (Is this a parameter meant for the target 60 // column?) Is it checked? 61 if (isAColumnCheckBoxParameter(explodedParameterKey)) 62 { 63 if (columnCheckBoxWasSelected(parameterValue)) { 64 //add column to list of columns we want to be part of the target. 65 66 //If this is not the first column added, append a delimiter first as well. 67 if (firstColumnHasBeenAdded) 68 { 69 targetColumn.append(","); 70 } 71 targetColumn.append(explodedParameterKey[1]); 72 firstColumnHasBeenAdded = true; 73 } else 74 { 75 //ignore check box if it was not selected 76 } 77 } 78 else //it was just a normal parameter 79 { 80 //so add it to the new dictionary. 81 newParameters.put(parameterKey, parameterValue); 82 } 83 } 84 85 // Add the target column. 86 newParameters.put("targetColumn", targetColumn.toString()); 87 42 88 //turn scientometrics data table into prefuse Graph of directed network 43 Algorithm extractAlg = extractDirectedNetwork.createAlgorithm(data, parameters, context);89 Algorithm extractAlg = extractDirectedNetwork.createAlgorithm(data, newParameters, context); 44 90 Data[] directedNetworkData = extractAlg.execute(); 45 91 //converter prefuse Graph of directed network into nwb graph file of directed network … … 63 109 return networkData; 64 110 } 111 112 113 private boolean isAColumnCheckBoxParameter(String[] explodedParameterKey) { 114 return (explodedParameterKey.length > 1) && (explodedParameterKey[0].equals("column")); 115 } 116 117 private boolean columnCheckBoxWasSelected(Object parameterValue) 118 { 119 //parameter represents whether a certain column is selected or not 120 boolean columnWasSelected = ((Boolean) parameterValue).booleanValue(); 121 return columnWasSelected; 122 } 123 65 124 } trunk/plugins/composite/edu.iu.nwb.composite.extractcowordfromtable/src/edu/iu/nwb/composite/extractcowordfromtable/ExtractCoWordNetworkAlgorithmFactory.java
r2268 r2551 27 27 28 28 29 public class ExtractCoWordNetworkAlgorithmFactory implements AlgorithmFactory,ParameterMutator { 29 public class ExtractCoWordNetworkAlgorithmFactory implements AlgorithmFactory, ParameterMutator { 30 protected static final String PREFIX = "column_"; 31 32 protected static final String UNFILTERED_COLUMNS[] = 33 { 34 "abstract", "keyword", "title", "field of application", "chemicals/cas", 35 }; 36 /* { 37 "", "City of Publisher", "DOI", "Document Type", "E-mail Address", "Ending Page", 38 "File Type", "ISI Document Delivery Number", "ISSN", "New Article Number", 39 "PA", "Part Number", "Publication Date", "Publication Type", "Publication Year", 40 "Publisher Web Address", "Reprint Address", "Research Addresses", "SC", "Special Issue", 41 "Times Cited", "Unique ID", "Version Number", "Volume" 42 }; */ 43 30 44 private AlgorithmFactory extractDirectedNetwork; 31 45 private AlgorithmFactory bibliographicCoupling; … … 34 48 35 49 public ObjectClassDefinition mutateParameters(Data[] data, ObjectClassDefinition parameters) { 36 Table t = (Table) data[0].getData(); 37 38 ObjectClassDefinition oldDefinition = parameters; 39 40 BasicObjectClassDefinition definition; 41 try { 42 definition = new BasicObjectClassDefinition(oldDefinition.getID(), oldDefinition.getName(), oldDefinition.getDescription(), oldDefinition.getIcon(16)); 43 } catch (IOException e) { 44 definition = new BasicObjectClassDefinition(oldDefinition.getID(), oldDefinition.getName(), oldDefinition.getDescription(), null); 45 } 46 47 String[] columnNames = createKeyArray(t.getSchema()); 50 Table dataTable = (Table) data[0].getData(); 51 52 ObjectClassDefinition oldObjectClassDefinition = parameters; 53 BasicObjectClassDefinition newObjectClassDefinition; 54 55 try 56 { 57 newObjectClassDefinition = new BasicObjectClassDefinition(oldObjectClassDefinition.getID(), 58 oldObjectClassDefinition.getName(), oldObjectClassDefinition.getDescription(), 59 oldObjectClassDefinition.getIcon(16)); 60 } 61 catch (IOException e) 62 { 63 newObjectClassDefinition = new BasicObjectClassDefinition(oldObjectClassDefinition.getID(), 64 oldObjectClassDefinition.getName(), oldObjectClassDefinition.getDescription(), null); 65 } 66 67 String[] columnNames = createKeyArray(dataTable.getSchema()); 48 68 Arrays.sort(columnNames); 49 69 50 AttributeDefinition[] definitions = oldDefinition.getAttributeDefinitions(ObjectClassDefinition.ALL); 51 52 for(int ii = 0; ii < definitions.length; ii++) { 53 String id = definitions[ii].getID(); 54 if((id.equals("sourceColumn") || id.equals("targetColumn"))){ 55 definition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, 56 new BasicAttributeDefinition(id, definitions[ii].getName(), definitions[ii].getDescription(), definitions[ii].getType(), columnNames, columnNames)); 57 } 58 else if(id.equals("delimiter")){ 59 definition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, definitions[ii]); 60 } 61 else{ 62 definition.addAttributeDefinition(ObjectClassDefinition.OPTIONAL, definitions[ii]); 63 } 64 } 65 66 67 return definition; 70 AttributeDefinition[] attributeDefinitions = 71 oldObjectClassDefinition.getAttributeDefinitions(ObjectClassDefinition.ALL); 72 73 for(int ii = 0; ii < attributeDefinitions.length; ii++) 74 { 75 String id = attributeDefinitions[ii].getID(); 76 77 if(id.equals("sourceColumn")) 78 { 79 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, 80 new BasicAttributeDefinition(id, attributeDefinitions[ii].getName(), 81 attributeDefinitions[ii].getDescription(), attributeDefinitions[ii].getType(), 82 columnNames, columnNames)); 83 } 84 else if(id.equals("delimiter")) 85 { 86 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, 87 attributeDefinitions[ii]); 88 } 89 else if(id.equals("targetColumn")) 90 { 91 } 92 else 93 { 94 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.OPTIONAL, 95 attributeDefinitions[ii]); 96 } 97 } 98 99 100 // return newObjectClassDefinition; 101 return addBooleanOptions (newObjectClassDefinition, columnNames, PREFIX); 102 } 103 104 private ObjectClassDefinition addBooleanOptions(ObjectClassDefinition oldObjectClassDefinition, 105 String[] columnNames, String prefix) 106 { 107 BasicObjectClassDefinition newObjectClassDefinition; 108 109 try 110 { 111 newObjectClassDefinition = new BasicObjectClassDefinition(oldObjectClassDefinition.getID(), 112 oldObjectClassDefinition.getName(), oldObjectClassDefinition.getDescription(), 113 oldObjectClassDefinition.getIcon(16)); 114 } 115 catch (IOException e) 116 { 117 newObjectClassDefinition = new BasicObjectClassDefinition(oldObjectClassDefinition.getID(), 118 oldObjectClassDefinition.getName(), oldObjectClassDefinition.getDescription(), null); 119 } 120 121 AttributeDefinition[] attributeDefinitions = 122 oldObjectClassDefinition.getAttributeDefinitions(ObjectClassDefinition.REQUIRED); 123 124 for(int ii = 0; ii < attributeDefinitions.length; ii++) 125 { 126 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, 127 attributeDefinitions[ii]); 128 } 129 130 attributeDefinitions = 131 oldObjectClassDefinition.getAttributeDefinitions(ObjectClassDefinition.OPTIONAL); 132 133 for(int ii = 0; ii < attributeDefinitions.length; ii++) 134 { 135 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.OPTIONAL, 136 attributeDefinitions[ii]); 137 } 138 139 attributeDefinitions = 140 oldObjectClassDefinition.getAttributeDefinitions(ObjectClassDefinition.ALL); 141 142 for(int ii = 0; ii < columnNames.length; ii++) 143 { 144 String name = columnNames[ii]; 145 146 // Ugh, there has to be a library for this. 147 final int numFilteredColumns = UNFILTERED_COLUMNS.length; 148 149 // We're white listing, so we're filtering by default. 150 boolean filtered = true; 151 152 for (int jj = 0; jj < numFilteredColumns; jj++) 153 { 154 // If the column contains one of our white listed items, let it through. 155 if (name.toLowerCase().indexOf(UNFILTERED_COLUMNS[jj]) != -1) 156 { 157 filtered = false; 158 159 break; 160 } 161 } 162 163 // If the column was filtered (determined in the prior loop), continue on with the next 164 // loop iteration. 165 if (filtered) 166 continue; 167 168 newObjectClassDefinition.addAttributeDefinition(ObjectClassDefinition.REQUIRED, 169 new BasicAttributeDefinition(prefix + name, name, "Normalize column " + name + "?", 170 AttributeDefinition.BOOLEAN)); 171 } 172 173 174 return newObjectClassDefinition; 68 175 } 69 176 … … 87 194 88 195 DataConversionService converter = (DataConversionService) 89 context.getService(DataConversionService.class.getName());196 context.getService(DataConversionService.class.getName()); 90 197 91 198 return new ExtractCoWordNetworkAlgorithm(data, parameters, context, … … 100 207 private AlgorithmFactory getAlgorithmFactory (String filter) 101 208 throws InvalidSyntaxException { 102 ServiceReference[] algFactoryRefs = bContext103 .getServiceReferences(AlgorithmFactory.class.getName(), filter);209 ServiceReference[] algFactoryRefs = 210 bContext.getServiceReferences(AlgorithmFactory.class.getName(), filter); 104 211 105 212 if (algFactoryRefs != null && algFactoryRefs.length != 0) {
