Changeset 1607 for branches/3.0-Beta2/components
- Timestamp:
- 06/08/07 20:15:22 (15 months ago)
- Location:
- branches/3.0-Beta2/components
- Files:
-
- 15 modified
-
client/test/ome/adapters/pojos/itests/PojosServiceTest.java (modified) (2 diffs)
-
client/test/ome/adapters/pojos/utests/PojosTest.java (modified) (5 diffs)
-
common/test/ome/model/utests/PermissionsTest.java (modified) (3 diffs)
-
dsl/src/ome/dsl/SaxReader.java (modified) (1 diff)
-
policy/.project (modified) (1 diff)
-
resurrect/src/ome/resurrect/Resurrect.java (modified) (3 diffs)
-
server/src/ome/rules/drools/AllObjects.java (modified) (3 diffs)
-
server/src/ome/tools/FileSystem.java (modified) (3 diffs)
-
server/test/ome/server/itests/EventStateChangeTest.java (modified) (3 diffs)
-
server/test/ome/server/itests/query/pojos/QueryTest.java (modified) (2 diffs)
-
tools/WebAdmin/test/TestArray2List.java (modified) (3 diffs)
-
tools/WebAdmin/test/TestChangeGroups.java (modified) (5 diffs)
-
tools/WebAdmin/test/TestDelete.java (modified) (3 diffs)
-
tools/WebAdmin/test/TestGroups.java (modified) (5 diffs)
-
tools/WebAdmin/test/TestTheLink.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0-Beta2/components/client/test/ome/adapters/pojos/itests/PojosServiceTest.java
r1375 r1607 866 866 Dataset.ANNOTATIONS)).intValue() > 0); 867 867 868 System.out.println(original.getDetails().getCounts()); 869 868 if (log.isDebugEnabled()) { 869 log.debug(original.getDetails().getCounts()); 870 } 871 870 872 } 871 873 … … 977 979 Set updt_ids = new HashSet(updated.collectProjectLinks(new IdBlock())); 978 980 979 System.out.println(orig_ids); 980 System.out.println(updt_ids); 981 if (log.isDebugEnabled()) { 982 log.debug(orig_ids); 983 log.debug(updt_ids); 984 } 981 985 982 986 assertTrue(updt_ids.containsAll(orig_ids)); -
branches/3.0-Beta2/components/client/test/ome/adapters/pojos/utests/PojosTest.java
r1375 r1607 7 7 package ome.adapters.pojos.utests; 8 8 9 import org.apache.commons.logging.Log; 10 import org.apache.commons.logging.LogFactory; 9 11 import org.testng.annotations.*; 10 12 … … 42 44 43 45 public class PojosTest extends TestCase { 46 47 private static Log log = LogFactory.getLog(PojosTest.class); 48 44 49 IObject[] all; 45 50 … … 114 119 assertFalse(pd.getDatasets().size() == 0); 115 120 assertFalse(pd.getDatasets().iterator().next().getClass() == Dataset.class); 116 System.out.println(pd); 121 if (log.isDebugEnabled()) { 122 log.debug(pd); 123 } 117 124 } 118 125 … … 162 169 Set d_links = new HashSet(test.collectProjectLinks(null)); 163 170 164 System.out.println(p_links); 165 System.out.println(d_links); 171 if (log.isDebugEnabled()) { 172 log.debug(p_links); 173 log.debug(d_links); 174 } 166 175 167 176 assertTrue(p_links.containsAll(d_links)); … … 174 183 Set i2_links = new HashSet(test2.collectDatasetLinks(null)); 175 184 176 System.out.println(d2_links); 177 System.out.println(i2_links); 185 if (log.isDebugEnabled()) { 186 log.debug(d2_links); 187 log.debug(i2_links); 188 } 189 178 190 179 191 assertTrue(d2_links.containsAll(i2_links)); -
branches/3.0-Beta2/components/common/test/ome/model/utests/PermissionsTest.java
r1167 r1607 12 12 import java.io.ObjectOutputStream; 13 13 14 import org.apache.commons.logging.Log; 15 import org.apache.commons.logging.LogFactory; 14 16 import org.testng.annotations.*; 15 17 … … 27 29 public class PermissionsTest extends TestCase { 28 30 31 private static Log log = LogFactory.getLog(PermissionsTest.class); 32 29 33 Permissions p; 30 34 … … 401 405 Perms pp = new Perms().revoke(role, right); 402 406 long l = pp.toLong(); 403 System.out.println(l + ":" + Long.toBinaryString(l)); 407 if (log.isDebugEnabled()) { 408 log.debug(l + ":" + Long.toBinaryString(l)); 409 } 404 410 long bit = Perms.bit(role, right); 405 System.out.println(bit + ":" + Long.toBinaryString(bit)); 411 if (log.isDebugEnabled()) { 412 log.debug(bit + ":" + Long.toBinaryString(bit)); 413 } 406 414 assertTrue((l ^ bit) == -1L); 407 415 -
branches/3.0-Beta2/components/dsl/src/ome/dsl/SaxReader.java
r1547 r1607 253 253 /** simple outputting routine with indention */ 254 254 private void outputStart(String element, Attributes attrs) { 255 System.out.print(depth + element); 256 System.out.print("("); 255 if (log.isDebugEnabled()) { 256 log.debug(depth + element + "("); 257 } 257 258 for (int i = 0; i < attrs.getLength(); i++) { 258 259 String attr = attrs.getQName(i); 259 260 String value = attrs.getValue(i); 260 System.out.print(" " + attr + "=\"" + value + "\" "); 261 } 262 System.out.print("):"); 263 System.out.println(""); 261 if (log.isDebugEnabled()) { 262 log.debug(" " + attr + "=\"" + value + "\" "); 263 } 264 } 265 if (log.isDebugEnabled()) { 266 log.debug("): "); 267 } 264 268 depth += " "; 265 269 } -
branches/3.0-Beta2/components/policy/.project
r1586 r1607 78 78 </link> 79 79 <link> 80 <name>server_src</name> 81 <type>2</type> 82 <locationURI>OMERO_COMPONENTS/server/src</locationURI> 83 </link> 84 <link> 80 85 <name>resurrect_src</name> 81 86 <type>2</type> 82 87 <locationURI>OMERO_COMPONENTS/resurrect/src</locationURI> 83 88 </link> 84 <link>85 <name>server_src</name>86 <type>2</type>87 <locationURI>OMERO_COMPONENTS/server/src</locationURI>88 </link>89 89 </linkedResources> 90 90 </projectDescription> -
branches/3.0-Beta2/components/resurrect/src/ome/resurrect/Resurrect.java
r1167 r1607 9 9 import java.util.List; 10 10 11 import org.apache.commons.logging.Log; 12 import org.apache.commons.logging.LogFactory; 11 13 import org.eclipse.swt.*; 12 14 import org.eclipse.swt.widgets.*; … … 20 22 */ 21 23 public class Resurrect { 24 25 private static Log log = LogFactory.getLog(Resurrect.class); 26 22 27 /** Connector to the OME 2.5 (OMERO2) database * */ 23 28 Omero2Connector c2; … … 70 75 public void handleEvent(org.eclipse.swt.widgets.Event ev) { 71 76 if (ev.detail == SWT.CHECK) { 72 System.out.println(ev.item + " checked"); 77 if (log.isDebugEnabled()) { 78 log.debug(ev.item + " checked"); 79 } 73 80 } 74 81 } -
branches/3.0-Beta2/components/server/src/ome/rules/drools/AllObjects.java
r1167 r1607 15 15 package ome.rules.drools; 16 16 17 import org.apache.commons.logging.Log; 18 import org.apache.commons.logging.LogFactory; 17 19 import org.drools.spi.KnowledgeHelper; 18 20 import org.drools.spring.metadata.annotation.java.Condition; … … 24 26 public class AllObjects { 25 27 28 private static Log log = LogFactory.getLog(AllObjects.class); 29 26 30 @Condition 27 31 public boolean objectAsserted(@Fact("object") … … 33 37 public void consequence(@Fact("object") 34 38 Object obj, KnowledgeHelper kh) { 35 System.out.println("here i am" + obj);// TODO walk the graph! 39 if (log.isDebugEnabled()) { 40 log.debug("here i am" + obj); // TODO walk the graph! 41 } 36 42 } 37 43 } -
branches/3.0-Beta2/components/server/src/ome/tools/FileSystem.java
r1376 r1607 6 6 7 7 import org.apache.commons.io.FileSystemUtils; 8 import org.apache.commons.logging.Log; 9 import org.apache.commons.logging.LogFactory; 8 10 9 11 /** … … 26 28 */ 27 29 public class FileSystem extends File { 30 31 private static Log log = LogFactory.getLog(FileSystem.class); 28 32 29 33 /** … … 172 176 173 177 public static void main(String[] args) { 174 FileSystem file = new FileSystem("/usr/local"); 178 179 FileSystem file = new FileSystem("/usr/local"); 175 180 long free = file.free("/"); 176 System.out.println("Free kilobytes: " + free);177 181 178 //ServiceFactory sf = new ServiceFactory("ome.client.test"); 179 //RawFileStore rfs = sf.createRawFileStore();180 //byte[] bytes = null; 182 if (log.isDebugEnabled()) { 183 log.debug("Free kilobytes: " + free); 184 } 181 185 182 //System.out.println("Time prior to write only: " + System.currentTimeMillis()); 183 //rfs.write(bytes, 0L, 0); 184 //System.out.println("Time after to write only: " + System.currentTimeMillis()); 186 if (log.isDebugEnabled()) { 187 log.debug("Time prior to check: " + System.currentTimeMillis()); 188 } 189 190 long kb = file.free("/"); 185 191 186 System.out.println("Time prior to check: " + System.currentTimeMillis()); 187 long kb = file.free("/"); 188 //rfs.write(bytes, 0L, 0); 189 System.out.println("Time after check: " + System.currentTimeMillis()); 190 System.out.println("kb free was " + kb); 192 if (log.isDebugEnabled()) { 193 log.debug("Time after check: " + System.currentTimeMillis()); 194 log.debug("kb free was " + kb); 195 } 191 196 } 192 197 } -
branches/3.0-Beta2/components/server/test/ome/server/itests/EventStateChangeTest.java
r1167 r1607 8 8 9 9 import java.util.Date; 10 11 import org.apache.commons.logging.Log; 12 import org.apache.commons.logging.LogFactory; 10 13 import org.testng.annotations.Test; 11 14 … … 15 18 16 19 public class EventStateChangeTest extends AbstractManagedContextTest { 20 21 private static Log log = LogFactory.getLog(EventStateChangeTest.class); 17 22 18 23 Long id; … … 33 38 Experimenter e = getExperimenter("root"); 34 39 iUpdate.saveObject(e); 35 System.out 36 .println("XXXXXXXXXXXXXXXEventStateChangeTest.test_just_experimenter()"); 40 if (log.isDebugEnabled()) { 41 log.debug("XXXXXXXXXXXXXXXEventStateChangeTest.test_just_experimenter()"); 42 } 37 43 38 44 } -
branches/3.0-Beta2/components/server/test/ome/server/itests/query/pojos/QueryTest.java
r1167 r1607 126 126 // "group by ds.id having ds.id in (1L)"); 127 127 List result = (List) iQuery.execute(q); 128 System.out.println(result); 128 129 if (log.isDebugEnabled()) { 130 log.debug(result); 131 } 129 132 } 130 133 … … 157 160 RdfPrinter rdf = new RdfPrinter(); 158 161 rdf.filter("results are", result); 159 System.out.println(rdf.getRdf()); 162 if (log.isDebugEnabled()) { 163 log.debug(rdf.getRdf()); 164 } 160 165 } 161 166 -
branches/3.0-Beta2/components/tools/WebAdmin/test/TestArray2List.java
r1539 r1607 2 2 import java.util.Arrays; 3 3 import java.util.List; 4 5 import org.apache.commons.logging.Log; 6 import org.apache.commons.logging.LogFactory; 4 7 5 8 import ome.api.IAdmin; … … 15 18 16 19 public class TestArray2List { 20 21 private static Log log = LogFactory.getLog(TestArray2List.class); 17 22 18 23 /** … … 32 37 ExperimenterGroup group = as.getGroup(4L); 33 38 Experimenter [] exps = as.containedExperimenters(group.getId()); 34 35 System.out.println("group "+group.getName()); 39 40 if (log.isDebugEnabled()) { 41 log.debug("group "+group.getName()); 42 } 43 36 44 for (int i=0; i<exps.length; i++) { 37 45 Experimenter tExp = exps[i]; 38 System.out.println("ex "+tExp.getOmeName()+" id: "+tExp.getId()); 46 if (log.isDebugEnabled()) { 47 log.debug("ex "+tExp.getOmeName()+" id: "+tExp.getId()); 48 } 39 49 } 40 50 41 51 List<Experimenter> newExp = Arrays.asList(exps); 42 43 System.out.println(newExp); 44 } 52 if (log.isDebugEnabled()) { 53 log.debug(newExp); 54 } 55 } 45 56 } -
branches/3.0-Beta2/components/tools/WebAdmin/test/TestChangeGroups.java
r1539 r1607 1 1 import java.util.ArrayList; 2 2 import java.util.List; 3 4 import org.apache.commons.logging.Log; 5 import org.apache.commons.logging.LogFactory; 3 6 4 7 import ome.api.IAdmin; … … 14 17 15 18 public class TestChangeGroups { 19 20 private static Log log = LogFactory.getLog(TestChangeGroups.class); 16 21 17 22 /** … … 19 24 */ 20 25 public static void main(String[] args) { 21 // TODO Auto-generated method stub22 26 23 27 Login l = new Login("root", "ome", "system", "User"); … … 32 36 Experimenter [] exps = as.containedExperimenters(group.getId()); 33 37 34 System.out.println("group "+group.getName()); 38 if (log.isDebugEnabled()) { 39 log.debug("group "+group.getName()); 40 } 35 41 for (int i=0; i<exps.length; i++) { 36 42 Experimenter tExp = exps[i]; 37 System.out.println("ex "+tExp.getOmeName()+" id: "+tExp.getId()); 43 if (log.isDebugEnabled()) { 44 log.debug("ex "+tExp.getOmeName()+" id: "+tExp.getId()); 45 } 38 46 } 39 40 System.out.println("add new user to this group... "); 47 if (log.isDebugEnabled()) { 48 log.debug("add new user to this group... "); 49 } 41 50 42 51 List<String> formExps = new ArrayList<String>(); … … 49 58 List<String> exGrL = new ArrayList<String>(); 50 59 for(int j=0; j<exGr.length; j++) { 51 System.out.println("existing gr '"+exGr[j].getName()+"' id:"+exGr[j].getId()); 60 if (log.isDebugEnabled()) { 61 log.debug("existing gr '"+exGr[j].getName()+"' id:"+exGr[j].getId()); 62 } 52 63 exGrL.add(exGr[j].getId().toString()); 53 64 } 54 55 System.out.println("if contains... " + formExps.get(i)); 65 if (log.isDebugEnabled()) { 66 log.debug("if contains... " + formExps.get(i)); 67 } 56 68 if(!exGrL.contains(group.getId().toString())) { 57 69 Experimenter tExp = as.getExperimenter(Long.parseLong(formExps.get(i))); 58 System.out.println("exp can be add... '"+ tExp.getOmeName()+"' id:"+tExp.getId()); 70 if (log.isDebugEnabled()) { 71 log.debug("exp can be add... '"+ tExp.getOmeName()+"' id:"+tExp.getId()); 72 } 59 73 60 74 //as.addGroups(tExp, group); 61 75 } else { 62 System.out.println("user exist on this group..."); 76 if (log.isDebugEnabled()) { 77 log.debug("user exist on this group..."); 78 } 63 79 } 64 80 -
branches/3.0-Beta2/components/tools/WebAdmin/test/TestDelete.java
r1539 r1607 1 1 2 3 import org.apache.commons.logging.Log; 4 import org.apache.commons.logging.LogFactory; 2 5 3 6 import ome.api.IAdmin; … … 12 15 13 16 public class TestDelete { 17 18 private static Log log = LogFactory.getLog(TestDelete.class); 14 19 15 20 public static void main(String args[]) { … … 31 36 32 37 for (int i=0; i<exg.length; i++) { 33 System.out.println(exg[i].getName()); 38 if (log.isDebugEnabled()) { 39 log.debug(exg[i].getName()); 40 } 34 41 } 35 42 -
branches/3.0-Beta2/components/tools/WebAdmin/test/TestGroups.java
r1539 r1607 1 import org.apache.commons.logging.Log; 2 import org.apache.commons.logging.LogFactory; 3 1 4 import ome.api.IAdmin; 2 5 import ome.api.IQuery; … … 11 14 public class TestGroups { 12 15 16 private static Log log = LogFactory.getLog(TestGroups.class); 17 13 18 public static void main(String args[]) { 14 19 … … 32 37 33 38 ExperimenterGroup df = as.getGroup(2L); 34 System.out.println("df id 2:"+df.getName()); 39 if (log.isDebugEnabled()) { 40 log.debug("df id 2:"+df.getName()); 41 } 35 42 36 43 ExperimenterGroup [] exg_t = new ExperimenterGroup[2]; … … 39 46 40 47 Long id = as.createExperimenter(exp_t, df, exg_t); 41 System.out.println("id "+id); 48 if (log.isDebugEnabled()) { 49 log.debug("id "+id); 50 } 42 51 43 52 Experimenter exp = as.getExperimenter(id); … … 47 56 48 57 for (int i=0; i<exg.length; i++) { 49 System.out.println(exg[i].getName()); 58 if (log.isDebugEnabled()) { 59 log.debug(exg[i].getName()); 60 } 50 61 } 51 62 -
branches/3.0-Beta2/components/tools/WebAdmin/test/TestTheLink.java
r1539 r1607 2 2 3 3 import java.util.List; 4 5 import org.apache.commons.logging.Log; 6 import org.apache.commons.logging.LogFactory; 4 7 5 8 import ome.api.IAdmin; … … 15 18 16 19 public class TestTheLink { 20 21 private static Log log = LogFactory.getLog(TestTheLink.class); 17 22 18 23 public static void main(String args[]) { … … 35 40 36 41 for(GroupExperimenterMap map : maps) { 37 System.out.println("m "+map.getParent().getId()); 42 if (log.isDebugEnabled()) { 43 log.debug("m "+map.getParent().getId()); 44 } 38 45 //us.deleteObject(map); 39 46 }
