You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by ri...@apache.org on 2009/07/13 15:26:06 UTC

svn commit: r793581 [11/23] - in /felix/trunk/sigil: ./ bld-ivy/ bld-ivy/example/ bld-ivy/example/dependence/ bld-ivy/example/dependence/dependee/ bld-ivy/example/dependence/dependee/src/ bld-ivy/example/dependence/dependee/src/standalone/ bld-ivy/exam...

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IRepositoryVisitor.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IRepositoryVisitor.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IRepositoryVisitor.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IRepositoryVisitor.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+
+public interface IRepositoryVisitor {
+	/**
+	 * Visit the next bundle in the repository. 
+	 * Return true if should continue visiting other bundles, false otherwise.
+	 * @param bundle
+	 * @return
+	 */
+	boolean visit(ISigilBundle bundle);
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolution.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolution.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolution.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolution.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.cauldron.sigil.model.IModelElement;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+
+public interface IResolution {
+	Set<ISigilBundle> getBundles();
+	ISigilBundle getProvider(IModelElement requirement);
+	List<IModelElement> getMatchedRequirements(ISigilBundle bundle);
+	void synchronize(IProgressMonitor monitor);
+	boolean isSynchronized();
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolutionMonitor.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolutionMonitor.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolutionMonitor.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/IResolutionMonitor.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+import org.cauldron.sigil.model.IModelElement;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+
+public interface IResolutionMonitor {
+	boolean isCanceled();
+	void startResolution(IModelElement requirement);
+	void endResolution(IModelElement requirement, ISigilBundle sigilBundle);
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryChangeEvent.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryChangeEvent.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryChangeEvent.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryChangeEvent.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+public class RepositoryChangeEvent {
+	public static enum Type { ADDED, CHANGED, REMOVED };
+	
+	private Type type;
+	private IBundleRepository repository;
+	
+	public RepositoryChangeEvent(IBundleRepository repository, Type type) {
+		this.repository = repository;
+		this.type = type;
+	}
+	
+	public Type getType() {
+		return type;
+	}
+	public IBundleRepository getRepository() {
+		return repository;
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryException.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryException.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryException.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/RepositoryException.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+public class RepositoryException extends Exception {
+
+	private static final long serialVersionUID = 1L;
+
+	public RepositoryException(String msg, Throwable cause) {
+		super(msg, cause);
+	}
+
+	public RepositoryException(String message) {
+		super(message);
+	}
+
+	public RepositoryException(Throwable cause) {
+		super(cause);
+	}
+
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionConfig.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionConfig.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionConfig.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionConfig.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+public class ResolutionConfig {
+	private int options;
+	
+	public static final int INCLUDE_DEPENDENTS = 1;
+	public static final int INCLUDE_OPTIONAL = 2;
+	public static final int IGNORE_ERRORS = 4;
+	/** Return only bundles that are indexed locally */
+	public static final int INDEXED_ONLY = 8;
+	/** Return only bundles that are stored or cached locally */
+	public static final int LOCAL_ONLY = 16;
+
+	public ResolutionConfig() {
+		this(INCLUDE_DEPENDENTS);
+	}
+	
+	public ResolutionConfig(int options) {
+		this.options = options;
+	}
+
+	public int getOptions() {
+		return options;
+	}
+
+	public boolean isDependents() {
+		return (options & INCLUDE_DEPENDENTS) != 0;
+	}
+
+	public boolean isIgnoreErrors() {
+		return (options & IGNORE_ERRORS) != 0;
+	}
+	
+	public boolean isOptional() {
+		return (options & INCLUDE_OPTIONAL) != 0;
+	}
+
+	public boolean isCalculateLocalDependencies() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionException.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionException.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionException.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionException.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+import org.cauldron.sigil.model.IModelElement;
+
+public class ResolutionException extends Exception {
+
+	private static final long serialVersionUID = 1L;
+	
+	private IModelElement[] parsed;
+	
+	public ResolutionException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public ResolutionException(String message) {
+		super(message);
+	}
+
+	public ResolutionException(Throwable cause) {
+		super(cause);
+	}
+
+	public ResolutionException(IModelElement root, IModelElement[] parsed) {
+		super(buildMessage(root, parsed));
+		this.parsed = parsed;
+	}
+	
+	private static String buildMessage(IModelElement root, IModelElement[] parsed) {
+		StringBuilder b = new StringBuilder();
+		b.append( "Failed to resolve " );
+		b.append( root );
+		
+		if ( parsed.length > 0 ) {
+			b.append( " due to missing provider for " );
+			b.append( parsed[parsed.length - 1] );
+		}
+		
+		return b.toString();
+	}
+
+	public IModelElement[] getParsed() {
+		return parsed;
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionMonitorAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionMonitorAdapter.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionMonitorAdapter.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.core/src/org/cauldron/sigil/repository/ResolutionMonitorAdapter.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.sigil.repository;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.cauldron.sigil.model.IModelElement;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+
+public class ResolutionMonitorAdapter implements IResolutionMonitor {
+
+	private IProgressMonitor monitor;
+	
+	public ResolutionMonitorAdapter(IProgressMonitor monitor) {
+		this.monitor = monitor;
+	}
+
+	public boolean isCanceled() {
+		return monitor.isCanceled();
+	}
+
+	public void startResolution(IModelElement requirement) {
+		monitor.subTask( "Resolving " + requirement);
+	}
+
+	public void endResolution(IModelElement requirement, ISigilBundle provider) {
+		monitor.subTask( (provider == null ? "Failed to resolve " : "Resolved ") + requirement);
+	}
+
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+<?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>

Added: felix/trunk/sigil/org.cauldron.bld.obr/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/.project (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.bld.obr</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.jdt.core.prefs?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.jdt.core.prefs (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.jdt.core.prefs Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+#Wed Sep 10 14:14:56 BST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.pde.core.prefs
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.pde.core.prefs?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.pde.core.prefs (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/.settings/org.eclipse.pde.core.prefs Mon Jul 13 13:25:46 2009
@@ -0,0 +1,5 @@
+#Wed Sep 10 14:14:56 BST 2008
+eclipse.preferences.version=1
+pluginProject.equinox=false
+pluginProject.extensions=false
+resolve.requirebundle=false

Added: felix/trunk/sigil/org.cauldron.bld.obr/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,11 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Obr Plug-in
+Bundle-SymbolicName: org.cauldron.bld.obr
+Bundle-Version: 0.8.0.qualifier
+Bundle-Vendor: Paremus Ltd
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Require-Bundle: org.cauldron.bld.core;bundle-version="0.6.0",
+ org.eclipse.equinox.common;bundle-version="3.4.0"
+Import-Package: org.osgi.framework;version="1.4.0"
+Export-Package: org.cauldron.bld.obr

Added: felix/trunk/sigil/org.cauldron.bld.obr/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,4 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/AbstractOBRBundleRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/AbstractOBRBundleRepository.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/AbstractOBRBundleRepository.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/AbstractOBRBundleRepository.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.URL;
+import java.net.URLConnection;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.cauldron.sigil.repository.AbstractBundleRepository;
+
+public abstract class AbstractOBRBundleRepository extends AbstractBundleRepository {
+	private static SAXParserFactory factory = SAXParserFactory.newInstance();
+	
+	private URL obrURL;
+	private File obrlCache;
+	private File bundleCache;
+	private long updatePeriod;
+	
+	public AbstractOBRBundleRepository(String id, URL repositoryURL, File obrCache, File bundleCache, long updatePeriod) {
+		super(id);
+		this.obrURL = repositoryURL;
+		this.obrlCache = obrCache;
+		this.bundleCache = bundleCache;
+		this.updatePeriod = updatePeriod;
+	}
+	
+	public void refresh() {
+		obrlCache.delete();
+	}
+	
+	protected void readBundles(OBRListener listener) throws Exception {
+		syncOBRIndex();		
+		OBRHandler handler = new OBRHandler(getObrURL(), getBundleCache(), listener);
+		SAXParser parser = factory.newSAXParser();
+		parser.parse(getObrlCache(), handler );
+	}
+	
+	private void syncOBRIndex() {
+		if ( isUpdated() ) {
+			InputStream in = null;
+			OutputStream out = null;
+			
+			try {
+				URLConnection c = getObrURL().openConnection();
+				c.connect();
+				in = c.getInputStream();
+				out = new FileOutputStream(getObrlCache());
+				stream(in, out);
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				getObrlCache().setLastModified(0);
+			}
+			finally {
+				close(in, out);
+			}
+		}		
+	}
+
+	private void close(InputStream in, OutputStream out) {
+		if ( in != null ) {
+			try {
+				in.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+		if ( out != null ) {
+			try {
+				out.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+	}
+
+	private void stream(InputStream in, OutputStream out) throws IOException {
+		byte[] buf = new byte[1024];
+		for(;;) {
+			int r = in.read(buf);
+			if ( r == -1 ) {
+				break;
+			}
+			out.write(buf, 0, r);
+		}
+		out.flush();
+	}
+
+	private boolean isUpdated() {
+		if ( !getObrlCache().exists() ) {
+			return true;
+		}
+		
+		return getObrlCache().lastModified() + getUpdatePeriod() < System.currentTimeMillis();
+	}
+
+	public URL getObrURL() {
+		return obrURL;
+	}
+
+	public File getObrlCache() {
+		return obrlCache;
+	}
+
+	public File getBundleCache() {
+		return bundleCache;
+	}
+
+	public long getUpdatePeriod() {
+		return updatePeriod;
+	}
+
+
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/CachingOBRBundleRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/CachingOBRBundleRepository.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/CachingOBRBundleRepository.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/CachingOBRBundleRepository.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.io.File;
+import java.lang.ref.SoftReference;
+import java.net.URL;
+import java.util.LinkedList;
+import java.util.List;
+
+
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.repository.IRepositoryVisitor;
+
+public class CachingOBRBundleRepository extends AbstractOBRBundleRepository {
+
+	private SoftReference<List<ISigilBundle>> bundles;
+	
+	public CachingOBRBundleRepository(String id, URL repositoryURL, File obrCache, File bundleCache, long updatePeriod) {
+		super(id, repositoryURL, obrCache, bundleCache, updatePeriod);
+	}
+	
+	@Override
+	public void accept(IRepositoryVisitor visitor, int options) {
+		for ( ISigilBundle b : loadFromCache(options) ) {
+			if ( !visitor.visit(b) ) {
+				break;
+			}
+		}
+	}
+	
+	public synchronized void refresh() {
+		super.refresh();
+		if ( bundles != null ) {
+			bundles.clear();
+			notifyChange();
+		}
+	}
+
+	private synchronized List<ISigilBundle> loadFromCache(int options) {
+		List<ISigilBundle> cached = bundles == null ? null : bundles.get();
+		if ( cached == null ) {
+			try {
+				final LinkedList<ISigilBundle> read = new LinkedList<ISigilBundle>();
+				readBundles(new OBRListener() {
+					public void handleBundle(ISigilBundle bundle) {
+						read.add(bundle);
+					}
+				});
+				cached = read;
+				bundles = new SoftReference<List<ISigilBundle>>(cached);
+			} catch (Exception e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			} 
+		}
+		
+		return cached;
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/NonCachingOBRBundleRepository.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/NonCachingOBRBundleRepository.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/NonCachingOBRBundleRepository.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/NonCachingOBRBundleRepository.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.io.File;
+import java.net.URL;
+
+import org.cauldron.bld.core.BldCore;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.repository.IRepositoryVisitor;
+
+public class NonCachingOBRBundleRepository extends AbstractOBRBundleRepository {
+
+	public static void main(String[] args) throws Exception {
+		String url = args[0];
+		String obr = args[1];
+		String cache = args[2];
+		String update = args[3];
+		BldCore.init();
+		NonCachingOBRBundleRepository rep = new NonCachingOBRBundleRepository( "main", new URL(url), new File(obr), new File(cache), Long.parseLong(update));
+		rep.accept(new IRepositoryVisitor() {
+			public boolean visit(ISigilBundle bundle) {
+				System.out.println( "Found " + bundle );
+				return true;
+			}
+		});
+	}
+	
+	public NonCachingOBRBundleRepository(String id, URL repositoryURL, File obrCache, File bundleCache, long updatePeriod) {
+		super(id, repositoryURL, obrCache, bundleCache, updatePeriod);
+	}
+
+	@Override
+	public void accept(final IRepositoryVisitor visitor, int options) {
+		try {
+			readBundles(new OBRListener() {
+				boolean visit = true;
+				public void handleBundle(ISigilBundle bundle) {
+					if ( visit ) {
+						visit = visitor.visit(bundle);
+					}
+				}
+			});
+		} catch (Exception e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+	}
+
+
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRHandler.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRHandler.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRHandler.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRHandler.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,289 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.cauldron.sigil.model.ModelElementFactory;
+import org.cauldron.sigil.model.common.LDAPExpr;
+import org.cauldron.sigil.model.common.LDAPParseException;
+import org.cauldron.sigil.model.common.LDAPParser;
+import org.cauldron.sigil.model.common.SimpleTerm;
+import org.cauldron.sigil.model.common.VersionRange;
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+import org.cauldron.sigil.model.osgi.IBundleModelElement;
+import org.cauldron.sigil.model.osgi.IPackageExport;
+import org.cauldron.sigil.model.osgi.IPackageImport;
+import org.cauldron.sigil.model.osgi.IRequiredBundle;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.osgi.framework.Version;
+import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+import org.xml.sax.helpers.DefaultHandler;
+
+final class OBRHandler extends DefaultHandler {
+	private static final String PACKAGE = "package";
+	private static final String URI = "uri";
+	private static final String PRESENTATION_NAME = "presentationname";
+	private static final String VERSION = "version";
+	private static final String SYMBOLIC_NAME = "symbolicname";
+	private final File cacheDir;
+	private final URL obrURL;
+	private final OBRListener listener;
+	
+	private HashSet<String> sanity = new HashSet<String>();
+	private Locator locator;
+	private ISigilBundle bundle;
+	private IPackageExport export;
+	
+	public OBRHandler(URL obrURL, File bundleCache, OBRListener listener) {
+		this.obrURL = obrURL;
+		this.cacheDir = bundleCache;
+		this.listener = listener;
+	}
+	
+    public void setDocumentLocator (Locator locator) {
+    	this.locator = locator;
+    }
+
+	public void startElement (String uri, String localName,
+			String qName, Attributes attributes) throws SAXException {
+		if ( "resource".equals( qName ) ) {
+			startResource(attributes);
+		}
+		else if ( "capability".equals( qName ) ) {
+			startCapability(attributes);
+		}
+		else if( "require".equals( qName ) ) {
+			startRequire(attributes);
+		}
+		else if ( "p".equals( qName ) ) {
+			startProperty(attributes);
+		}
+	}
+
+	public void endElement (String uri, String localName, String qName)
+	throws SAXException {
+		if ( "resource".equals( qName ) ) {
+			endResource();
+		}
+		else if ( "capability".equals( qName ) ) {
+			endCapability();
+		}
+		else if( "require".equals( qName ) ) {
+			endRequire();
+		}
+		else if ( "p".equals( qName ) ) {
+			endProperty();
+		}
+	}
+
+	private void startResource(Attributes attributes) throws SAXException {
+		try {
+			String uri = attributes.getValue("", URI);
+			if ( uri.endsWith( ".jar" ) ) {
+				if ( !sanity.add(uri) ) {
+					throw new RuntimeException(uri);
+				}
+				ISigilBundle b = ModelElementFactory.getInstance().newModelElement(ISigilBundle.class);
+				IBundleModelElement info = ModelElementFactory.getInstance().newModelElement(IBundleModelElement.class);
+				info.setSymbolicName(attributes.getValue("", SYMBOLIC_NAME));
+				info.setVersion(new Version(attributes.getValue("", VERSION)));
+				info.setName(attributes.getValue("", PRESENTATION_NAME));
+				URI	l = makeAbsolute(uri);
+				info.setUpdateLocation(l);
+				b.setLocation(cachePath(info));
+				b.setBundleInfo(info);
+				bundle = b;
+			}
+		}
+		catch (Exception e) {
+			throw new SAXParseException("Failed to build bundle info", locator, e);
+		}
+	}
+
+	private URI makeAbsolute(String uri) throws URISyntaxException {
+		URI l = new URI(uri);
+		if ( !l.isAbsolute() ) {
+			String base = obrURL.toExternalForm();
+			int i = base.lastIndexOf("/");
+			if ( i != -1 ) {
+				base = base.substring(0, i);
+				l = new URI( base + (uri.startsWith("/") ? "" : "/") + uri );
+			}
+		}
+		return l;
+	}
+
+	private IPath cachePath(IBundleModelElement info) {
+		return new Path(cacheDir.getAbsolutePath()).append( info.getSymbolicName() + "_" + info.getVersion() + ".jar" );
+	}
+
+	private void startCapability(Attributes attributes) {
+		if ( bundle != null ) {
+			if ( PACKAGE.equals( attributes.getValue("", "name") ) ) {
+				export = ModelElementFactory.getInstance().newModelElement(IPackageExport.class);
+			}
+		}
+	}
+
+	private void startRequire(Attributes attributes) throws SAXParseException {
+		if ( bundle != null ) {
+			String name = attributes.getValue("name");
+			if ( PACKAGE.equals( name ) ) {
+				IPackageImport pi = ModelElementFactory.getInstance().newModelElement(IPackageImport.class);
+				try {
+					LDAPExpr expr = LDAPParser.parseExpression(attributes.getValue("filter") );
+					pi.setPackageName(decodePackage(expr, locator));
+					pi.setVersions(decodeVersions(expr, locator));
+					pi.setOptional(Boolean.valueOf(attributes.getValue("optional")));
+					bundle.getBundleInfo().addImport(pi);
+				} catch (LDAPParseException e) {
+					throw new SAXParseException("Failed to parse filter", locator, e);
+				}
+			}
+			else if ( "bundle".equals( name ) ) {
+				IRequiredBundle b = ModelElementFactory.getInstance().newModelElement(IRequiredBundle.class);
+				try {
+					LDAPExpr expr = LDAPParser.parseExpression(attributes.getValue("filter") );
+					b.setSymbolicName(decodeSymbolicName(expr, locator));
+					b.setVersions(decodeVersions(expr, locator));
+					b.setOptional(Boolean.valueOf(attributes.getValue("optional")));
+					bundle.getBundleInfo().addRequiredBundle(b);
+				} catch (Exception e) {
+					System.err.println( "Failed to parse filter in bundle " + bundle.getBundleInfo().getSymbolicName() );
+					throw new SAXParseException("Failed to parse filter in bundle " + bundle.getBundleInfo().getSymbolicName(), locator, e);
+				}
+			}
+			//else if ( "ee".equals( name ) ) {
+				// TODO ignore for now...
+			//}
+			//else if ( "service".equals( name ) ) {
+				// TODO ignore for now...
+			//}
+			//else {
+			//	for ( int i = 0; i < attributes.getLength(); i++ ) {
+			//		System.out.println( "Found requirement " + attributes.getValue(i) );				
+			//	}
+			//}
+		}
+	}
+
+	private static VersionRange decodeVersions(LDAPExpr expr, Locator locator) throws SAXParseException {
+		try {
+			return VersionRangeHelper.decodeVersions(expr);			
+		}
+		catch (NumberFormatException e) {
+			throw new SAXParseException(e.getMessage(), locator);
+		}
+	}
+
+	private void startProperty(Attributes attributes) {
+		if ( export != null ) {
+			String name = attributes.getValue("", "n");
+			String value = attributes.getValue("", "v");
+			if ( PACKAGE.equals( name ) ) {
+				export.setPackageName(value);
+			}
+			else if ( "uses".equals( name ) ) {
+				String[] split = value.split(",");
+				export.setUses( Arrays.asList(split) );
+			}
+			else if ( "version".equals( name ) ) {
+				export.setVersion( new Version(value) );
+			}
+		}
+	}
+
+	private void endResource() {
+		if ( bundle != null ) {
+			listener.handleBundle(bundle);
+			bundle = null;
+		}
+	}
+
+	private void endCapability() {
+		if ( bundle != null ) {
+			if ( export != null ) {
+				bundle.getBundleInfo().addExport(export);
+				export = null;
+			}
+		}
+	}
+
+	private void endRequire() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	private void endProperty() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	private static String decodePackage(LDAPExpr expr, Locator locator) throws SAXParseException {
+		ArrayList<SimpleTerm> terms = new ArrayList<SimpleTerm>(1);
+		
+		findTerms("package", expr, terms);
+		
+		if ( terms.isEmpty() ) {
+			throw new SAXParseException("Missing name filter in " + expr, locator);
+		}
+		
+		return terms.get(0).getRval();
+	}
+	
+	private static String decodeSymbolicName(LDAPExpr expr, Locator locator) throws SAXParseException {
+		ArrayList<SimpleTerm> terms = new ArrayList<SimpleTerm>(1);
+		
+		findTerms("symbolicname", expr, terms);
+		
+		if ( terms.isEmpty() ) {
+			throw new SAXParseException("Missing name filter in " + expr, locator);
+		}
+		
+		return terms.get(0).getRval();
+	}
+	
+	private static void findTerms(String string, LDAPExpr expr, List<SimpleTerm> terms) throws SAXParseException {
+		if ( expr instanceof SimpleTerm ) {
+			SimpleTerm term = (SimpleTerm) expr;
+			if ( term.getName().equals(string) ) {
+				terms.add(term);
+			}
+		}
+		else {
+			for ( LDAPExpr c : expr.getChildren() ) {
+				findTerms(string, c, terms);
+			}
+		}
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRListener.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRListener.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRListener.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRListener.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import org.cauldron.sigil.model.eclipse.ISigilBundle;
+
+public interface OBRListener {
+	void handleBundle(ISigilBundle bundle);
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRRepositoryProvider.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRRepositoryProvider.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRRepositoryProvider.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/OBRRepositoryProvider.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.cauldron.sigil.repository.IBundleRepository;
+import org.cauldron.sigil.repository.IRepositoryProvider;
+import org.cauldron.sigil.repository.RepositoryException;
+
+public class OBRRepositoryProvider implements IRepositoryProvider {
+	public IBundleRepository createRepository(String id, Properties preferences) throws RepositoryException {
+		try {
+			URL repositoryURL = new URL( preferences.getProperty("url") );
+			File indexCache = new File( preferences.getProperty("index") );
+			File localCache = new File( preferences.getProperty("cache") );
+			// TODO create user configurable updatePeriod
+			long updatePeriod = TimeUnit.MILLISECONDS.convert(60*60*24*7, TimeUnit.SECONDS);
+			if ( preferences.getProperty("inmemory") == null ) {
+				return new NonCachingOBRBundleRepository(id, repositoryURL, indexCache, localCache, updatePeriod);
+			}
+			else {
+				return new CachingOBRBundleRepository(id, repositoryURL, indexCache, localCache, updatePeriod);
+			}
+		}
+		catch (MalformedURLException e) {
+			throw new RepositoryException("Invalid repository url", e);
+		}
+	}
+}

Added: felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/VersionRangeHelper.java
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/VersionRangeHelper.java?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/VersionRangeHelper.java (added)
+++ felix/trunk/sigil/org.cauldron.bld.obr/src/org/cauldron/bld/obr/VersionRangeHelper.java Mon Jul 13 13:25:46 2009
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.cauldron.bld.obr;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.cauldron.sigil.model.common.LDAPExpr;
+import org.cauldron.sigil.model.common.LDAPParseException;
+import org.cauldron.sigil.model.common.LDAPParser;
+import org.cauldron.sigil.model.common.Not;
+import org.cauldron.sigil.model.common.Ops;
+import org.cauldron.sigil.model.common.SimpleTerm;
+import org.cauldron.sigil.model.common.VersionRange;
+import org.osgi.framework.Version;
+
+class VersionRangeHelper {
+	
+	// e.g. (&(version>=1.0.0)(version<=2.0.0)) (&(version>1.0.0)(version<2.0.0)) (&(!(version<1.0.0))(!(version>2.0.0))) (&(!(version<=1.0.0))(!(version>=2.0.0))) (version=1.0.0) (version>=1.0.0) (version<=2.0.0) (version>1.0.0) (version<2.0.0)  (!(version>2.0.0)) (!(version<1.0.0)) (!(version>=2.0.0)) (!(version<=1.0.0))
+	public static void main(String[] args) throws LDAPParseException {
+		for ( String arg : args ) {
+			LDAPExpr expr = LDAPParser.parseExpression(arg.trim());
+			System.out.println( expr + " -> " + decodeVersions(expr) ); 
+		}
+	}
+	
+	static VersionRange decodeVersions(LDAPExpr expr) throws NumberFormatException {
+		ArrayList<LDAPExpr> terms = new ArrayList<LDAPExpr>(1);
+		
+		findExpr("version", expr, terms);
+		
+		if ( terms.isEmpty() ) {
+			// woo hoo!
+			return VersionRange.ANY_VERSION;
+		}
+		else {
+			switch ( terms.size() ) {
+			case 1: {
+				return parseSimpleVersionRange(terms.get(0));
+			}
+			case 2: {
+				return parseCompoundVersionRange(terms.get(0), terms.get(1));
+			}
+			default: {
+				// (&(version>=min)(!(version=min))(version<=max)(!(version=max))) 	- (min,max) - not dealt with!!
+				// (&(|(version>min)(version=min))(|(version<max)(version=max))) 	- [min,max] - not dealt with!!
+				throw new NumberFormatException("Failed to parse complicated version expression " + expr);				
+			}
+			}
+		}
+	}
+
+	// (&(version>=min)(version<=max)) 									- [min,max]
+	// (&(version>min)(version<max))									- (min,max)
+	//
+	// (&(!(version<min))(!(version>max)))								- [min,max]
+	// (&(!(version<=min))(!(version>=max)) 							- (min,max)
+	private static VersionRange parseCompoundVersionRange(LDAPExpr left, LDAPExpr right) throws NumberFormatException {
+		VersionRange one = parseSimpleVersionRange(left);
+		VersionRange two = parseSimpleVersionRange(right);
+		
+		// sanity check
+		if ( one.isPointVersion() || two.isPointVersion() ) {
+			throw new NumberFormatException("Unexpected point version in compound expression " + left);				
+		}
+		
+		VersionRange max = one.getFloor().equals( Version.emptyVersion ) ? one : two;
+		VersionRange min = max == one ? two : one;
+
+		return new VersionRange( min.isOpenFloor(), min.getFloor(), max.getCeiling(), max.isOpenCeiling() );
+	}
+
+	// possible variations				
+	// (version=v)														- [v,v]
+	//
+	// (version>=min)													- [min,*)
+	// (version<=max)													- [0,max]
+	//
+	// (version>min)													- (min,*)
+	// (version<max)													- [0,max)
+	//
+	// (!(version>max))													- [0,max]
+	// (!(version<min))													- [min,*)
+	// (!(version>=max))												- [0,max)
+	// (!(version<=min))												- (0,*)
+	private static VersionRange parseSimpleVersionRange(LDAPExpr expr) throws NumberFormatException {
+		Version min = Version.emptyVersion;
+		Version max = VersionRange.INFINITE_VERSION;
+		boolean openFloor = false;
+		boolean openCeiling = false;
+		if ( expr instanceof Not ) {
+			Not n = (Not) expr;
+			SimpleTerm t = (SimpleTerm) n.getEx();
+			if ( t.getOp() == Ops.EQ ) {
+				throw new NumberFormatException("Unexpected point version in negated expression " + expr);								
+			}
+			if ( !isMax(t.getOp()) ) {
+				max = toVersion(t);
+				openCeiling = !openFloor(t);
+			}
+			else if ( !isMin(t.getOp()) ) {
+				min = toVersion(t);
+				openFloor = !openCeiling(t);
+			}
+			else {
+				throw new IllegalStateException("Unexpected operator " + t.getOp());
+			}
+		}
+		else {
+			SimpleTerm t = (SimpleTerm) expr;
+			if ( t.getOp().equals( Ops.EQ ) ) {
+				max = toVersion(t);
+				min = max;
+				openFloor = false;
+				openCeiling = false;
+			}
+			else if ( isMax(t.getOp()) ) {
+				max = toVersion(t); 
+				openCeiling = openCeiling(t);
+			}
+			else if ( isMin(t.getOp()) ) {
+				min = toVersion(t);
+				openFloor = openFloor(t);
+			}
+			else {
+				throw new IllegalStateException("Unexpected operator " + t.getOp());
+			}
+		}
+
+		return new VersionRange( openFloor, min, max, openCeiling );
+	}
+
+	private static Version toVersion(SimpleTerm t) {
+		return new Version(t.getRval());
+	}
+
+	private static boolean isMax(Ops op) {
+		return op == Ops.LE || op == Ops.LT;
+	}
+	
+	private static boolean isMin(Ops op) {
+		return op == Ops.GE || op == Ops.GT;
+	}
+
+	private static boolean openFloor(SimpleTerm t) {
+		return t.getOp() == Ops.GT;
+	}
+
+	private static boolean openCeiling(SimpleTerm t) {
+		return t.getOp() == Ops.LT;
+	}
+	
+	private static void findExpr(String string, LDAPExpr expr, List<LDAPExpr> terms) {
+		if ( expr instanceof SimpleTerm ) {
+			SimpleTerm term = (SimpleTerm) expr;
+			if ( term.getName().equals(string) ) {
+				terms.add(term);
+			}
+		}
+		else if ( expr instanceof Not ) {
+			Not not = (Not) expr;
+			if ( not.getEx() instanceof SimpleTerm ) {
+				SimpleTerm term = (SimpleTerm) not.getEx();
+				if ( term.getName().equals(string) ) {
+					terms.add(not);
+				}
+			}
+		}
+		else {
+			for ( LDAPExpr c : expr.getChildren() ) {
+				findExpr(string, c, terms);
+			}
+		}
+	}
+}

Added: felix/trunk/sigil/org.cauldron.sigil.all.feature/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.all.feature/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.all.feature/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.all.feature/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.all.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.all.feature/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.all.feature/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.all.feature/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.all.feature/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,2 @@
+# Setting bin.includes to empty ensures no feature JAR is built
+# bin.includes=

Added: felix/trunk/sigil/org.cauldron.sigil.all.feature/feature.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.all.feature/feature.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.all.feature/feature.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.all.feature/feature.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+    http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<feature
+      id="org.cauldron.sigil.all.feature"
+      label="Sigil All Feature"
+      version="0.8.0">
+
+   <description url="http://www.example.com/description">
+      [Enter Feature Description here.]
+   </description>
+
+   <copyright url="http://www.apache.org/licenses/LICENSE-2.0">
+      [Enter Feature Description here.]
+   </copyright>
+
+   <license url="http://www.apache.org/licenses/LICENSE-2.0">
+      Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+or implied.
+See the License for the specific language governing permissions
+and
+limitations under the License.
+   </license>
+
+   <includes
+         id="org.cauldron.sigil.feature"
+         version="0.0.0"/>
+
+   <includes
+         id="org.cauldron.sigil.obr.feature"
+         version="0.0.0"/>
+
+</feature>

Added: felix/trunk/sigil/org.cauldron.sigil.core/.classpath
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/.classpath?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/.classpath (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/.classpath Mon Jul 13 13:25:46 2009
@@ -0,0 +1,14 @@
+<?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">
+		<accessrules>
+			<accessrule kind="accessible" pattern="org/cauldron/newton/descriptor/**"/>
+			<accessrule kind="accessible" pattern="org/eclipse/pde/internal/**"/>
+		</accessrules>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.4.jar" sourcepath="org.cauldron.sigil.coresrc.zip"/>
+	<classpathentry kind="output" path="build/classes"/>
+</classpath>

Added: felix/trunk/sigil/org.cauldron.sigil.core/.project
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/.project?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/.project (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/.project Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.cauldron.sigil.core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: felix/trunk/sigil/org.cauldron.sigil.core/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/.settings/org.eclipse.jdt.core.prefs?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/.settings/org.eclipse.jdt.core.prefs (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/.settings/org.eclipse.jdt.core.prefs Mon Jul 13 13:25:46 2009
@@ -0,0 +1,7 @@
+#Tue Sep 16 15:53:19 BST 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: felix/trunk/sigil/org.cauldron.sigil.core/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/META-INF/MANIFEST.MF?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/META-INF/MANIFEST.MF (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/META-INF/MANIFEST.MF Mon Jul 13 13:25:46 2009
@@ -0,0 +1,28 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: org.cauldron.sigil.core
+Bundle-SymbolicName: org.cauldron.sigil.core;singleton:=true
+Bundle-Version: 0.8.0.qualifier
+Bundle-Activator: org.cauldron.sigil.SigilCore
+Bundle-Vendor: Paremus Ltd.
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.expressions,
+ org.eclipse.core.runtime,
+ org.eclipse.debug.ui,
+ org.eclipse.jdt.core,
+ org.eclipse.ui,
+ org.eclipse.ui.console;bundle-version="3.3.0",
+ org.cauldron.sigil.utils,
+ org.cauldron.bld.core
+Bundle-ActivationPolicy: lazy
+Export-Package: org.cauldron.sigil,
+ org.cauldron.sigil.install,
+ org.cauldron.sigil.job,
+ org.cauldron.sigil.model.project,
+ org.cauldron.sigil.model.repository,
+ org.cauldron.sigil.model.util,
+ org.cauldron.sigil.preferences
+Bundle-ClassPath: .,
+ lib/commons-lang-2.4.jar
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Import-Package: junit.framework;version="3.8.2";resolution:=optional

Added: felix/trunk/sigil/org.cauldron.sigil.core/build.properties
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/build.properties?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/build.properties (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/build.properties Mon Jul 13 13:25:46 2009
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = build/classes/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               lib/commons-lang-2.4.jar,\
+               schema/
+bin.excludes = META-INF/.svn/
+src.includes = src/,\
+               META-INF/

Added: felix/trunk/sigil/org.cauldron.sigil.core/plugin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/plugin.xml?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/plugin.xml (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/plugin.xml Mon Jul 13 13:25:46 2009
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+    http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<?eclipse version="3.2"?>
+<plugin>
+   <extension-point id="org.cauldron.sigil.repositoryprovider" name="Bundle Repository Provider" schema="schema/org.cauldron.sigil.repositoryprovider.exsd"/>
+   <extension-point id="org.cauldron.sigil.installbuilder" name="Newton Install Builder" schema="schema/org.cauldron.sigil.runtime.installbuilder.exsd"/>
+   
+   <extension
+         point="org.eclipse.core.contenttype.contentTypes">
+      <content-type
+            base-type="org.eclipse.core.runtime.text"
+            file-extensions="script,nsh"
+            id="org.cauldron.sigil.content.NewtonScriptType"
+            name="Newton Script"
+            priority="normal">
+      </content-type>
+
+   </extension>
+   <extension
+         point="org.eclipse.core.expressions.propertyTesters">
+      <propertyTester
+            class="org.cauldron.sigil.property.SigilPropertyTester"
+            id="org.cauldron.sigil.property.NewtonPropertyTester"
+            namespace="org.cauldron.sigil"
+            properties="isNewtonResource,isCompositeResource,isSystemResource,isScriptResource,isSigilProject"
+            type="org.eclipse.core.resources.IResource"/>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.adapters">
+      <factory
+            adaptableType="org.eclipse.core.resources.IFile"
+            class="org.cauldron.sigil.internal.adapter.FileAdaptorFactory">
+         <adapter type="org.cauldron.sigil.model.eclipse.ISigilBundle"/>
+      </factory>
+      <factory
+            adaptableType="org.eclipse.core.resources.IProject"
+            class="org.cauldron.sigil.internal.adapter.ProjectAdaptorFactory">
+         <adapter type="org.cauldron.sigil.model.project.ISigilProjectModel"/>
+      </factory>
+   </extension>
+   <extension
+         id="org.cauldron.sigil.core.sigilnature"
+         name="Sigil Nature"
+         point="org.eclipse.core.resources.natures">
+      <runtime>
+         <run class="org.cauldron.sigil.nature.SigilProjectNature"/>
+      </runtime>
+   </extension>
+   <extension
+   		 id="sigilBuilder"
+         name="Sigil Bundle Builder"
+         point="org.eclipse.core.resources.builders">
+      <builder
+            hasNature="false"
+            isConfigurable="false">
+         <run class="org.cauldron.sigil.internal.builders.SigilIncrementalProjectBuilder"/>
+      </builder>
+   </extension>
+   <extension
+         point="org.eclipse.core.runtime.preferences">
+      <initializer
+            class="org.cauldron.sigil.preferences.SigilPreferencesInitializer">
+      </initializer>
+   </extension>
+   <extension
+         point="org.cauldron.sigil.repositoryprovider">
+      <provider
+            class="org.cauldron.sigil.internal.repository.eclipse.WorkspaceRepositoryProvider"
+            defaultLevel="-3"
+            dynamic="false"
+            id="org.cauldron.sigil.core.workspaceprovider"
+            type="Workspace Repository">
+      </provider>
+      <provider
+            class="org.cauldron.bld.core.repository.FileSystemRepositoryProvider"
+            dynamic="true"
+            id="org.cauldron.sigil.core.file"
+            type="File System Repository">
+      </provider>
+   </extension>
+   <extension
+         id="org.cauldron.sigil.unresolvedDependencyMarker"
+         name="Unresolved Dependency"
+         point="org.eclipse.core.resources.markers">
+      <persistent
+            value="true">
+      </persistent>
+      <super
+            type="org.eclipse.core.resources.problemmarker">
+      </super>
+      <attribute
+            name="element">
+      </attribute>
+      <attribute
+            name="versionRange">
+      </attribute>
+   </extension>
+   <extension
+         id="org.cauldron.sigil.unresolvedDependencyMarker.importPackage"
+         name="Unresolved Import Package"
+         point="org.eclipse.core.resources.markers">
+      <persistent
+            value="true">
+      </persistent>
+      <super
+            type="org.cauldron.sigil.unresolvedDependencyMarker">
+      </super>
+   </extension>
+   <extension
+         id="org.cauldron.sigil.unresolvedDependencyMarker.requireBundle"
+         name="Unresolve Require Bundle"
+         point="org.eclipse.core.resources.markers">
+      <persistent
+            value="true">
+      </persistent>
+      <super
+            type="org.cauldron.sigil.unresolvedDependencyMarker">
+      </super>
+   </extension>
+</plugin>

Added: felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.repositoryprovider.exsd
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.repositoryprovider.exsd?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.repositoryprovider.exsd (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.repositoryprovider.exsd Mon Jul 13 13:25:46 2009
@@ -0,0 +1,158 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+    http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.cauldron.sigil.core" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.cauldron.sigil.core" id="org.cauldron.sigil.repository" name="Sigil Bundle Repository Provider"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="provider" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="provider">
+      <complexType>
+         <attribute name="id" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="type" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.cauldron.sigil.repository.IRepositoryProvider"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="icon" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="resource"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="dynamic" type="boolean" use="default" value="true">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="defaultLevel" type="string" use="default" value="500">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>

Added: felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.runtime.installbuilder.exsd
URL: http://svn.apache.org/viewvc/felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.runtime.installbuilder.exsd?rev=793581&view=auto
==============================================================================
--- felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.runtime.installbuilder.exsd (added)
+++ felix/trunk/sigil/org.cauldron.sigil.core/schema/org.cauldron.sigil.runtime.installbuilder.exsd Mon Jul 13 13:25:46 2009
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements.  See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership.  The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License.  You may obtain a copy of the License at
+  
+    http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.cauldron.sigil.runtime" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+      <appinfo>
+         <meta.schema plugin="org.cauldron.sigil.runtime" id="org.cauldron.sigil.runtime.installbuilder" name="Newton Install Builder"/>
+      </appinfo>
+      <documentation>
+         [Enter description of this extension point.]
+      </documentation>
+   </annotation>
+
+   <element name="extension">
+      <annotation>
+         <appinfo>
+            <meta.element />
+         </appinfo>
+      </annotation>
+      <complexType>
+         <sequence>
+            <element ref="builder" minOccurs="0" maxOccurs="unbounded"/>
+         </sequence>
+         <attribute name="point" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="id" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+         <attribute name="name" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute translatable="true"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <element name="builder">
+      <complexType>
+         <attribute name="class" type="string" use="required">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+               <appinfo>
+                  <meta.attribute kind="java" basedOn=":org.cauldron.sigil.install.INewtonInstallBuilder"/>
+               </appinfo>
+            </annotation>
+         </attribute>
+         <attribute name="priority" type="string">
+            <annotation>
+               <documentation>
+                  
+               </documentation>
+            </annotation>
+         </attribute>
+      </complexType>
+   </element>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="since"/>
+      </appinfo>
+      <documentation>
+         [Enter the first release in which this extension point appears.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="examples"/>
+      </appinfo>
+      <documentation>
+         [Enter extension point usage example here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="apiinfo"/>
+      </appinfo>
+      <documentation>
+         [Enter API information here.]
+      </documentation>
+   </annotation>
+
+   <annotation>
+      <appinfo>
+         <meta.section type="implementation"/>
+      </appinfo>
+      <documentation>
+         [Enter information about supplied implementation of this extension point.]
+      </documentation>
+   </annotation>
+
+
+</schema>