Skip to Content.
Sympa Menu

notify-dpml - r1159 - in trunk/lab: . component/etc/deliverables/xsds component/src/main/dpmlx/component library library/etc library/etc/deliverables library/etc/deliverables/xsds part/etc/deliverables/xsds test test/etc/test test/src/test/dpmlx/schema/test

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1159 - in trunk/lab: . component/etc/deliverables/xsds component/src/main/dpmlx/component library library/etc library/etc/deliverables library/etc/deliverables/xsds part/etc/deliverables/xsds test test/etc/test test/src/test/dpmlx/schema/test
  • Date: Wed, 1 Mar 2006 16:02:59 +0100

Author: mcconnell
Date: 2006-03-01 16:02:51 +0100 (Wed, 01 Mar 2006)
New Revision: 1159

Added:
trunk/lab/library/
trunk/lab/library/build.xml
trunk/lab/library/etc/
trunk/lab/library/etc/deliverables/
trunk/lab/library/etc/deliverables/xsds/
trunk/lab/library/etc/deliverables/xsds/library.xsd
Modified:
trunk/lab/component/etc/deliverables/xsds/project.xsd
trunk/lab/component/src/main/dpmlx/component/ComponentStrategyBuilder.java
trunk/lab/library.xml
trunk/lab/part/etc/deliverables/xsds/project.xsd
trunk/lab/test/build.xml
trunk/lab/test/etc/test/component.xml
trunk/lab/test/src/test/dpmlx/schema/test/SchemaTestCase.java
Log:
add definition of the library schema

Modified: trunk/lab/component/etc/deliverables/xsds/project.xsd
===================================================================
--- trunk/lab/component/etc/deliverables/xsds/project.xsd 2006-03-01
08:56:59 UTC (rev 1158)
+++ trunk/lab/component/etc/deliverables/xsds/project.xsd 2006-03-01
15:02:51 UTC (rev 1159)
@@ -13,8 +13,11 @@
schemaLocation="@PART-XSD-URI@"/>

<xsd:element name="component" type="ComponentType"/>
-
- <xsd:complexType name="ComponentType">
+
+ <!--
+ Definition of a plugin component deployment strategy.
+ -->
+ <xsd:complexType name="ComponentStrategyType">
<xsd:annotation>
<xsd:documentation xml:lang="en">
Definition of a component deployment model for the DPML Metro
Platform.
@@ -23,15 +26,30 @@
<xsd:complexContent>
<xsd:extension base="part:StrategyType">
<xsd:sequence>
- <xsd:element name="context" type="ContextType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="controller" type="ControllerType"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="component" type="ComponentType" minOccurs="0"
maxOccurs="1"/>
</xsd:sequence>
- <xsd:attribute name="type" type="xsd:string"/>
- <xsd:attribute name="lifestyle" type="xsd:string"/>
- <xsd:attribute name="collection" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

+ <xsd:complexType name="ControllerType">
+ <xsd:sequence>
+ <xsd:element name="param" type="ValueType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="uri" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="ComponentType">
+ <xsd:sequence>
+ <xsd:element name="context" type="ContextType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="parts" type="PartsType" minOccurs="0"
maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="type" type="xsd:string"/>
+ <xsd:attribute name="lifestyle" type="xsd:string"/>
+ <xsd:attribute name="collection" type="xsd:string"/>
+ </xsd:complexType>
+
<xsd:complexType name="ContextType">
<xsd:sequence>
<xsd:element name="entry" type="EntryType" minOccurs="0"
maxOccurs="unbounded"/>
@@ -54,4 +72,18 @@
<xsd:attribute name="value" type="xsd:string"/>
</xsd:complexType>

+ <xsd:complexType name="PartsType">
+ <xsd:sequence>
+ <xsd:element name="component" type="TaggedComponentType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="TaggedComponentType">
+ <xsd:complexContent>
+ <xsd:extension base="ComponentType">
+ <xsd:attribute name="key" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
</xsd:schema>

Modified:
trunk/lab/component/src/main/dpmlx/component/ComponentStrategyBuilder.java
===================================================================
---
trunk/lab/component/src/main/dpmlx/component/ComponentStrategyBuilder.java
2006-03-01 08:56:59 UTC (rev 1158)
+++
trunk/lab/component/src/main/dpmlx/component/ComponentStrategyBuilder.java
2006-03-01 15:02:51 UTC (rev 1159)
@@ -34,7 +34,7 @@
public class ComponentStrategyBuilder implements StrategyBuilder
{
/**
- * Return a deployment strategy.
+ * Constructs a component deployment strategy.
*
* @return the deployment strategy
* @exception Exception if an error occurs

Added: trunk/lab/library/build.xml
===================================================================
--- trunk/lab/library/build.xml 2006-03-01 08:56:59 UTC (rev 1158)
+++ trunk/lab/library/build.xml 2006-03-01 15:02:51 UTC (rev 1159)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<project default="install" basedir="."
+ xmlns:transit="antlib:net.dpml.transit"
+ xmlns:x="dpml:depot" >
+
+ <transit:import uri="local:template:dpml/tools/standard"/>
+
+ <target name="init" depends="standard.init">
+ <x:filter feature="uri" type="xsd" token="PROJECT-XSD-URI"/>
+ </target>
+
+ <target name="package" depends="standard.package">
+ <move file="target/deliverables/xsds/library.xsd"
+
toFile="target/deliverables/xsds/${project.name}-${project.version}.xsd"/>
+ </target>
+
+</project>

Added: trunk/lab/library/etc/deliverables/xsds/library.xsd
===================================================================
--- trunk/lab/library/etc/deliverables/xsds/library.xsd 2006-03-01 08:56:59
UTC (rev 1158)
+++ trunk/lab/library/etc/deliverables/xsds/library.xsd 2006-03-01 15:02:51
UTC (rev 1159)
@@ -0,0 +1,138 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
+ targetNamespace="@PROJECT-XSD-URI@"
+ xmlns="@PROJECT-XSD-URI@"
+ elementFormDefault="qualified">
+
+ <xsd:element name="library" type="LibraryType"/>
+
+ <xsd:complexType name="LibraryType">
+ <xsd:sequence>
+ <xsd:element name="imports" type="ImportsType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="properties" type="PropertiesType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="modules" type="ModulesType" minOccurs="0"
maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ImportsType">
+ <xsd:sequence>
+ <xsd:element name="import" type="ImportType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="PropertiesType">
+ <xsd:sequence>
+ <xsd:element name="property" type="PropertyType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ModulesType">
+ <xsd:sequence>
+ <xsd:element name="module" type="ModuleType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="project" type="ProjectType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="resource" type="ResourceType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="ImportType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:anyURI"/>
+ </xsd:simpleContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="PropertyType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="value" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="ResourceType">
+ <xsd:sequence>
+ <xsd:element name="properties" type="PropertiesType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="types" type="TypesType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="dependencies" type="DependenciesType"
minOccurs="0" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="version" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="ProjectType">
+ <xsd:complexContent>
+ <xsd:extension base="ResourceType">
+ <xsd:attribute name="basedir" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="ModuleType">
+ <xsd:complexContent>
+ <xsd:extension base="ProjectType">
+ <xsd:sequence>
+ <xsd:element name="module" type="ModuleType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="project" type="ProjectType" minOccurs="0"
maxOccurs="unbounded"/>
+ <xsd:element name="resource" type="ResourceType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="TypesType">
+ <xsd:sequence>
+ <xsd:element name="type" type="TypeType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="TypeType" abstract="true">
+ <xsd:sequence>
+ <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="id" type="xsd:string"/>
+ <xsd:attribute name="alias" type="xsd:boolean"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="DependenciesType">
+ <xsd:sequence>
+ <xsd:element name="build" type="DependencyType" minOccurs="0"
maxOccurs="1"/>
+ <xsd:element name="runtime" type="RuntimeDependencyType"
minOccurs="0" maxOccurs="1"/>
+ <xsd:element name="test" type="DependencyType" minOccurs="0"
maxOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="DependencyType">
+ <xsd:sequence>
+ <xsd:element name="include" type="IncludeType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="RuntimeDependencyType">
+ <xsd:sequence>
+ <xsd:element name="include" type="RuntimeIncludeType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="IncludeType">
+ <xsd:sequence>
+ <xsd:element name="properties" type="PropertiesType" minOccurs="0"
maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="key" type="xsd:string"/>
+ <xsd:attribute name="ref" type="xsd:string"/>
+ <xsd:attribute name="urn" type="xsd:string"/>
+ </xsd:complexType>
+
+ <xsd:complexType name="RuntimeIncludeType">
+ <xsd:complexContent>
+ <xsd:extension base="IncludeType">
+ <xsd:attribute name="tag" type="xsd:string"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <!--
+ <types>
+ <type id="part" alias="true">
+ <component name="fred" type="Widget"/>
+ </type>
+ </types>
+ -->
+
+</xsd:schema>
+

Modified: trunk/lab/library.xml
===================================================================
--- trunk/lab/library.xml 2006-03-01 08:56:59 UTC (rev 1158)
+++ trunk/lab/library.xml 2006-03-01 15:02:51 UTC (rev 1159)
@@ -16,12 +16,18 @@

<module name="dpmlx">

+ <project name="dpmlx-library" basedir="library">
+ <types>
+ <type id="xsd"/>
+ </types>
+ </project>
+
<project name="dpmlx-part" basedir="part">
<types>
<type id="xsd"/>
</types>
</project>
-
+
<project name="dpmlx-lang" basedir="lang">
<types>
<type id="jar"/>

Modified: trunk/lab/part/etc/deliverables/xsds/project.xsd
===================================================================
--- trunk/lab/part/etc/deliverables/xsds/project.xsd 2006-03-01 08:56:59
UTC (rev 1158)
+++ trunk/lab/part/etc/deliverables/xsds/project.xsd 2006-03-01 15:02:51
UTC (rev 1159)
@@ -10,22 +10,11 @@
<xsd:sequence>
<xsd:element name="info" type="InfoType"/>
<xsd:element name="strategy" type="StrategyType"/>
- <!--
- <xsd:choice>
- <xsd:element name="strategy" type="StrategyType"/>
- <xsd:element name="plugin" type="PluginType"/>
- </xsd:choice>
- -->
<xsd:element name="classpath" type="ClassPathType"/>
</xsd:sequence>
</xsd:complexType>

<xsd:complexType name="StrategyType" abstract="true">
- <!--
- <xsd:sequence>
- <xsd:any minOccurs="0"/>
- </xsd:sequence>
- -->
<xsd:attribute name="uri" type="xsd:anyURI"/>
</xsd:complexType>


Modified: trunk/lab/test/build.xml
===================================================================
--- trunk/lab/test/build.xml 2006-03-01 08:56:59 UTC (rev 1158)
+++ trunk/lab/test/build.xml 2006-03-01 15:02:51 UTC (rev 1159)
@@ -9,6 +9,7 @@
<target name="init" depends="standard.init">
<x:filter feature="uri" type="xsd" token="COMPONENT-XSD-URI"
ref="dpmlx/dpmlx-component"/>
<x:filter feature="uri" type="xsd" token="PART-XSD-URI"
ref="dpmlx/dpmlx-part"/>
+ <x:filter feature="uri" type="xsd" token="LIBRARY-XSD-URI"
ref="dpmlx/dpmlx-library"/>
</target>

</project>

Modified: trunk/lab/test/etc/test/component.xml
===================================================================
--- trunk/lab/test/etc/test/component.xml 2006-03-01 08:56:59 UTC (rev
1158)
+++ trunk/lab/test/etc/test/component.xml 2006-03-01 15:02:51 UTC (rev
1159)
@@ -13,14 +13,16 @@
</description>
</info>

- <strategy xsi:type="m:ComponentType"
- uri="link:plugin:dpml/metro/dpml-metro-builder" type="org.acme.Widget">
- <m:context>
- <m:entry key="foo" value="abc"/>
- <m:entry key="bar">
- <m:value class="int" value="2"/>
- </m:entry>
- </m:context>
+ <strategy xsi:type="m:ComponentStrategyType">
+ <m:controller uri="link:plugin:dpml/metro/dpml-metro-runtime"/>
+ <m:component type="org.acme.Widget">
+ <m:context>
+ <m:entry key="foo" value="abc"/>
+ <m:entry key="bar">
+ <m:value class="int" value="2"/>
+ </m:entry>
+ </m:context>
+ </m:component>
</strategy>

<classpath>

Modified: trunk/lab/test/src/test/dpmlx/schema/test/SchemaTestCase.java
===================================================================
--- trunk/lab/test/src/test/dpmlx/schema/test/SchemaTestCase.java
2006-03-01 08:56:59 UTC (rev 1158)
+++ trunk/lab/test/src/test/dpmlx/schema/test/SchemaTestCase.java
2006-03-01 15:02:51 UTC (rev 1159)
@@ -6,6 +6,7 @@
import java.net.URL;

import dpmlx.lang.Part;
+import dpmlx.lang.Strategy;
import dpmlx.schema.PartBuilder;
import dpmlx.schema.UnresolvableHandlerException;

@@ -56,6 +57,9 @@
System.out.println( "source: " + file );
Part part = m_builder.loadPart( file.toURI() );
System.out.println( "# PART: " + part );
- System.out.println( "# STRATEGY: " + part.getStrategy() );
+ Strategy strategy = part.getStrategy();
+ System.out.println( "# STRATEGY: " + strategy );
+ System.out.println( "# Controller: " + strategy.getControllerURI() );
+ System.out.println( "# Data: " +
strategy.getDeploymentData().getClass().getName() );
}
}




  • r1159 - in trunk/lab: . component/etc/deliverables/xsds component/src/main/dpmlx/component library library/etc library/etc/deliverables library/etc/deliverables/xsds part/etc/deliverables/xsds test test/etc/test test/src/test/dpmlx/schema/test, mcconnell at BerliOS, 03/01/2006

Archive powered by MHonArc 2.6.24.

Top of Page