From 38d30cd4f69178cef983ec13262a6f02826a9a45 Mon Sep 17 00:00:00 2001 From: abranson Date: Wed, 28 Sep 2011 14:19:34 +0200 Subject: Schema and resource --- .classpath | 4 +- changelog | 1 + resources/boot/OD/CristalModule.xsd | 149 ++++++++++++++++++++++++++++++++ source/com/c2kernel/utils/Resource.java | 39 ++------- 4 files changed, 161 insertions(+), 32 deletions(-) mode change 100755 => 100644 changelog create mode 100644 resources/boot/OD/CristalModule.xsd diff --git a/.classpath b/.classpath index 79ed770..86010e1 100644 --- a/.classpath +++ b/.classpath @@ -7,13 +7,13 @@ - - + + diff --git a/changelog b/changelog old mode 100755 new mode 100644 index 0fcaa3f..9bdb497 --- a/changelog +++ b/changelog @@ -1,3 +1,4 @@ +Build 6 - Module support Build 5 - Java 1.6 Compliance Build 4 - First GIT commit - WF: Added 'AlwaysUseOutcome' activity property to require an outcome for every state change diff --git a/resources/boot/OD/CristalModule.xsd b/resources/boot/OD/CristalModule.xsd new file mode 100644 index 0000000..348ab8b --- /dev/null +++ b/resources/boot/OD/CristalModule.xsd @@ -0,0 +1,149 @@ + + + + + + + + + Module Metadata + + + + + + + + + + + + + Configuration parameters to add to the Cristal VM on launch. May target either client or server processes. + + + + + + + + + + + + + + + + + + + + + + + Items to import into or verify within the Cristal server upon launch. + + + + + + + + + + + + + + + A composite activity outcome. + + + + + + + + + + + + Elementary activities + + + + + + + + + + + + Elementary activities + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Prefix for module components + + + + + + + + + + + + + + + + + + + + + + diff --git a/source/com/c2kernel/utils/Resource.java b/source/com/c2kernel/utils/Resource.java index 361549d..ba2f71a 100644 --- a/source/com/c2kernel/utils/Resource.java +++ b/source/com/c2kernel/utils/Resource.java @@ -3,6 +3,7 @@ package com.c2kernel.utils; //Java import java.net.MalformedURLException; import java.net.URL; +import java.util.ArrayList; import java.util.Hashtable; import javax.swing.ImageIcon; @@ -17,13 +18,9 @@ import com.c2kernel.common.ObjectNotFoundException; public class Resource { static private Hashtable txtCache = new Hashtable(); static private Hashtable imgCache = new Hashtable(); - static private URL baseURL = null; - static private URL domainBaseURL = null; - static private URL importURL = null; + static private URL baseURL = getURLorResURL("com/c2kernel/utils/resources/"); + static private ArrayList domainBaseURL = new ArrayList(); static public ImageIcon nullImg = new ImageIcon(new byte[] { 0 }); - static { - setKernelBaseURL("com/c2kernel/utils/resources/"); - } /* * Kernel Resource URL section @@ -32,10 +29,6 @@ public class Resource { baseURL = getURLorResURL(newBaseURL); } - public static void setKernelBaseURL(URL newBaseURL) { - baseURL = newBaseURL; - } - public static URL getKernelBaseURL() { return baseURL; } @@ -43,19 +36,20 @@ public class Resource { static public URL getKernelResourceURL(String resName) throws MalformedURLException { return new URL(baseURL, resName); } + /* * Domain Resource URL section */ - public static void setDomainBaseURL(URL newBaseURL) { - domainBaseURL = newBaseURL; + public static void addDomainBaseURL(URL newBaseURL) { + domainBaseURL.add(newBaseURL); } - public static void setDomainBaseURL(String newBaseURL) { - domainBaseURL = getURLorResURL(newBaseURL); + public static void addDomainBaseURL(String newBaseURL) { + addDomainBaseURL(getURLorResURL(newBaseURL)); } - public static URL getDomainBaseURL() { + public static ArrayList getDomainBaseURL() { return domainBaseURL; } @@ -153,21 +147,6 @@ public class Resource { return newImg; } - - /** - * Retrieves the stored import URL - * @return - */ - public static URL getImportURL() { - return importURL; - } - - /** - * @param url - */ - public static void setImportURL(URL url) { - importURL = url; - } static public String getDomainVersion() { try { return FileStringUtility.url2String(getDomainResourceURL("version.txt")); -- cgit v1.2.3