Advertisement
logicmoo

Untitled

Dec 11th, 2013
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.89 KB | None | 0 0
  1. Index: maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/app/puma/boot/PumaAppContext.java
  2. ===================================================================
  3. --- maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/app/puma/boot/PumaAppContext.java   (revision 1357)
  4. +++ maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/app/puma/boot/PumaAppContext.java   (working copy)
  5. @@ -69,7 +69,7 @@
  6.         myRegClient = new PumaRegistryClientImpl(bc, mediator);
  7.         advertisePumaRegClient(myRegClient);
  8.         myBundleContext = bc;
  9. -
  10. +       getBundleContext();
  11.         BoxSpace bs = myRegClient.getTargetBoxSpace(null);
  12.         myPCCB = new PumaContextCommandBox(this);
  13.         bs.addBox(ctxID, myPCCB);
  14. @@ -84,6 +84,8 @@
  15.     }
  16.    
  17.     public BundleContext getBundleContext() {
  18. +       if (myBundleContext == null)
  19. +           throw new NullPointerException("myBundleContext");
  20.         return myBundleContext;
  21.     }
  22.  
  23. @@ -121,6 +123,7 @@
  24.     protected RepoClient getOrMakeMainConfigRC() {
  25.         final PumaConfigManager pcm = getConfigManager();
  26.         PumaContextMediator mediator = getMediator();
  27. +       BundleContext myBundleContext = getBundleContext();
  28.         RepoClient repoCli = pcm.getOrMakeMainConfigRepoClient(mediator, myBundleContext);
  29.         return repoCli;
  30.     }
  31. @@ -145,6 +148,7 @@
  32.     public void startRepositoryConfigServices() {
  33.         PumaConfigManager pcm = getConfigManager();
  34.         PumaContextMediator mediator = myRegClient.getCtxMediator(null);
  35. +       BundleContext myBundleContext = getBundleContext();
  36.         // This would happen by default anyway, if there were not already a MainConfigRepoClient in place.
  37.         pcm.applyDefaultRepoClientAsMainConfig(mediator, myBundleContext);
  38.         // This method performs the configuration actions associated with the developmental "Global Mode" concept
  39. @@ -323,6 +327,7 @@
  40.         // Below is needed for Lifter to obtain dependency from LifterLifecycle
  41.         // Will revisit once repo functionality stabilizes a bit
  42.         //PumaConfigManager.startRepoClientLifecyle(myBundleContext, rc);
  43. +       BundleContext myBundleContext = getBundleContext();
  44.         pgmm.startGlobalConfigService(myBundleContext);
  45.     }
  46.  
  47. Index: maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/bundle/app/puma/PumaAppUtils.java
  48. ===================================================================
  49. --- maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/bundle/app/puma/PumaAppUtils.java   (revision 1357)
  50. +++ maven/org.cogchar.bundle.app.puma/src/main/java/org/cogchar/bundle/app/puma/PumaAppUtils.java   (working copy)
  51. @@ -15,6 +15,7 @@
  52.   */
  53.  package org.cogchar.bundle.app.puma;
  54.  import java.util.List;
  55. +import java.io.PrintStream;
  56.  import org.appdapter.core.log.BasicDebugger;
  57.  import org.appdapter.core.name.FreeIdent;
  58.  import org.appdapter.core.name.Ident;
  59. @@ -46,6 +47,7 @@
  60.   */
  61.  public class PumaAppUtils extends BasicDebugger {
  62.     static Logger theLogger = LoggerFactory.getLogger(PumaAppUtils.class);
  63. +   private static GreedyHandleSet firstGreedyHandleSet;
  64.  
  65.     /**
  66.      * This is a crude handle-grabbing entry pont, which assumes "the application"
  67. @@ -79,9 +81,23 @@
  68.  
  69.    
  70.     public static List<FancyFile> getKnownAnimationFiles() {
  71. -       GreedyHandleSet srec = new GreedyHandleSet();
  72. +       GreedyHandleSet srec = PumaAppUtils.obtainGreedyHandleSet();
  73.         return AnimFileSpecReader.findAnimFileSpecsForJava(srec.animBCE);
  74.     }
  75. +
  76. +   public static int checkAnimationFiles(PrintStream infoStream) {
  77. +       List<FancyFile> animFiles = getKnownAnimationFiles();
  78. +       theLogger.info("Got anim files: {}", animFiles);
  79. +       for (FancyFile ff : animFiles) {
  80. +           Ident animID = ff.mySpec().getIdent();
  81. +           String fullPath = ff.myResolvedFullPath();
  82. +           if (infoStream != null) {
  83. +               infoStream.println(" " + animID + " = " + fullPath);
  84. +           }
  85. +       }
  86. +       return animFiles.size();
  87. +   }
  88. +
  89.     public static   void startSillyMotionComputersDemoForVWorldOnly(BundleContext bundleCtx, Robot.Id optRobotID_elseAllRobots) {
  90.         List<CogcharMotionSource> cogMotSrcList = CogcharMotionSource.findCogcharMotionSources(bundleCtx, optRobotID_elseAllRobots);
  91.         for (CogcharMotionSource cms : cogMotSrcList) {
  92. @@ -93,7 +109,7 @@
  93.         }
  94.     }
  95.     public static   void attachVWorldRenderModule(BundleContext bundleCtx, RenderModule rMod, Ident optVWorldSpecID) {
  96. -       GreedyHandleSet srec = new GreedyHandleSet();  
  97. +       GreedyHandleSet srec = PumaAppUtils.obtainGreedyHandleSet();
  98.         PumaVirtualWorldMapper pvwm = srec.pumaRegClient.getVWorldMapper(optVWorldSpecID);
  99.         if (pvwm != null) {
  100.             pvwm.attachRenderModule(rMod);
  101. @@ -101,4 +117,16 @@
  102.             theLogger.error("Cannot find VWorld to attach renderModel [optVWorldSpecID={}]", optVWorldSpecID);
  103.         }
  104.     }
  105. +
  106. +   public static GreedyHandleSet obtainGreedyHandleSet() {
  107. +       if (firstGreedyHandleSet == null) {
  108. +           try {
  109. +               firstGreedyHandleSet = new GreedyHandleSet();
  110. +           } catch (Exception e) {
  111. +               e.printStackTrace();
  112. +               theLogger.error("" + e, e);
  113. +           }
  114. +       }
  115. +       return firstGreedyHandleSet;
  116. +   }
  117.  }
  118. Index: maven/org.cogchar.bundle.bind.joseki/src/main/java/org/cogchar/joswrap/ModJosDatasetDesc.java
  119. ===================================================================
  120. --- maven/org.cogchar.bundle.bind.joseki/src/main/java/org/cogchar/joswrap/ModJosDatasetDesc.java   (revision 1357)
  121. +++ maven/org.cogchar.bundle.bind.joseki/src/main/java/org/cogchar/joswrap/ModJosDatasetDesc.java   (working copy)
  122. @@ -83,7 +83,11 @@
  123.          // From pool.
  124.          try
  125.          {
  126. -            log.debug("Take from pool") ;
  127. +           if (pool==null) {
  128. +               log.warn("initializing pool") ;
  129. +               initialize();
  130. +           }
  131. +           log.warn("Take from pool") ;
  132.              return pool.takeFirst() ;
  133.          } catch (InterruptedException ex)
  134.          {
  135. Index: maven/org.cogchar.bundle.bind.lift/src/main/java/org/cogchar/bundle/bind/lift/Activator.java
  136. ===================================================================
  137. --- maven/org.cogchar.bundle.bind.lift/src/main/java/org/cogchar/bundle/bind/lift/Activator.java    (revision 1357)
  138. +++ maven/org.cogchar.bundle.bind.lift/src/main/java/org/cogchar/bundle/bind/lift/Activator.java    (working copy)
  139. @@ -6,7 +6,11 @@
  140.  public class Activator implements BundleActivator {
  141.  
  142.      public void start(BundleContext context) throws Exception {
  143. -        // TODO add activation code here
  144. +       // the pom never defines a bundle activator!  if it ever does.. lets exit
  145. +       String myName = super.getClass().getName();
  146. +       new RuntimeException(myName + myName + " \n" + myName).printStackTrace();
  147. +       //  System.console().readLine();
  148. +       //  System.exit(-1);
  149.      }
  150.  
  151.      public void stop(BundleContext context) throws Exception {
  152. Index: maven/org.cogchar.bundle.bind.lift/src/main/scala/bootstrap/liftweb/Boot.scala
  153. ===================================================================
  154. --- maven/org.cogchar.bundle.bind.lift/src/main/scala/bootstrap/liftweb/Boot.scala  (revision 1357)
  155. +++ maven/org.cogchar.bundle.bind.lift/src/main/scala/bootstrap/liftweb/Boot.scala  (working copy)
  156. @@ -30,9 +30,17 @@
  157.   * A class that's instantiated early and run.  It allows the application
  158.   * to modify lift's environment
  159.   */
  160. -class Boot {
  161. +class Boot extends Runnable {
  162.    
  163.    def boot {
  164. +    if (PageCommander.skipBootLifter) {
  165. +          PageCommander.skippedLifterRunable = this
  166. +          return
  167. +    }
  168. +    run
  169. +  }
  170. +
  171. +  def run {
  172.    
  173.     // where to search snippet
  174.     LiftRules.addToPackages("org.cogchar.lifter")
  175. Index: maven/org.cogchar.bundle.bind.lift/src/main/scala/org/cogchar/lifter/model/PageCommander.scala
  176. ===================================================================
  177. --- maven/org.cogchar.bundle.bind.lift/src/main/scala/org/cogchar/lifter/model/PageCommander.scala  (revision 1357)
  178. +++ maven/org.cogchar.bundle.bind.lift/src/main/scala/org/cogchar/lifter/model/PageCommander.scala  (working copy)
  179. @@ -26,6 +26,7 @@
  180.     import org.cogchar.lifter.view.TextBox
  181.     import org.cogchar.bind.lift.{ControlConfig, LiftAmbassador, LiftConfig}
  182.     import scala.collection.JavaConverters._
  183. +import java.lang.Boolean
  184.     // import org.cogchar.platform.trigger.CogcharActionBinding
  185.    
  186.     /**
  187. @@ -42,6 +43,10 @@
  188.     // project, if I knew what I know now!
  189.     object PageCommander extends LiftActor with ListenerManager with LifterLogger {
  190.        
  191. +     var skipBootLifter = false;
  192. +
  193. +     var skippedLifterRunable : java.lang.Runnable = null;
  194. +
  195.        def info(msg: String, params: Any*) {
  196.            myLogger.info(msg, params.map(_.asInstanceOf[Object]).toArray)
  197.        }
  198. Index: maven/org.cogchar.bundle.bind.robokind/src/main/java/org/cogchar/bind/rk/behavior/CCRK_ServiceChannelFactory.java
  199. ===================================================================
  200. --- maven/org.cogchar.bundle.bind.robokind/src/main/java/org/cogchar/bind/rk/behavior/CCRK_ServiceChannelFactory.java   (revision 1357)
  201. +++ maven/org.cogchar.bundle.bind.robokind/src/main/java/org/cogchar/bind/rk/behavior/CCRK_ServiceChannelFactory.java   (working copy)
  202. @@ -60,7 +60,7 @@
  203.  
  204.     private PerfChannel createSpeechChannel(Ident chanID, SpeechService speechSvc) {
  205.         getLogger().info("Creating SpeechOutChan at [{}] for [{}]", chanID, speechSvc);
  206. -       return new SpeechOutputClient(speechSvc, chanID);
  207. +       return (PerfChannel) new SpeechOutputClient(speechSvc, chanID);
  208.     }
  209.  
  210.     private PerfChannel createAnimationChannel(Ident chanID, AnimationPlayer animPlayerSvc) {
  211. Index: maven/org.cogchar.bundle.core/src/main/java/org/cogchar/bundle/core/CogcharCoreActivator.java
  212. ===================================================================
  213. --- maven/org.cogchar.bundle.core/src/main/java/org/cogchar/bundle/core/CogcharCoreActivator.java   (revision 1357)
  214. +++ maven/org.cogchar.bundle.core/src/main/java/org/cogchar/bundle/core/CogcharCoreActivator.java   (working copy)
  215. @@ -13,8 +13,8 @@
  216.   * @author Stu B. <www.texpedient.com>
  217.   */
  218.  public class CogcharCoreActivator  extends BundleActivatorBase {
  219. +    // consider not implementing anyhting in the class
  220.  
  221. -
  222.      @Override public void start(BundleContext context) throws Exception {
  223.         // We assume some other bundle has configured SLF4J for us.
  224.         super.start(context);  
  225. Index: maven/org.cogchar.lib.core.impl/src/main/java/org/cogchar/impl/thing/basic/BasicThingActionSpecBuilderTempFunctions.java
  226. ===================================================================
  227. --- maven/org.cogchar.lib.core.impl/src/main/java/org/cogchar/impl/thing/basic/BasicThingActionSpecBuilderTempFunctions.java    (revision 1357)
  228. +++ maven/org.cogchar.lib.core.impl/src/main/java/org/cogchar/impl/thing/basic/BasicThingActionSpecBuilderTempFunctions.java    (working copy)
  229. @@ -56,10 +56,22 @@
  230.     }
  231.      
  232.      //FROM AgentAmbassador
  233. -    private static final String repoBaseURL = "http://localhost:8080/cchr_josk/";
  234. -   private static final String repoBaseUpdURL = repoBaseURL + "sparql-update/";
  235. -   private static final String glueUpdURL = repoBaseUpdURL + "glue-ai";
  236. +   private static String repoBaseURL = "http://localhost:8080/cchr_josk/";
  237. +   private static String repoBaseUpdURL = repoBaseURL + "sparql-update/";
  238. +   private static String glueUpdURL = repoBaseUpdURL + "glue-ai";
  239. +
  240. +    public static void setRepoBaseURL(String newValue) {
  241. +   repoBaseURL = newValue;
  242. +   repoBaseUpdURL = repoBaseURL + "sparql-update/";
  243. +   glueUpdURL = repoBaseUpdURL + "glue-ai";
  244. +    }
  245.      
  246. +
  247. +    public static void setRepoUpdateURL(String newValue) {
  248. +   repoBaseUpdURL = newValue; // (repoBaseURL + "sparql-update/");
  249. +   glueUpdURL = repoBaseUpdURL + "glue-ai";
  250. +    }
  251. +    
  252.      //From WebDataClient
  253.      private String execPost (String url, List<NameValuePair> nvps, boolean debugFlag) {
  254.         String resultText = null;
  255. Index: maven/org.cogchar.lib.core.impl/src/main/scala/org/cogchar/impl/scene/GuardedBehavior.scala
  256. ===================================================================
  257. --- maven/org.cogchar.lib.core.impl/src/main/scala/org/cogchar/impl/scene/GuardedBehavior.scala (revision 1357)
  258. +++ maven/org.cogchar.lib.core.impl/src/main/scala/org/cogchar/impl/scene/GuardedBehavior.scala (working copy)
  259. @@ -206,7 +206,8 @@
  260.          guardSpecSet.add(guardSpec)
  261.        }
  262.        for (tag : Item <- taGuardItems) {
  263. -        val chanID : Ident = tag.getSingleLinkedItem(waitChanGuardProp, Item.LinkDirection.FORWARD).getIdent
  264. +        val chanID_Raw = tag.getSingleLinkedItem(waitChanGuardProp, Item.LinkDirection.FORWARD) // expanded for safty
  265. +        val chanID : Ident = if( chanID_Raw != null ) { chanID_Raw.getIdent } else null
  266.          val filterID_RawSet = tag.getLinkedItemSet(chanFilterProp, Item.LinkDirection.FORWARD);// expanded for safty
  267.          val filterID : Ident = if( filterID_RawSet != null && !filterID_RawSet.isEmpty ) {
  268.            filterID_RawSet.head.getIdent
  269. @@ -218,9 +219,12 @@
  270.  //        for (filter : Item <- filterItems) {
  271.  //          filter.getIdent
  272.  //        }
  273. -
  274. +        if (chanID != null && filterID != null) {
  275.          val guardSpec = new ThingActionGuardSpec(chanID, filterID)
  276.          guardSpecSet.add(guardSpec)
  277. +        } else {
  278. +          getLogger.error("Unable to use guard for {}" , configItem)
  279. +        }
  280.        }
  281.  
  282.        val stepSpec = new GuardedStepSpec(stepIdent, actionSpec, guardSpecSet.toSet) // offsetMillisec, actionSpec);
  283. Index: maven/org.cogchar.lib.render.hominoid/src/main/java/org/cogchar/render/app/humanoid/HumanoidPuppetApp.java
  284. ===================================================================
  285. --- maven/org.cogchar.lib.render.hominoid/src/main/java/org/cogchar/render/app/humanoid/HumanoidPuppetApp.java  (revision 1357)
  286. +++ maven/org.cogchar.lib.render.hominoid/src/main/java/org/cogchar/render/app/humanoid/HumanoidPuppetApp.java  (working copy)
  287. @@ -41,6 +41,15 @@
  288.         HumanoidPuppetApp app = new HumanoidPuppetApp(bce);
  289.         app.start();
  290.     }
  291. +
  292. +   @Override public void update() {
  293. +       try {
  294. +           super.update();
  295. +       } catch (Exception e) {
  296. +           e.printStackTrace();
  297. +       }
  298. +   }
  299. +
  300.     public HumanoidPuppetApp(RenderConfigEmitter rce) {
  301.         super(rce);        
  302.     }
  303. Index: maven/org.cogchar.lib.render.impl/pom.xml
  304. ===================================================================
  305. --- maven/org.cogchar.lib.render.impl/pom.xml   (revision 1357)
  306. +++ maven/org.cogchar.lib.render.impl/pom.xml   (working copy)
  307. @@ -17,9 +17,6 @@
  308.     <packaging>jar</packaging>
  309.  
  310.  
  311. -
  312. -
  313. -
  314.     <dependencies>
  315.  
  316.         <dependency>
  317. Index: maven/org.cogchar.modules.main/pom.xml
  318. ===================================================================
  319. --- maven/org.cogchar.modules.main/pom.xml  (revision 1357)
  320. +++ maven/org.cogchar.modules.main/pom.xml  (working copy)
  321. @@ -193,6 +193,20 @@
  322.                     </plugin>
  323.                     <plugin>
  324.                         <groupId>org.apache.maven.plugins</groupId>
  325. +                        <artifactId>maven-gpg-plugin</artifactId>
  326. +                        <version>1.4</version>
  327. +                        <executions>
  328. +                            <execution>
  329. +                                <id>sign-artifacts</id>
  330. +                                <phase>deploy</phase>
  331. +                                <goals>
  332. +                                    <goal>sign</goal>
  333. +                                </goals>
  334. +                            </execution>
  335. +                        </executions>
  336. +                    </plugin>
  337. +                   <plugin>
  338. +                       <groupId>org.apache.maven.plugins</groupId>
  339.                         <artifactId>maven-assembly-plugin</artifactId>
  340.                         <version>2.2</version>
  341.                         <executions>
  342. @@ -223,6 +237,17 @@
  343.                     <version>4.2.1</version>
  344.                     <scope>provided</scope>
  345.                 </dependency>
  346. +               <dependency>
  347. +                   <groupId>org.slf4j</groupId>
  348. +                   <artifactId>slf4j-api</artifactId>
  349. +                   <version>1.7.5</version>
  350. +               </dependency>
  351. +               <dependency>
  352. +                   <groupId>org.slf4j</groupId>
  353. +                   <artifactId>slf4j-log4j12</artifactId>
  354. +                   <version>1.7.5</version>
  355. +               </dependency>
  356. +
  357.                  <!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
  358.             </dependencies>
  359.             <build>
  360. Index: maven/org.cogchar.nbui.render/pom.xml
  361. ===================================================================
  362. --- maven/org.cogchar.nbui.render/pom.xml   (revision 1357)
  363. +++ maven/org.cogchar.nbui.render/pom.xml   (working copy)
  364. @@ -122,19 +122,31 @@
  365.             <version>${project.version}</version>
  366.         </dependency>
  367.         <dependency>
  368. +            <artifactId>ext.bundle.apache_httpclient</artifactId>
  369. +            <groupId>org.appdapter</groupId>
  370. +            <type>jar</type>
  371. +            <version>${appdapter.version}</version>
  372. +        </dependency>
  373. +       <!--dependency>
  374.             <groupId>org.apache.httpcomponents</groupId>
  375.             <artifactId>httpclient-osgi</artifactId>
  376. -           <version>4.3</version>
  377. +           <version>${httpclient.version}</version>
  378.         </dependency>
  379.         <dependency>
  380.             <groupId>org.apache.httpcomponents</groupId>
  381.             <artifactId>httpcore-osgi</artifactId>
  382. -           <version>4.3</version>
  383. -       </dependency>      
  384. +            <version>${httpcore.version}</version>
  385. +       </dependency-->    
  386.         <dependency>
  387.             <groupId>org.ow2.bundles</groupId>
  388.             <artifactId>ow2-bundles-externals-commons-logging</artifactId>
  389.             <version>1.0.33</version>
  390. +            <exclusions>
  391. +                <exclusion>
  392. +                    <artifactId>commons-logging</artifactId>
  393. +                    <groupId>commons-logging</groupId>
  394. +                </exclusion>
  395. +            </exclusions>
  396.         </dependency>
  397.         <dependency>
  398.             <artifactId>ext.bundle.xml.dom4j_161</artifactId>
  399. Index: maven/org.cogchar.nbui.render/src/main/java/org/cogchar/nbui/render/trigger/TriggerPanel.java
  400. ===================================================================
  401. --- maven/org.cogchar.nbui.render/src/main/java/org/cogchar/nbui/render/trigger/TriggerPanel.java   (revision 1357)
  402. +++ maven/org.cogchar.nbui.render/src/main/java/org/cogchar/nbui/render/trigger/TriggerPanel.java   (working copy)
  403. @@ -16,7 +16,9 @@
  404.  
  405.  package org.cogchar.nbui.render.trigger;
  406.  
  407. -import org.cogchar.svc.behav.control.ActionCallbackMap;
  408. +import org.jflux.api.core.Listener;
  409. +import org.cogchar.svc.behav.control.*;
  410. +
  411.  import java.awt.FlowLayout;
  412.  import java.awt.event.ActionListener;
  413.  import java.util.HashMap;
  414. Index: pom.xml
  415. ===================================================================
  416. --- pom.xml (revision 1357)
  417. +++ pom.xml (working copy)
  418. @@ -15,6 +15,16 @@
  419.    
  420.     http://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
  421.     -->
  422. +
  423. +<!-- #IF LIVEPROFILER
  424. +    <parent>
  425. +      <groupId>base.buildall</groupId>
  426. +          <artifactId>developer_workspace.root</artifactId>
  427. +          <relativePath>../buildhrkpom.xml</relativePath>
  428. +          <version>1.0.0-SNAPSHOT</version>
  429. +      </parent>
  430. +
  431. +#ELSE LIVEPROFILER -->
  432.     <parent>
  433.         <groupId>org.sonatype.oss</groupId>
  434.         <artifactId>oss-parent</artifactId>
  435. @@ -57,8 +67,8 @@
  436.         <jmonkey.version>3.0.0.20121220-SNAPSHOT</jmonkey.version>
  437.         <appdapter.msg.version>1.0.5</appdapter.msg.version>
  438.         <appdapter.version>1.1.4-SNAPSHOT</appdapter.version>
  439. -       <robokind.version>0.9.3</robokind.version>
  440. -       <jflux.version>0.1.7</jflux.version>
  441. +       <robokind.version>0.9.4-SNAPSHOT</robokind.version>
  442. +       <jflux.version>0.1.8-SNAPSHOT</jflux.version>
  443.         <scala.version>2.10.2</scala.version>
  444.         <netbeans.version>RELEASE721</netbeans.version>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement