From ac1c1f7bb8dac176b826da3b2e9aeb36d0ab76f7 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 13 Mar 2014 15:08:00 +0000 Subject: [PATCH] added support for feeds range retrieval git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@93075 82a268e6-3cf1-43bd-a215-b396298e98cf --- .gwt/.gwt-log | 286 ++++++++++++++++++ META-INF/clientlog4j.properties | 4 +- .../server/DBCassandraAstyanaxImpl.java | 36 ++- .../server/DatabookCassandraTest.java | 16 +- .../portal/databook/server/DatabookStore.java | 10 +- .../portal/databook/shared/RangeFeeds.java | 40 +++ 6 files changed, 370 insertions(+), 22 deletions(-) create mode 100644 src/main/java/org/gcube/portal/databook/shared/RangeFeeds.java diff --git a/.gwt/.gwt-log b/.gwt/.gwt-log index d426f9a..754be4b 100644 --- a/.gwt/.gwt-log +++ b/.gwt/.gwt-log @@ -71367,3 +71367,289 @@ Compiling... Compilation completed in 0.00 seconds Removing invalidated units Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:103) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 0 cached/archived units. Used 0 / 2719 units from cache. +Compiling... + 0% complete (ETR: 56 seconds) + 10% complete (ETR: 55 seconds) + 20% complete (ETR: 36 seconds) + 30% complete (ETR: 29 seconds) + 40% complete (ETR: 24 seconds) + 50% complete (ETR: 17 seconds) + 60% complete (ETR: 13 seconds) + 70% complete (ETR: 9 seconds) + 80% complete (ETR: 6 seconds) + 90% complete (ETR: 3 seconds) + 100% complete (ETR: 0 seconds) + Compilation completed in 32.86 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:104) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:105) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:103) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 0 cached/archived units. Used 0 / 2719 units from cache. +Compiling... + 0% complete (ETR: ?) + 10% complete (ETR: 193 seconds) + 20% complete (ETR: 115 seconds) + 30% complete (ETR: 79 seconds) + 40% complete (ETR: 61 seconds) + 50% complete (ETR: 44 seconds) + 60% complete (ETR: 31 seconds) + 70% complete (ETR: 22 seconds) + 80% complete (ETR: 16 seconds) + 90% complete (ETR: 8 seconds) + 100% complete (ETR: 0 seconds) + Compilation completed in 84.41 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:104) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes +Public resources found in... + [WARN] Error processing classpath URL 'file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar' +java.net.URISyntaxException: Illegal character in path at index 26: file:/Applications/eclipse 4.3/plugins/com.google.gdt.eclipse.designer.hosted.2_2_3.1.2.r43x201303061525/gwt-dev-designtime.jar + at java.net.URI$Parser.fail(URI.java:2829) + at java.net.URI$Parser.checkChars(URI.java:3002) + at java.net.URI$Parser.parseHierarchical(URI.java:3086) + at java.net.URI$Parser.parse(URI.java:3034) + at java.net.URI.(URI.java:595) + at java.net.URL.toURI(URL.java:938) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.addAllClassPathEntries(ResourceOracleImpl.java:323) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.getAllClassPathEntries(ResourceOracleImpl.java:358) + at com.google.gwt.dev.resource.impl.ResourceOracleImpl.(ResourceOracleImpl.java:402) + at com.google.gwt.dev.cfg.ModuleDef.normalize(ModuleDef.java:545) + at com.google.gwt.dev.cfg.ModuleDefLoader.doLoadModule(ModuleDefLoader.java:199) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromResources(ModuleDefLoader.java:169) + at com.google.gwt.dev.cfg.ModuleDefLoader.loadFromClassPath(ModuleDefLoader.java:141) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.loadModule(HostedModeSupportImpl.java:85) + at com.google.gwt.dev.shell.designtime.HostedModeSupportImpl.createModuleSpaceHost(HostedModeSupportImpl.java:64) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.hosted.tdt.HostedModeSupport.createModuleSpaceHost(HostedModeSupport.java:447) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:606) + at org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils.invokeMethod(ReflectionUtils.java:869) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:125) + at com.google.gdt.eclipse.designer.WarmUpSupport.warmUpHostedMode(WarmUpSupport.java:105) + at com.google.gdt.eclipse.designer.WarmUpSupport.doWarmUp(WarmUpSupport.java:84) + at com.google.gdt.eclipse.designer.Activator.earlyStartup(Activator.java:190) + at org.eclipse.ui.internal.EarlyStartupRunnable.runEarlyStartup(EarlyStartupRunnable.java:87) + at org.eclipse.ui.internal.EarlyStartupRunnable.run(EarlyStartupRunnable.java:73) + at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) + at org.eclipse.ui.internal.Workbench$55.run(Workbench.java:2552) + at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53) +Translatable source found in... +Found 2719 cached/archived units. Used 2719 / 2719 units from cache. +Compiling... + Compilation completed in 0.00 seconds +Removing invalidated units +Finding entry point classes diff --git a/META-INF/clientlog4j.properties b/META-INF/clientlog4j.properties index 9f60917..574c7b1 100644 --- a/META-INF/clientlog4j.properties +++ b/META-INF/clientlog4j.properties @@ -8,4 +8,6 @@ log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n # Print only messages of level TRACE or above in the package org.gcube log4j.logger.org.gcube=TRACE log4j.logger.org.gcube.application.framework.core.session=INFO -log4j.logger.com.netflix.astyanax.connectionpool=ERROR \ No newline at end of file +log4j.logger.com.netflix.astyanax.connectionpool=ERROR +log4j.logger.org.gcube.portal.databook.server.DBCassandraAstyanaxImpl=TRACE +log4j.logger.org.gcube.common=ERROR \ No newline at end of file diff --git a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java index f5c9821..db19cce 100644 --- a/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java +++ b/src/main/java/org/gcube/portal/databook/server/DBCassandraAstyanaxImpl.java @@ -17,6 +17,7 @@ import org.gcube.portal.databook.shared.Notification; import org.gcube.portal.databook.shared.NotificationChannelType; import org.gcube.portal.databook.shared.NotificationType; import org.gcube.portal.databook.shared.PrivacyLevel; +import org.gcube.portal.databook.shared.RangeFeeds; import org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException; import org.gcube.portal.databook.shared.ex.CommentIDNotFoundException; import org.gcube.portal.databook.shared.ex.FeedIDNotFoundException; @@ -634,37 +635,44 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore { * {@inheritDoc} */ @Override - public List getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException { + public RangeFeeds getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException { if (from < 1) { throw new IllegalArgumentException("From must be greather than 0"); } - ArrayList toReturn = new ArrayList(); + ArrayList feedsToReturn = new ArrayList(); ArrayList feedIDs = getVREFeedIds(vreid); //if from is greater than feeds size return empty if (from >= feedIDs.size()) { _log.warn("The starting point of the range is greather than the total number of feeds for this timeline: " + from + " >= " + feedIDs.size()); - return new ArrayList(); + return new RangeFeeds(); } - int upTo = from + quantity; - //check if upTo is greater than user feeds total - upTo = (upTo > feedIDs.size()) ? feedIDs.size() : upTo; - + int rangeStart = feedIDs.size()-from; + int rangeEnd = rangeStart-quantity; + + //check that you reached the end + if (rangeEnd<1) + rangeEnd = 0; + + _log.debug("BEFORE starting Point=" + rangeStart + " rangeEnd= " + rangeEnd); //need them in reverse order - for (int i = feedIDs.size()-from; i >= (feedIDs.size()-(upTo-1)); i--) { + int howMany = from; + for (int i = rangeStart; i > rangeEnd; i--) { Feed toAdd = readFeed(feedIDs.get(i)); if (toAdd.getType() == FeedType.TWEET || toAdd.getType() == FeedType.SHARE || toAdd.getType() == FeedType.PUBLISH) { - toReturn.add(toAdd); - _log.trace("Read recent feed: " + feedIDs.get(i)); + feedsToReturn.add(toAdd); + _log.trace("Read recent feed, i=" + i + " id= " + feedIDs.get(i)); } else { - _log.trace("Read and skipped feed: " + feedIDs.get(i) + " (Removed Feed) ."); - upTo += 1; //increase the upTo in case of removed feed + _log.trace("Read and skipped feed, i=" + i + " id=: " + feedIDs.get(i) + " (Removed Feed) ."); + rangeEnd -= 1; //increase the upTo in case of removed feed //check if quantity is greater than user feeds - upTo = (upTo > feedIDs.size()) ? feedIDs.size() : upTo; + rangeEnd = (rangeEnd > 0) ? rangeEnd : 0; } + howMany++; } - return toReturn; + _log.debug("AFTER: starting Point==" + rangeStart + " rangeEnd= " + rangeEnd); + return new RangeFeeds(howMany+1, feedsToReturn); } /** * get a list of user vre feed UUIDs in chronological order from the oldest to the more recent diff --git a/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java b/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java index 043a1e0..211d161 100644 --- a/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java +++ b/src/main/java/org/gcube/portal/databook/server/DatabookCassandraTest.java @@ -17,6 +17,7 @@ import org.gcube.portal.databook.shared.Notification; import org.gcube.portal.databook.shared.NotificationChannelType; import org.gcube.portal.databook.shared.NotificationType; import org.gcube.portal.databook.shared.PrivacyLevel; +import org.gcube.portal.databook.shared.RangeFeeds; import org.gcube.portal.databook.shared.ex.FeedIDNotFoundException; import org.gcube.portal.databook.shared.ex.NotificationChannelTypeNotFoundException; import org.gcube.portal.databook.shared.ex.NotificationTypeNotFoundException; @@ -284,10 +285,17 @@ public class DatabookCassandraTest { try { System.out.println("/gcube/devsec/devVRE TIMELINE: "); - List recentFeeds = store.getRecentFeedsByVREAndRange("/gcube/devsec/TestVREFolder2", 1, 200); - assertNotNull(recentFeeds); - for (Feed recFeed :recentFeeds) - System.out.println(recFeed); + int from = 1; + for (int i = 0; i < 5; i++) { + System.out.println("\nFROM="+from); + RangeFeeds range = store.getRecentFeedsByVREAndRange("/gcube/devsec/TestVREFolder2", from, 5); + List recentFeeds = range.getFeeds(); + assertNotNull(recentFeeds); + for (Feed recFeed :recentFeeds) + System.out.println("->"+recFeed.getDescription()); + from = range.getLastReturnedFeedTimelineIndex()-1; + } + // System.out.println("PORTAL TIMELINE: "); // recentFeeds = store.getAllPortalPrivacyLevelFeeds(); diff --git a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java index d6b85ce..2fc7cdc 100644 --- a/src/main/java/org/gcube/portal/databook/server/DatabookStore.java +++ b/src/main/java/org/gcube/portal/databook/server/DatabookStore.java @@ -9,6 +9,7 @@ import org.gcube.portal.databook.shared.Like; import org.gcube.portal.databook.shared.Notification; import org.gcube.portal.databook.shared.NotificationChannelType; import org.gcube.portal.databook.shared.NotificationType; +import org.gcube.portal.databook.shared.RangeFeeds; import org.gcube.portal.databook.shared.ex.ColumnNameNotFoundException; import org.gcube.portal.databook.shared.ex.CommentIDNotFoundException; import org.gcube.portal.databook.shared.ex.FeedIDNotFoundException; @@ -137,16 +138,19 @@ public interface DatabookStore { */ List getRecentFeedsByVRE(String vreid, int quantity) throws IllegalArgumentException, PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException; /** - * return the most recent feeds for this vre up to quantity param + * return the most recent feeds for this vre up to quantity param and the last index of the feeds in the timeline + * lastReturnedFeedTimelineIndex is usuful to know from where to start the range the second time you ask + * because there are deletions + * * @param vreid VRES identifier * @param from the range start (most recent feeds for this vre) has to be greater than 0 * @param quantity the number of most recent feeds for this vre starting from "from" param - * @return a List of most recent feeds for this vre + * @return a lastReturnedFeedTimelineIndex containing of most recent feeds for this vre * @throws FeedTypeNotFoundException * @throws PrivacyLevelTypeNotFoundException * @throws ColumnNameNotFoundException */ - List getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException; + RangeFeeds getRecentFeedsByVREAndRange(String vreid, int from, int quantity) throws PrivacyLevelTypeNotFoundException, FeedTypeNotFoundException, ColumnNameNotFoundException, FeedIDNotFoundException; /** * save a Notification instance in the store * @return true if everything went fine diff --git a/src/main/java/org/gcube/portal/databook/shared/RangeFeeds.java b/src/main/java/org/gcube/portal/databook/shared/RangeFeeds.java new file mode 100644 index 0000000..58e8a6d --- /dev/null +++ b/src/main/java/org/gcube/portal/databook/shared/RangeFeeds.java @@ -0,0 +1,40 @@ +package org.gcube.portal.databook.shared; + +import java.io.Serializable; +import java.util.ArrayList; +/** + * + * @author Massimiliano Assante, ISTI-CNR + * + */ +@SuppressWarnings("serial") +public class RangeFeeds implements Serializable { + + private int lastReturnedFeedTimelineIndex; + private ArrayList feeds; + + public RangeFeeds() { + super(); + } + + public RangeFeeds(int lastReturnedFeedTimelineIndex, ArrayList feeds) { + super(); + this.lastReturnedFeedTimelineIndex = lastReturnedFeedTimelineIndex; + this.feeds = feeds; + } + + public int getLastReturnedFeedTimelineIndex() { + return lastReturnedFeedTimelineIndex; + } + public void setLastReturnedFeedTimelineIndex(int lastReturnedFeedTimelineIndex) { + this.lastReturnedFeedTimelineIndex = lastReturnedFeedTimelineIndex; + } + public ArrayList getFeeds() { + return feeds; + } + public void setFeeds(ArrayList feeds) { + this.feeds = feeds; + } + + +}