From: <pat...@us...> - 2010-06-20 19:16:55
|
Revision: 1075 http://cishell.svn.sourceforge.net/cishell/?rev=1075&view=rev Author: pataphil Date: 2010-06-20 19:16:46 +0000 (Sun, 20 Jun 2010) Log Message: ----------- * Changed signature of AlgorithmFactory.createAlgorithm to specify Dictionary K, V types, updating it to Java 1.5 (as opposed to using the Java 1.4 raw Dictionary). * If it breaks anything (which it shouldn't), I'll change it back. Modified Paths: -------------- trunk/core/org.cishell.framework/.classpath trunk/core/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs trunk/core/org.cishell.framework/META-INF/MANIFEST.MF trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java Modified: trunk/core/org.cishell.framework/.classpath =================================================================== --- trunk/core/org.cishell.framework/.classpath 2010-06-16 23:00:57 UTC (rev 1074) +++ trunk/core/org.cishell.framework/.classpath 2010-06-20 19:16:46 UTC (rev 1075) @@ -1,7 +1,7 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="output" path="bin"/> -</classpath> +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> + <classpathentry kind="src" path="src"/> + <classpathentry kind="output" path="bin"/> +</classpath> Modified: trunk/core/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/core/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs 2010-06-16 23:00:57 UTC (rev 1074) +++ trunk/core/org.cishell.framework/.settings/org.eclipse.jdt.core.prefs 2010-06-20 19:16:46 UTC (rev 1075) @@ -1,12 +1,12 @@ -#Wed Feb 06 22:39:13 GMT 2008 -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.4 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning -org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning -org.eclipse.jdt.core.compiler.source=1.3 +#Fri Jun 11 22:41:08 EDT 2010 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.5 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.5 Modified: trunk/core/org.cishell.framework/META-INF/MANIFEST.MF =================================================================== --- trunk/core/org.cishell.framework/META-INF/MANIFEST.MF 2010-06-16 23:00:57 UTC (rev 1074) +++ trunk/core/org.cishell.framework/META-INF/MANIFEST.MF 2010-06-20 19:16:46 UTC (rev 1075) @@ -4,6 +4,7 @@ Bundle-SymbolicName: org.cishell.framework Bundle-Version: 1.0.0 Bundle-Vendor: Cyberinfrastructure for Network Science Center +Bundle-RequiredExecutionEnvironment: J2SE-1.5 Import-Package: org.osgi.framework, org.osgi.service.log, org.osgi.service.metatype, Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java 2010-06-16 23:00:57 UTC (rev 1074) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/algorithm/AlgorithmFactory.java 2010-06-20 19:16:46 UTC (rev 1075) @@ -51,7 +51,6 @@ * standard CIShell services * @return An <code>Algorithm</code> primed for execution */ - public Algorithm createAlgorithm(Data[] data, - Dictionary parameters, - CIShellContext context); + public Algorithm createAlgorithm( + Data[] data, Dictionary<String, Object> parameters, CIShellContext context); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pat...@us...> - 2011-02-18 03:21:27
|
Revision: 1217 http://cishell.svn.sourceforge.net/cishell/?rev=1217&view=rev Author: pataphil Date: 2011-02-18 03:21:21 +0000 (Fri, 18 Feb 2011) Log Message: ----------- * Improved Converter to have calculateLossiness method. * Trying to fix the build (ServiceReferenceDelegate.java) Modified Paths: -------------- trunk/core/org.cishell.framework/META-INF/MANIFEST.MF trunk/core/org.cishell.framework/src/org/cishell/framework/ServiceReferenceDelegate.java trunk/core/org.cishell.framework/src/org/cishell/service/conversion/Converter.java Modified: trunk/core/org.cishell.framework/META-INF/MANIFEST.MF =================================================================== --- trunk/core/org.cishell.framework/META-INF/MANIFEST.MF 2011-02-18 03:20:04 UTC (rev 1216) +++ trunk/core/org.cishell.framework/META-INF/MANIFEST.MF 2011-02-18 03:21:21 UTC (rev 1217) @@ -5,8 +5,7 @@ Bundle-Version: 1.0.0 Bundle-Vendor: Cyberinfrastructure for Network Science Center Bundle-RequiredExecutionEnvironment: J2SE-1.5 -Import-Package: org.eclipse.osgi.framework.internal.core, - org.osgi.framework, +Import-Package: org.osgi.framework, org.osgi.service.log, org.osgi.service.metatype, org.osgi.service.prefs Modified: trunk/core/org.cishell.framework/src/org/cishell/framework/ServiceReferenceDelegate.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/framework/ServiceReferenceDelegate.java 2011-02-18 03:20:04 UTC (rev 1216) +++ trunk/core/org.cishell.framework/src/org/cishell/framework/ServiceReferenceDelegate.java 2011-02-18 03:21:21 UTC (rev 1217) @@ -1,86 +1,96 @@ -package org.cishell.framework; +//package org.cishell.framework; +// +//import org.osgi.framework.ServiceReference; +// +// +//public class ServiceReferenceDelegate { +// public static ServiceReference createUniqueServiceReference( +// ServiceReference originalServiceReference) { +// originalServiceReference.getClass(). +// return null; +// } +//} -import java.lang.reflect.Field; - -import org.eclipse.osgi.framework.internal.core.ServiceReferenceImpl; -import org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl; -import org.osgi.framework.Bundle; -import org.osgi.framework.ServiceReference; - -public class ServiceReferenceDelegate extends ServiceReferenceImpl { - public static final String REGISTRATION_FIELD_NAME = - "org.eclipse.osgi.framework.internal.core.ServiceReferenceImpl.registration"; - - private static int nextUniqueID = 0; - - private ServiceReference actualServiceReference; - private int uniqueID; - - public ServiceReferenceDelegate(ServiceReference actualServiceReference) { - super(getServiceRegistration(actualServiceReference)); - this.actualServiceReference = actualServiceReference; - this.uniqueID = nextUniqueID; - nextUniqueID++; - - } - - public Object getProperty(String key) { - return this.actualServiceReference.getProperty(key); - } - - public String[] getPropertyKeys() { - return this.actualServiceReference.getPropertyKeys(); - } - - public Bundle getBundle() { - return this.actualServiceReference.getBundle(); - } - - public Bundle[] getUsingBundles() { - return this.actualServiceReference.getUsingBundles(); - } - - public boolean isAssignableTo(Bundle bundle, String className) { - return this.actualServiceReference.isAssignableTo(bundle, className); - } - - @Override - public int compareTo(Object reference) { - if (reference instanceof ServiceReferenceDelegate) { - ServiceReferenceDelegate otherDelegate = (ServiceReferenceDelegate) reference; - - return new Integer(this.uniqueID).compareTo(new Integer(otherDelegate.uniqueID)); - } else { - return this.actualServiceReference.compareTo(reference); - } - } - - @Override - public int hashCode() { - return this.actualServiceReference.hashCode() + new Integer(this.uniqueID).hashCode(); - } - - // TODO: Totally, disginstingly hacky. - private static ServiceRegistrationImpl getServiceRegistration( - ServiceReference actualServiceReference) { - try { - Field[] fields = actualServiceReference.getClass().getDeclaredFields(); - -// for (Field field : fields) { -// System.err.println(field); -// } - Field registrationField = fields[0]; -// actualServiceReference.getClass().getField(REGISTRATION_FIELD_NAME); - boolean isAccessible = registrationField.isAccessible(); - registrationField.setAccessible(true); - Object serviceRegistration = registrationField.get(actualServiceReference); - registrationField.setAccessible(isAccessible); - - return (ServiceRegistrationImpl) serviceRegistration; - } catch (IllegalAccessException e) { - throw new RuntimeException(e.getMessage(), e); - } /* catch (NoSuchFieldException e) { - throw new RuntimeException(e.getMessage(), e); - } */ - } -} \ No newline at end of file +// +//import org.eclipse.osgi.framework.internal.core.ServiceReferenceImpl; +//import org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl; +//import org.osgi.framework.Bundle; +//import org.osgi.framework.ServiceReference; +// +//public class ServiceReferenceDelegate extends ServiceReferenceImpl { +// public static final String REGISTRATION_FIELD_NAME = +// "org.eclipse.osgi.framework.internal.core.ServiceReferenceImpl.registration"; +// +// private static int nextUniqueID = 0; +// +// private ServiceReference actualServiceReference; +// private int uniqueID; +// +// public ServiceReferenceDelegate(ServiceReference actualServiceReference) { +// super(getServiceRegistration(actualServiceReference)); +// this.actualServiceReference = actualServiceReference; +// this.uniqueID = nextUniqueID; +// nextUniqueID++; +// +// } +// +// public Object getProperty(String key) { +// return this.actualServiceReference.getProperty(key); +// } +// +// public String[] getPropertyKeys() { +// return this.actualServiceReference.getPropertyKeys(); +// } +// +// public Bundle getBundle() { +// return this.actualServiceReference.getBundle(); +// } +// +// public Bundle[] getUsingBundles() { +// return this.actualServiceReference.getUsingBundles(); +// } +// +// public boolean isAssignableTo(Bundle bundle, String className) { +// return this.actualServiceReference.isAssignableTo(bundle, className); +// } +// +// @Override +// public int compareTo(Object reference) { +// if (reference instanceof ServiceReferenceDelegate) { +// ServiceReferenceDelegate otherDelegate = (ServiceReferenceDelegate) reference; +// +// return new Integer(this.uniqueID).compareTo(new Integer(otherDelegate.uniqueID)); +// } else { +// return this.actualServiceReference.compareTo(reference); +// } +// } +// +// @Override +// public int hashCode() { +// return this.actualServiceReference.hashCode() + new Integer(this.uniqueID).hashCode(); +// } +// +// // TODO: Totally, disginstingly hacky. +// private static ServiceRegistrationImpl getServiceRegistration( +// ServiceReference actualServiceReference) { +// try { +// Field[] fields = actualServiceReference.getClass().getDeclaredFields(); +// +//// for (Field field : fields) { +//// System.err.println(field); +//// } +// Field registrationField = fields[0]; +//// actualServiceReference.getClass().getField(REGISTRATION_FIELD_NAME); +// boolean isAccessible = registrationField.isAccessible(); +// registrationField.setAccessible(true); +// Object serviceRegistration = registrationField.get(actualServiceReference); +// registrationField.setAccessible(isAccessible); +// +// return (ServiceRegistrationImpl) serviceRegistration; +// } catch (IllegalAccessException e) { +// throw new RuntimeException(e.getMessage(), e); +// } /* catch (NoSuchFieldException e) { +// throw new RuntimeException(e.getMessage(), e); +// } */ +// } +//} \ No newline at end of file Modified: trunk/core/org.cishell.framework/src/org/cishell/service/conversion/Converter.java =================================================================== --- trunk/core/org.cishell.framework/src/org/cishell/service/conversion/Converter.java 2011-02-18 03:20:04 UTC (rev 1216) +++ trunk/core/org.cishell.framework/src/org/cishell/service/conversion/Converter.java 2011-02-18 03:21:21 UTC (rev 1217) @@ -65,4 +65,6 @@ * @throws ConversionException If the data conversion fails while converting */ public Data convert(Data data) throws ConversionException; + + public String calculateLossiness(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |