[jboss-osgi-commits] JBoss-OSGI SVN: r88817 - in projects/jboss-osgi/trunk: bundle/blueprint and 15 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Wed May 13 10:27:04 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-05-13 10:27:03 -0400 (Wed, 13 May 2009)
New Revision: 88817
Added:
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/BlueprintType.java
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
projects/jboss-osgi/trunk/bundle/blueprint/src/main/resources/schema/blueprint-jbxb.xsd
projects/jboss-osgi/trunk/bundle/blueprint/src/test/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/ParserTestCase.java
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/log4j.xml
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/
projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/blueprint-basic.xml
Removed:
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tavailability.java
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tblueprint.java
Modified:
projects/jboss-osgi/trunk/bundle/blueprint/.classpath
projects/jboss-osgi/trunk/bundle/blueprint/pom.xml
projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/TserviceReference.java
projects/jboss-osgi/trunk/pom.xml
Log:
Add blueprint basic parser test
Modified: projects/jboss-osgi/trunk/bundle/blueprint/.classpath
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/.classpath 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/bundle/blueprint/.classpath 2009-05-13 14:27:03 UTC (rev 88817)
@@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" path="src/main/resources"/>
<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.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
Modified: projects/jboss-osgi/trunk/bundle/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/pom.xml 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/bundle/blueprint/pom.xml 2009-05-13 14:27:03 UTC (rev 88817)
@@ -19,6 +19,11 @@
<!-- Dependencies -->
<dependencies>
+ <dependency>
+ <groupId>org.jboss.osgi</groupId>
+ <artifactId>jboss-osgi-spi</artifactId>
+ <version>${version}</version>
+ </dependency>
<!-- Provided Dependencies -->
<dependency>
@@ -31,6 +36,13 @@
<artifactId>org.osgi.compendium</artifactId>
<scope>provided</scope>
</dependency>
+
+ <!-- Bundle Dependencies -->
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jbossxb-bundle</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<!-- Build -->
Copied: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/BlueprintType.java (from rev 88810, projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tblueprint.java)
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/BlueprintType.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/BlueprintType.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,289 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.model;
+
+// $Id$
+
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.xml.namespace.QName;
+
+/**
+ * <p>
+ * Java class for Tblueprint complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * <complexType name="Tblueprint">
+ * <complexContent>
+ * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tdescription" minOccurs="0"/>
+ * <element name="type-converters" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttype-converters" minOccurs="0"/>
+ * <choice maxOccurs="unbounded" minOccurs="0">
+ * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}allComponents"/>
+ * </choice>
+ * </sequence>
+ * <attribute name="default-lazy-init" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tlazy-init" default="false" />
+ * <attribute name="default-init-method" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * <attribute name="default-destroy-method" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
+ * <attribute name="default-timeout" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttimeout" default="300000" />
+ * <attribute name="default-availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" default="mandatory" />
+ * <anyAttribute processContents='lax' namespace='##other'/>
+ * </restriction>
+ * </complexContent>
+ * </complexType>
+ * </pre>
+ *
+ *
+ */
+public class BlueprintType
+{
+ public enum Availability
+ {
+ mandatory, optional
+ };
+
+ protected Tdescription description;
+ protected TtypeConverters typeConverters;
+ protected List<Object> serviceOrRefListOrRefSet;
+ protected Boolean defaultLazyInit;
+ protected String defaultInitMethod;
+ protected String defaultDestroyMethod;
+ protected BigInteger defaultTimeout;
+ protected String defaultAvailability = Availability.mandatory.toString();
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is {@link Tdescription }
+ *
+ */
+ public Tdescription getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value allowed object is {@link Tdescription }
+ *
+ */
+ public void setDescription(Tdescription value)
+ {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the typeConverters property.
+ *
+ * @return possible object is {@link TtypeConverters }
+ *
+ */
+ public TtypeConverters getTypeConverters()
+ {
+ return typeConverters;
+ }
+
+ /**
+ * Sets the value of the typeConverters property.
+ *
+ * @param value allowed object is {@link TtypeConverters }
+ *
+ */
+ public void setTypeConverters(TtypeConverters value)
+ {
+ this.typeConverters = value;
+ }
+
+ /**
+ * Gets the value of the serviceOrRefListOrRefSet property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the serviceOrRefListOrRefSet property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getServiceOrRefListOrRefSet().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link TrefCollection }{@code >} {@link JAXBElement }{@code <}
+ * {@link Treference }{@code >} {@link JAXBElement }{@code <}{@link Tservice }{@code >} {@link JAXBElement }{@code <}{@link TrefCollection }{@code >} {@link JAXBElement }
+ * {@code <}{@link Tref }{@code >} {@link Object } {@link JAXBElement }{@code <}{@link Tbean }{@code >}
+ *
+ *
+ */
+ public List<Object> getServiceOrRefListOrRefSet()
+ {
+ if (serviceOrRefListOrRefSet == null)
+ {
+ serviceOrRefListOrRefSet = new ArrayList<Object>();
+ }
+ return this.serviceOrRefListOrRefSet;
+ }
+
+ /**
+ * Gets the value of the defaultLazyInit property.
+ *
+ * @return possible object is {@link Boolean }
+ *
+ */
+ public Boolean isDefaultLazyInit()
+ {
+ return defaultLazyInit;
+ }
+
+ /**
+ * Sets the value of the defaultLazyInit property.
+ *
+ * @param value allowed object is {@link Boolean }
+ *
+ */
+ public void setDefaultLazyInit(Boolean value)
+ {
+ this.defaultLazyInit = value;
+ }
+
+ /**
+ * Gets the value of the defaultInitMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDefaultInitMethod()
+ {
+ return defaultInitMethod;
+ }
+
+ /**
+ * Sets the value of the defaultInitMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDefaultInitMethod(String value)
+ {
+ this.defaultInitMethod = value;
+ }
+
+ /**
+ * Gets the value of the defaultDestroyMethod property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getDefaultDestroyMethod()
+ {
+ return defaultDestroyMethod;
+ }
+
+ /**
+ * Sets the value of the defaultDestroyMethod property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setDefaultDestroyMethod(String value)
+ {
+ this.defaultDestroyMethod = value;
+ }
+
+ /**
+ * Gets the value of the defaultTimeout property.
+ *
+ * @return possible object is {@link BigInteger }
+ *
+ */
+ public BigInteger getDefaultTimeout()
+ {
+ if (defaultTimeout == null)
+ {
+ return new BigInteger("300000");
+ }
+ else
+ {
+ return defaultTimeout;
+ }
+ }
+
+ /**
+ * Sets the value of the defaultTimeout property.
+ *
+ * @param value allowed object is {@link BigInteger }
+ *
+ */
+ public void setDefaultTimeout(BigInteger value)
+ {
+ this.defaultTimeout = value;
+ }
+
+ /**
+ * Gets the value of the defaultAvailability property.
+ *
+ * @return possible object is {@link Tavailability }
+ *
+ */
+ public String getDefaultAvailability()
+ {
+ return defaultAvailability;
+ }
+
+ /**
+ * Sets the value of the defaultAvailability property.
+ *
+ * @param value allowed object is {@link Tavailability }
+ *
+ */
+ public void setDefaultAvailability(String value)
+ {
+ this.defaultAvailability = value;
+ }
+
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
+
+}
Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tavailability.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tavailability.java 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tavailability.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -1,50 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.model;
-
-
-/**
- * <p>Java class for Tavailability.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- * <p>
- * <pre>
- * <simpleType name="Tavailability">
- * <restriction base="{http://www.w3.org/2001/XMLSchema}token">
- * <enumeration value="mandatory"/>
- * <enumeration value="optional"/>
- * </restriction>
- * </simpleType>
- * </pre>
- *
- */
-public enum Tavailability {
-
- MANDATORY("mandatory"),
- OPTIONAL("optional");
- private final String value;
-
- Tavailability(String v) {
- value = v;
- }
-
- public String value() {
- return value;
- }
-
- public static Tavailability fromValue(String v) {
- for (Tavailability c: Tavailability.values()) {
- if (c.value.equals(v)) {
- return c;
- }
- }
- throw new IllegalArgumentException(v);
- }
-
-}
Deleted: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tblueprint.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tblueprint.java 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/Tblueprint.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -1,293 +0,0 @@
-//
-// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-793
-// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
-// Any modifications to this file will be lost upon recompilation of the source schema.
-// Generated on: 2009.05.13 at 02:16:52 PM CEST
-//
-
-
-package org.jboss.osgi.blueprint.model;
-
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.xml.namespace.QName;
-
-
-/**
- * <p>Java class for Tblueprint complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Tblueprint">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tdescription" minOccurs="0"/>
- * <element name="type-converters" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttype-converters" minOccurs="0"/>
- * <choice maxOccurs="unbounded" minOccurs="0">
- * <group ref="{http://www.osgi.org/xmlns/blueprint/v1.0.0}allComponents"/>
- * </choice>
- * </sequence>
- * <attribute name="default-lazy-init" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tlazy-init" default="false" />
- * <attribute name="default-init-method" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="default-destroy-method" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tmethod" />
- * <attribute name="default-timeout" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Ttimeout" default="300000" />
- * <attribute name="default-availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" default="mandatory" />
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
-public class Tblueprint {
-
- protected Tdescription description;
- protected TtypeConverters typeConverters;
- protected List<Object> serviceOrRefListOrRefSet;
- protected Boolean defaultLazyInit;
- protected String defaultInitMethod;
- protected String defaultDestroyMethod;
- protected BigInteger defaultTimeout;
- protected Tavailability defaultAvailability;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
-
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link Tdescription }
- *
- */
- public Tdescription getDescription() {
- return description;
- }
-
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link Tdescription }
- *
- */
- public void setDescription(Tdescription value) {
- this.description = value;
- }
-
- /**
- * Gets the value of the typeConverters property.
- *
- * @return
- * possible object is
- * {@link TtypeConverters }
- *
- */
- public TtypeConverters getTypeConverters() {
- return typeConverters;
- }
-
- /**
- * Sets the value of the typeConverters property.
- *
- * @param value
- * allowed object is
- * {@link TtypeConverters }
- *
- */
- public void setTypeConverters(TtypeConverters value) {
- this.typeConverters = value;
- }
-
- /**
- * Gets the value of the serviceOrRefListOrRefSet property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the serviceOrRefListOrRefSet property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getServiceOrRefListOrRefSet().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link JAXBElement }{@code <}{@link TrefCollection }{@code >}
- * {@link JAXBElement }{@code <}{@link Treference }{@code >}
- * {@link JAXBElement }{@code <}{@link Tservice }{@code >}
- * {@link JAXBElement }{@code <}{@link TrefCollection }{@code >}
- * {@link JAXBElement }{@code <}{@link Tref }{@code >}
- * {@link Object }
- * {@link JAXBElement }{@code <}{@link Tbean }{@code >}
- *
- *
- */
- public List<Object> getServiceOrRefListOrRefSet() {
- if (serviceOrRefListOrRefSet == null) {
- serviceOrRefListOrRefSet = new ArrayList<Object>();
- }
- return this.serviceOrRefListOrRefSet;
- }
-
- /**
- * Gets the value of the defaultLazyInit property.
- *
- * @return
- * possible object is
- * {@link Boolean }
- *
- */
- public boolean isDefaultLazyInit() {
- if (defaultLazyInit == null) {
- return false;
- } else {
- return defaultLazyInit;
- }
- }
-
- /**
- * Sets the value of the defaultLazyInit property.
- *
- * @param value
- * allowed object is
- * {@link Boolean }
- *
- */
- public void setDefaultLazyInit(Boolean value) {
- this.defaultLazyInit = value;
- }
-
- /**
- * Gets the value of the defaultInitMethod property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDefaultInitMethod() {
- return defaultInitMethod;
- }
-
- /**
- * Sets the value of the defaultInitMethod property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDefaultInitMethod(String value) {
- this.defaultInitMethod = value;
- }
-
- /**
- * Gets the value of the defaultDestroyMethod property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getDefaultDestroyMethod() {
- return defaultDestroyMethod;
- }
-
- /**
- * Sets the value of the defaultDestroyMethod property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setDefaultDestroyMethod(String value) {
- this.defaultDestroyMethod = value;
- }
-
- /**
- * Gets the value of the defaultTimeout property.
- *
- * @return
- * possible object is
- * {@link BigInteger }
- *
- */
- public BigInteger getDefaultTimeout() {
- if (defaultTimeout == null) {
- return new BigInteger("300000");
- } else {
- return defaultTimeout;
- }
- }
-
- /**
- * Sets the value of the defaultTimeout property.
- *
- * @param value
- * allowed object is
- * {@link BigInteger }
- *
- */
- public void setDefaultTimeout(BigInteger value) {
- this.defaultTimeout = value;
- }
-
- /**
- * Gets the value of the defaultAvailability property.
- *
- * @return
- * possible object is
- * {@link Tavailability }
- *
- */
- public Tavailability getDefaultAvailability() {
- if (defaultAvailability == null) {
- return Tavailability.MANDATORY;
- } else {
- return defaultAvailability;
- }
- }
-
- /**
- * Sets the value of the defaultAvailability property.
- *
- * @param value
- * allowed object is
- * {@link Tavailability }
- *
- */
- public void setDefaultAvailability(Tavailability value) {
- this.defaultAvailability = value;
- }
-
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
-
-}
Modified: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/TserviceReference.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/TserviceReference.java 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/model/TserviceReference.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -5,7 +5,6 @@
// Generated on: 2009.05.13 at 02:16:52 PM CEST
//
-
package org.jboss.osgi.blueprint.model;
import java.util.ArrayList;
@@ -13,277 +12,263 @@
import java.util.List;
import java.util.Map;
import javax.xml.namespace.QName;
+
+import org.jboss.osgi.blueprint.model.BlueprintType.Availability;
import org.w3c.dom.Element;
-
/**
*
- *
- * TserviceReference is the base element type used for <reference>,
- * <ref-set>, and <ref-list> elements. This type defines all of the
- * characteristics common to both sorts of references.
- *
- *
*
- * <p>Java class for TserviceReference complex type.
+ * TserviceReference is the base element type used for <reference>, <ref-set>, and <ref-list> elements. This type defines all of the characteristics common to both
+ * sorts of references.
*
- * <p>The following schema fragment specifies the expected content contained within this class.
*
+ *
+ * <p>
+ * Java class for TserviceReference complex type.
+ *
+ * <p>
+ * The following schema fragment specifies the expected content contained within this class.
+ *
* <pre>
- * <complexType name="TserviceReference">
- * <complexContent>
- * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tcomponent">
- * <sequence>
- * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tdescription" minOccurs="0"/>
- * <element name="interfaces" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tinterfaces" minOccurs="0"/>
- * <element name="listener" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TReferenceListener" maxOccurs="unbounded" minOccurs="0"/>
- * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- * </sequence>
- * <attribute name="interface" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
- * <attribute name="filter" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
- * <attribute name="component-name" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
- * <attribute name="availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" />
- * <anyAttribute processContents='lax' namespace='##other'/>
- * </extension>
- * </complexContent>
- * </complexType>
+ * <complexType name="TserviceReference">
+ * <complexContent>
+ * <extension base="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tcomponent">
+ * <sequence>
+ * <element name="description" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tdescription" minOccurs="0"/>
+ * <element name="interfaces" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tinterfaces" minOccurs="0"/>
+ * <element name="listener" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}TReferenceListener" maxOccurs="unbounded" minOccurs="0"/>
+ * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
+ * </sequence>
+ * <attribute name="interface" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tclass" />
+ * <attribute name="filter" type="{http://www.w3.org/2001/XMLSchema}normalizedString" />
+ * <attribute name="component-name" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tidref" />
+ * <attribute name="availability" type="{http://www.osgi.org/xmlns/blueprint/v1.0.0}Tavailability" />
+ * <anyAttribute processContents='lax' namespace='##other'/>
+ * </extension>
+ * </complexContent>
+ * </complexType>
* </pre>
*
*
*/
-public class TserviceReference
- extends Tcomponent
+public class TserviceReference extends Tcomponent
{
- protected Tdescription description;
- protected Tinterfaces interfaces;
- protected List<TReferenceListener> listener;
- protected List<Object> any;
- protected String _interface;
- protected String filter;
- protected String componentName;
- protected Tavailability availability;
- private Map<QName, String> otherAttributes = new HashMap<QName, String>();
+ protected Tdescription description;
+ protected Tinterfaces interfaces;
+ protected List<TReferenceListener> listener;
+ protected List<Object> any;
+ protected String _interface;
+ protected String filter;
+ protected String componentName;
+ protected Availability availability;
+ private Map<QName, String> otherAttributes = new HashMap<QName, String>();
- /**
- * Gets the value of the description property.
- *
- * @return
- * possible object is
- * {@link Tdescription }
- *
- */
- public Tdescription getDescription() {
- return description;
- }
+ /**
+ * Gets the value of the description property.
+ *
+ * @return possible object is {@link Tdescription }
+ *
+ */
+ public Tdescription getDescription()
+ {
+ return description;
+ }
- /**
- * Sets the value of the description property.
- *
- * @param value
- * allowed object is
- * {@link Tdescription }
- *
- */
- public void setDescription(Tdescription value) {
- this.description = value;
- }
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value allowed object is {@link Tdescription }
+ *
+ */
+ public void setDescription(Tdescription value)
+ {
+ this.description = value;
+ }
- /**
- * Gets the value of the interfaces property.
- *
- * @return
- * possible object is
- * {@link Tinterfaces }
- *
- */
- public Tinterfaces getInterfaces() {
- return interfaces;
- }
+ /**
+ * Gets the value of the interfaces property.
+ *
+ * @return possible object is {@link Tinterfaces }
+ *
+ */
+ public Tinterfaces getInterfaces()
+ {
+ return interfaces;
+ }
- /**
- * Sets the value of the interfaces property.
- *
- * @param value
- * allowed object is
- * {@link Tinterfaces }
- *
- */
- public void setInterfaces(Tinterfaces value) {
- this.interfaces = value;
- }
+ /**
+ * Sets the value of the interfaces property.
+ *
+ * @param value allowed object is {@link Tinterfaces }
+ *
+ */
+ public void setInterfaces(Tinterfaces value)
+ {
+ this.interfaces = value;
+ }
- /**
- * Gets the value of the listener property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the listener property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getListener().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link TReferenceListener }
- *
- *
- */
- public List<TReferenceListener> getListener() {
- if (listener == null) {
- listener = new ArrayList<TReferenceListener>();
- }
- return this.listener;
- }
+ /**
+ * Gets the value of the listener property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the listener property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getListener().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link TReferenceListener }
+ *
+ *
+ */
+ public List<TReferenceListener> getListener()
+ {
+ if (listener == null)
+ {
+ listener = new ArrayList<TReferenceListener>();
+ }
+ return this.listener;
+ }
- /**
- * Gets the value of the any property.
- *
- * <p>
- * This accessor method returns a reference to the live list,
- * not a snapshot. Therefore any modification you make to the
- * returned list will be present inside the JAXB object.
- * This is why there is not a <CODE>set</CODE> method for the any property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getAny().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Object }
- * {@link Element }
- *
- *
- */
- public List<Object> getAny() {
- if (any == null) {
- any = new ArrayList<Object>();
- }
- return this.any;
- }
+ /**
+ * Gets the value of the any property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the
+ * JAXB object. This is why there is not a <CODE>set</CODE> method for the any property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ *
+ * <pre>
+ * getAny().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list {@link Object } {@link Element }
+ *
+ *
+ */
+ public List<Object> getAny()
+ {
+ if (any == null)
+ {
+ any = new ArrayList<Object>();
+ }
+ return this.any;
+ }
- /**
- * Gets the value of the interface property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getInterface() {
- return _interface;
- }
+ /**
+ * Gets the value of the interface property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getInterface()
+ {
+ return _interface;
+ }
- /**
- * Sets the value of the interface property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setInterface(String value) {
- this._interface = value;
- }
+ /**
+ * Sets the value of the interface property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setInterface(String value)
+ {
+ this._interface = value;
+ }
- /**
- * Gets the value of the filter property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getFilter() {
- return filter;
- }
+ /**
+ * Gets the value of the filter property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getFilter()
+ {
+ return filter;
+ }
- /**
- * Sets the value of the filter property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setFilter(String value) {
- this.filter = value;
- }
+ /**
+ * Sets the value of the filter property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setFilter(String value)
+ {
+ this.filter = value;
+ }
- /**
- * Gets the value of the componentName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- public String getComponentName() {
- return componentName;
- }
+ /**
+ * Gets the value of the componentName property.
+ *
+ * @return possible object is {@link String }
+ *
+ */
+ public String getComponentName()
+ {
+ return componentName;
+ }
- /**
- * Sets the value of the componentName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setComponentName(String value) {
- this.componentName = value;
- }
+ /**
+ * Sets the value of the componentName property.
+ *
+ * @param value allowed object is {@link String }
+ *
+ */
+ public void setComponentName(String value)
+ {
+ this.componentName = value;
+ }
- /**
- * Gets the value of the availability property.
- *
- * @return
- * possible object is
- * {@link Tavailability }
- *
- */
- public Tavailability getAvailability() {
- return availability;
- }
+ /**
+ * Gets the value of the availability property.
+ *
+ * @return possible object is {@link Tavailability }
+ *
+ */
+ public Availability getAvailability()
+ {
+ return availability;
+ }
- /**
- * Sets the value of the availability property.
- *
- * @param value
- * allowed object is
- * {@link Tavailability }
- *
- */
- public void setAvailability(Tavailability value) {
- this.availability = value;
- }
+ /**
+ * Sets the value of the availability property.
+ *
+ * @param value allowed object is {@link Tavailability }
+ *
+ */
+ public void setAvailability(String value)
+ {
+ this.availability = Availability.valueOf(value);
+ }
- /**
- * Gets a map that contains attributes that aren't bound to any typed property on this class.
- *
- * <p>
- * the map is keyed by the name of the attribute and
- * the value is the string value of the attribute.
- *
- * the map returned by this method is live, and you can add new attribute
- * by updating the map directly. Because of this design, there's no setter.
- *
- *
- * @return
- * always non-null
- */
- public Map<QName, String> getOtherAttributes() {
- return otherAttributes;
- }
+ /**
+ * Gets a map that contains attributes that aren't bound to any typed property on this class.
+ *
+ * <p>
+ * the map is keyed by the name of the attribute and the value is the string value of the attribute.
+ *
+ * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter.
+ *
+ *
+ * @return always non-null
+ */
+ public Map<QName, String> getOtherAttributes()
+ {
+ return otherAttributes;
+ }
}
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser;
+
+//$Id$
+
+/**
+ * The Blueprint implementation throws this exception on various
+ * error conditions.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class BlueprintException extends RuntimeException
+{
+ private static final long serialVersionUID = 1L;
+
+ public BlueprintException(String message, Throwable cause)
+ {
+ super(message, cause);
+ }
+
+ public BlueprintException(String message)
+ {
+ super(message);
+ }
+
+ public BlueprintException(Throwable cause)
+ {
+ super(cause);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintException.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.blueprint.parser;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.osgi.blueprint.model.BlueprintType;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.XsdBinder;
+
+/**
+ * The Blueprint descriptor parser.
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class BlueprintParser
+{
+ /**
+ * Parse a blueprint descriptor
+ */
+ public BlueprintType parse(URL xmlURL)
+ {
+ if (xmlURL == null)
+ throw new IllegalArgumentException("Cannot parse null descriptor URL");
+
+ try
+ {
+ ClassLoader resourceLoader = getClass().getClassLoader();
+ URL schemaXSD = resourceLoader.getResource("schema/blueprint-jbxb.xsd");
+ if (schemaXSD == null)
+ throw new BlueprintException("Cannot get blueprint schema from: " + resourceLoader);
+
+ SchemaBinding schema = XsdBinder.bind(schemaXSD.toExternalForm());
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ return (BlueprintType)unmarshaller.unmarshal(xmlURL.toExternalForm(), schema);
+ }
+ catch (JBossXBException ex)
+ {
+ throw new BlueprintException("Cannot parse blueprint descriptor: " + xmlURL, ex);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/main/java/org/jboss/osgi/blueprint/parser/BlueprintParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/main/resources/schema/blueprint-jbxb.xsd
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/main/resources/schema/blueprint-jbxb.xsd (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/main/resources/schema/blueprint-jbxb.xsd 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,1129 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ /*
+ * $Revision$
+ *
+ * Copyright (c) OSGi Alliance (2008, 2009). All Rights Reserved.
+ *
+ * Licensed 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.
+ */
+ -->
+<xsd:schema xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" targetNamespace="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jbxb="http://www.jboss.org/xml/ns/jbxb"
+ elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0.0">
+
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ This is the XML Schema for the OSGi Blueprint service 1.0.0
+ development descriptor. Blueprint configuration files
+ using this schema must indicate the schema using the
+ blueprint/v1.0.0 namespace. For example,
+
+ <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ if used as a qualified namespace, "bp:" is the recommended
+ namespace prefix.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <!-- Schema elements for core component declarations -->
+
+ <xsd:complexType name="Tcomponent" abstract="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+
+ The Tcomponent type is the base type for top-level
+ Blueprint components. The <bean> <reference>, <service>,
+ <ref-set>, and <ref-list> elements are all derived from
+ the Tcomponent type. This type defines an id attributre
+ that is used create references between different components.
+ Component elements can also be inlined within other component
+ definitions. The id attribute is not valid when inliine.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:attribute name="id" type="xsd:ID" />
+ </xsd:complexType>
+
+ <xsd:element name="blueprint" type="Tblueprint">
+ <xsd:annotation>
+ <xsd:appinfo>
+ <jbxb:class impl="org.jboss.osgi.blueprint.model.BlueprintType"></jbxb:class>
+ </xsd:appinfo>
+ <xsd:documentation>
+ <![CDATA[
+
+ The <blueprint> element is the root element for a blueprint
+ configuration file. A blueprint configuration has two sections.
+ The first section (contained within <type-converters> elements)
+ identifies components that are used for converting values into
+ different target types. The type converters are optional, so
+ the file does not need to specify a type converter section.
+
+ Following the type converters are the component definitions.
+ Components are <bean>, <service>, <reference>, <ref-set>, and
+ <ref-list> elements that identify the bundle components that will
+ be managed by the blueprint service.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:complexType name="Tblueprint">
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:element name="type-converters" type="Ttype-converters" minOccurs="0"
+ maxOccurs="1" />
+ <!-- top-level components -->
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="allComponents" />
+ </xsd:choice>
+ </xsd:sequence>
+
+ <!-- Defaults-->
+ <xsd:attribute name="default-lazy-init" default="false" type="Tlazy-init">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default lazy-init setting that will be defined
+ for <bean> components. If not specified, the global
+ default is "false". Individual <bean> components may
+ override the default
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-init-method" type="Tmethod">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default init-method that will be defined
+ for <bean> components. If not specified, no default
+ init-method is defined. It is not an error for a
+ bean to not implement the indicated default init-method.
+ The value will be ignored. A bean can also specify
+ a different init-method or disable the init-method
+ call by specifying an init-method value of "".
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-destroy-method" type="Tmethod">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default destroy-method that will be defined
+ for <bean> components. If not specified, no default
+ destroy-method is defined. It is not an error for a
+ bean to not implement the indicated default destroy-method.
+ The value will be ignored. A bean can also specify
+ a different destroy-method or disable the destroy-method
+ call by specifying a destroy-method value of "".
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-timeout" type="Ttimeout" default="300000">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default timeout value to be used when operations
+ are invoked on unstatisfied service references. If the
+ reference does not change to a satisfied state within the timeout
+ window, an error is raised on the method invocation. The
+ default timeout value is 300000 milliseconds and individual
+ <reference> element can override the specified configuration
+ default.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="default-availability" type="Tavailability" default="mandatory">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Specifies the default availability value to be used for
+ <reference>, <ref-set>, and <ref-list> components. The
+ normal default is "mandatory", and can be changed by individual
+ service reference components.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:complexType>
+
+ <xsd:complexType name="Ttype-converters">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type used for the <type-converters> element. The
+ <type-converters> section is a set of <bean>, <ref>, or
+ <reference> elements that identify the type convert components
+ that will ference components.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:group ref="targetComponent" />
+ </xsd:choice>
+ </xsd:complexType>
+
+ <!-- Components that provide a reasonable target for injection
+ used for listeners, etc. -->
+
+ <xsd:group name="targetComponent">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A targetcomponent is one that can be a target for a
+ listener, registration-listener, or type-converter element.
+ This is used in contexts where the requirement is a single
+ provided object that will implement a particular interface.
+ The provided object is obtained either from a <ref> element
+ or inline (<bean> or <reference>).
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="bean" type="Tbean" />
+ <xsd:element name="reference" type="Treference" />
+ <xsd:element name="refFIXME" type="Tref" />
+ <xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:group name="allComponents">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ allComponents is used in contexts where all component element
+ types are value. The set of component elements contains
+ <bean>, <service>, <reference>, <ref-set>, and <ref-list>.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:element name="service" type="Tservice" />
+ <xsd:element name="ref-list" type="Tref-collection" />
+ <xsd:element name="ref-set" type="Tref-collection" />
+ <xsd:group ref="targetComponent" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:group name="beanElements">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A reusable definition of the elements allowed on a <bean> element.
+ This definition is also used by the <bpcm:managed-component>
+ element used in the blueprint-cm schema.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="argument" type="Targument" />
+ <xsd:element name="property" type="Tproperty" />
+ <xsd:any namespace="##other" processContents="strict" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="Tbean">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type defintion for a <bean> component.
+ This definition is also used by the <bpcm:managed-component>
+ element used in the blueprint-cm schema. The <bean> attributes
+ provide the characteristics for how to create a bean instance.
+ Constructor arguments and injected properties are specified
+ via child <argument> and <property> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
+ <xsd:group ref="beanElements" />
+ <xsd:attribute name="class" type="Tclass" />
+ <xsd:attribute name="depends-on" type="TdependsOn" />
+ <xsd:attribute name="init-method" type="TnullableMethod" />
+ <xsd:attribute name="destroy-method" type="TnullableMethod" />
+ <xsd:attribute name="factory-method" type="Tmethod" />
+ <xsd:attribute name="factory-component" type="Tidref" />
+
+ <xsd:attribute name="scope">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="singleton" />
+ <xsd:enumeration value="prototype" />
+ <xsd:enumeration value="bundle" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+
+ <xsd:attribute name="lazy-init" type="Tlazy-init">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The lazy-init attribute for this <bean>. This can either
+ be "eager" ("false") or "lazy" ("true"). If not specified, it
+ defaults to default-lazy-init attribute of the enclosing
+ <blueprint> element. The default, default is "eager"
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="Targument">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An argument used to create an object defined by a <bean>
+ component. The <argument> elements are the arguments for the
+ bean class constructor or passed to the bean factory method.
+
+ The type, if specified, is used to disambiguate the constructor
+ or method signature. Arguments may also be matched up with
+ arguments by explicitly specifying the index position. If the
+ index is used, then all <argument> elements for the bean must
+ also specify the index.
+
+ The value and ref attributes are convenience shortcuts to make
+ the <argument> tag easier to code. A fuller set of injected
+ values and types can be specified using one of the "value"
+ type elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:group ref="value" />
+ </xsd:sequence>
+ <xsd:attribute name="index" type="xsd:nonNegativeInteger" />
+ <xsd:attribute name="type" type="Tclass" />
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="valueFIXME" type="TstringValue" />
+ </xsd:complexType>
+
+ <xsd:complexType name="Tproperty">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A property that will be injected into a created <bean>
+ component. The <property> elements correspond to named
+ JavaBean setting methods for a created bean object.
+
+ The value and ref attributes are convenience shortcuts to make
+ the <argument> tag easier to code. A fuller set of injected
+ values and types can be specified using one of the "value"
+ type elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:group ref="value" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="Tmethod" use="required" />
+ <xsd:attribute name="ref" type="Tidref" />
+ <xsd:attribute name="valueFIXME" type="TstringValue" />
+ </xsd:complexType>
+
+ <xsd:complexType name="Tkey">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tkey type defines the element types that are permitted
+ for Map key situations. These can be any of the "value"
+ types other than the <null> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group ref="nonNullValue" />
+ </xsd:complexType>
+
+ <!-- reference -->
+ <xsd:complexType name="Treference">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Treference type defines the <reference> element. These
+ are instances of the TserviceReference type, with the addition
+ of a timeout attribute. If the timeout is not specified,
+ the default-timeout value is inherited from the encapsulating
+ <blueprint> definition.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TserviceReference">
+ <xsd:attribute name="timeout" use="optional" type="Ttimeout" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <!-- ref-set, ref-list -->
+ <xsd:complexType name="Tref-collection">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The Tref-collection builds in the characteristics of the
+ TserviceReference type to define characteristics of the <ref-set>
+ and <ref-list> elements. This adds in the characteristics that
+ only apply to collections of references (e.g., sorting).
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TserviceReference">
+ <xsd:sequence>
+ <xsd:element name="comparator" type="Tcomparator" minOccurs="0"
+ maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The <comparator> element defines a comparator instance that will
+ be used to sort the constructed reference collection.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+
+ <xsd:attribute name="comparator-ref" type="xsd:token" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A shortcut alternative to using a <comparator> element when the
+ comparator target is a top-level <bean> or <service> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+
+ <xsd:attribute name="member-type" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Indicates the type of object that will be placed within the
+ reference collection. "service-instance" indicates the collection
+ contains blueprint proxies for imported services. "service-reference"
+ indicates the collection contains ServiceReferenc objects matching
+ the target service type.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="service-instance" />
+ <xsd:enumeration value="service-reference" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+
+ <xsd:attribute name="ordering-basis" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Indicates how collection sorting is handled. An ordering
+ basis of "service" indicates sorting is handled using the service
+ instance. "service-reference" indicates sorting is accomplished using
+ the ServiceReference objects for the contained services. The default
+ value is an implicit "none", indicating no sorting should be performed.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:NMTOKEN">
+ <xsd:enumeration value="service" />
+ <xsd:enumeration value="service-reference" />
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <!-- Reference base class -->
+ <xsd:complexType name="TserviceReference">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TserviceReference is the base element type used for <reference>,
+ <ref-set>, and <ref-list> elements. This type defines all of the
+ characteristics common to both sorts of references.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:element name="interfaces" minOccurs="0" maxOccurs="1" type="Tinterfaces">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The definition of the required interfaces that the obtained services
+ must implement. There is also a shortcut attribute defined for
+ the typical case of just a single interface class.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <!-- listener -->
+ <xsd:element name="listener" type="TReferenceListener" minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A definition of a listener that will watch for bind/unbind events
+ associated with the service reference. The targetted listener can
+ be a <ref> to a <bean> or <reference> element, or an inline
+ <bean> or <reference>.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="lax" />
+ </xsd:sequence>
+
+ <xsd:attribute name="interface" use="optional" type="Tclass" />
+ <xsd:attribute name="filter" use="optional" type="xsd:normalizedString">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A filter string used to narrow the search for a matching service
+ reference.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="component-name" type="Tidref" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ An optional specifier that can be used to match a service definition
+ to one created by a specific blueprint component.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="availability" type="Tavailability" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Use to control the initial processing of service references at
+ blueprint context startup. "mandatory" indicates the context
+ should not start unless the service is available within the
+ specified context startup period. "optional" indicates availability
+ of this service is not a requirement at bundle startup.
+
+ NOTE: No default is specified because this can be overridden
+ by the default-availability attribute of the <blueprint> element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="TReferenceListener">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TReferenceListener defines a reference listener that is attached
+ to a <reference>, <ref-set>, or <ref-list> element. The listener
+ object can be specified as a <ref> or as an inline <bean> or
+ <reference> component. Listener events are mapped to the indicated
+ bind or unbind methods.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group ref="targetComponent" />
+ <xsd:attribute name="ref" type="xsd:token" use="optional" />
+ <xsd:attribute name="bind-method" type="Tmethod" use="required" />
+ <xsd:attribute name="unbind-method" type="Tmethod" use="required" />
+ </xsd:complexType>
+
+ <xsd:simpleType name="Tlazy-init">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tlazy-init defines a lazy-init type. This is used in this
+ schema by the <blueprint> default-lazy-init attribute and the
+ <bean> lazy-init attribute.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:boolean" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Tavailability">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tlazy-init defines an availability attribute type. This is used in this
+ schema by the <blueprint> default-availability attribute and the
+ <reference>, <ref-set>, and <ref-list> availability attribute.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="mandatory" />
+ <xsd:enumeration value="optional" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:complexType name="Tcomparator">
+ <xsd:group ref="targetComponent" />
+ </xsd:complexType>
+
+ <!-- service -->
+
+ <xsd:complexType name="Tservice">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tservice is the type for services exported by this blueprint bundle.
+ Services are sourced by either a <ref> to a <bean> component or an
+ <inline> bean component.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="Tcomponent">
+ <xsd:sequence>
+ <xsd:group ref="serviceElements" />
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"
+ processContents="lax" />
+ </xsd:sequence>
+ <xsd:attribute name="interface" type="Tclass" use="optional" />
+ <xsd:attribute name="ref" type="Tidref" use="optional" />
+ <xsd:attribute name="depends-on" type="TdependsOn" use="optional">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ depends-on identifies (by name) other components that this service
+ depends on. The service will only be registered after the
+ depends-on services are successfully completed. Also, if there
+ are <reference>, <ref-list>, <ref-set> elements with unstatisfied
+ manadatory references, then the depends-on relationship will also
+ be used to determine whether this service is registered or
+ unregistered.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:attribute name="auto-export" type="TautoExportModes" default="disabled" />
+ <xsd:attribute name="ranking" type="xsd:int" default="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A service ranking value that is added to the service properties
+ the service will be published with.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:attribute>
+ <xsd:anyAttribute namespace="##other" processContents="lax" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:group name="serviceElements">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set of service elements that is shared by the <service> element
+ in this schema and the <managed-service-factory> element in the
+ blueprint-cm schema.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="description" type="Tdescription" minOccurs="0" />
+ <xsd:element name="interfaces" type="Tinterfaces" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A collection of one or more interface class names this service
+ will be registered under. The <service> element also has
+ a shortcut interface attribute for the usual case of just
+ a single interface being used. This also cannot be used if
+ the auto-export attribute is used.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+ <xsd:element name="service-properties" type="TserviceProperties" minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The service provided when the service is registered. The service
+ properties are similar to map elements, but the keys must always
+ be strings, and the values are required to be in a narrower range.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="registration-listener" type="TregistrationListener"
+ minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A set of 0 or more registration listeners attached to this service
+ component. The registration listeners will be notified whenever the
+ service is registered or unregistered from the framework service
+ registry.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ These are the two types of elements that can be bound as a service.
+ This will be either a <ref> to a <bean> component or an inline <bean> component.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="bean" type="Tbean" />
+ <xsd:element name="refFIXME" type="Tref" />
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:group>
+
+
+ <xsd:complexType name="TregistrationListener">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A registration listener definition. The target registration listener
+ can be either a <ref> to a <bean> or <service> component, or an inline
+ <bean> or <service> component definition. The registration-method and
+ unregistration-method attributes define the methods that will be called
+ for the respective events.
+
+ For the very common case of using a <ref> to a listener component, the
+ ref attribute may also be used as a shortcut.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:group ref="targetComponent" />
+ <xsd:attribute name="ref" type="Tidref" use="optional" />
+ <!-- ### why are there both required? -->
+ <xsd:attribute name="registration-method" type="Tmethod" use="required" />
+ <xsd:attribute name="unregistration-method" type="Tmethod" use="required" />
+ </xsd:complexType>
+
+ <!--
+ Values
+ -->
+
+ <xsd:group name="value">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The set of "value" types that can be used in any place a value
+ can be specified. This set includes the <ref> and <idref> elements, any of the
+ component types (<bean>, <service>, etc.) as inline components, the
+ generic <value> element for types sourced from string values, any of the
+ collection types (<set>, <list>, <array>, <map>, <props>), and the
+ <null> type to inject a null value.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice>
+ <xsd:group ref="nonNullValue" />
+ <xsd:element name="null" type="Tnull" />
+ </xsd:choice>
+ </xsd:group>
+
+ <xsd:complexType name="Tnull">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The definition for a <null> value type.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <!-- [FIXME] cannot be processed by xjc -->
+ <!-- xsd:choice minOccurs="0" maxOccurs="unbounded" / -->
+ </xsd:complexType>
+
+ <xsd:group name="nonNullValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The set of "value" types that can be used in any place a non-null value
+ can be specified. This set includes the <ref> and <idref> elements, any of the
+ component types (<bean>, <service>, etc.) as inline components, the
+ generic <value> element for types sourced from string values, and any of the
+ collection types (<set>, <list>, <array>, <map>, <props>).
+
+ The <null> type is NOT a member of this group.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="allComponents" />
+ <xsd:choice minOccurs="0" maxOccurs="1">
+ <xsd:element name="idref" type="Tref" />
+ <xsd:element name="value" type="Tvalue" />
+ <xsd:element name="list" type="Tcollection" />
+ <xsd:element name="set" type="Tcollection" />
+ <xsd:element name="map" type="Tmap" />
+ <xsd:element name="array" type="Tcollection" />
+ <xsd:element name="props" type="Tprops" />
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:group>
+
+ <xsd:complexType name="Tref">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tref is the type used for <ref> elements. This specifies a required
+ component id for the reference component.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="component" type="Tidref" use="required" />
+ </xsd:complexType>
+
+ <xsd:complexType name="Tvalue" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tvalue is the type used for <value> elements. The <value> element
+ is used for types that can be created from a single string value.
+ The string value is the data value for the element. The optional
+ type attribute allows a target conversion value to be explicitly
+ specified.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="type" type="Tclass" use="optional" />
+ </xsd:complexType>
+
+ <!-- Collection Values -->
+
+ <xsd:complexType name="TtypedCollection">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TtypeCollection defines comment attributes shared among different
+ collection types that allow a default value type to be specified.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="value-type" type="Tclass" />
+ </xsd:complexType>
+
+
+ <xsd:complexType name="Tcollection">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tcollection is the base schema type for different ordered collection
+ types. This is shared between the <array>, <list>, and <set> elements.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TtypedCollection">
+ <xsd:group ref="value" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:complexType name="Tprops">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tprops is the type used by the <props> value element. The prop elements
+ are pairs of string-valued keys and values.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="prop" type="Tprop" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="Tprop" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tprop is a single property element for a <props> value type. The property
+ value can be specified using either the attribute, or as value data for
+ the property element.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:attribute name="key" type="TstringValue" use="required" />
+ <xsd:attribute name="value" type="TstringValue" use="optional" />
+ </xsd:complexType>
+
+ <!-- 'map' element type -->
+ <xsd:complexType name="Tmap">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tmap is the base type used for <map> elements. A map may have a
+ default value type specified, so it inherits from the TtypeCollection
+ type. A key type can also be specified, and the map members are
+ created from the entry elements, which require a key/value pair.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexContent>
+ <xsd:extension base="TtypedCollection">
+ <xsd:sequence>
+ <xsd:element name="entry" type="TmapEntry" minOccurs="0" maxOccurs="unbounded" />
+ </xsd:sequence>
+ <xsd:attribute name="key-type" type="Tclass" />
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <!-- 'entry' element type -->
+ <xsd:complexType name="TmapEntry">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TmapEntry is used for <entry> elements nested inside of a <map> element.
+ Each <entry> instance defines a key/value pair that will be added to the
+ Map. Both the keys and values may be arbitrary types. Keys must not
+ be <null> but <null> is permitted for entry values. A default type
+ can be specified for both the keys and the values, but individual keys
+ or values can override the default.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="keyFIXME" type="Tkey" minOccurs="0" />
+ <xsd:group ref="value" />
+ </xsd:sequence>
+ <xsd:attribute name="key" type="TstringValue" />
+ <xsd:attribute name="key-ref" type="Tidref" />
+ <xsd:attribute name="valueFIXME" type="TstringValue" />
+ <xsd:attribute name="value-ref" type="Tidref" />
+ </xsd:complexType>
+
+
+ <!-- 'service property' element type -->
+ <xsd:complexType name="TserviceProperties">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TserviceProperty is used for <service-properties> elements.
+ The syntax is similar to what is defined for <map>, but keys must be
+ string values and there are no type defaults that can be specified.
+ created from the entry elements, which require a key/value pair.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:element name="entry" type="TservicePropertyEntry" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <!-- 'entry' element type -->
+ <xsd:complexType name="TservicePropertyEntry">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TservicePropertyEntry is an entry value used for the <service-properties>
+ element. This does not allow a child <key> element and there are no
+ key-ref or value-ref attributes.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:sequence>
+ <xsd:group ref="value" />
+ </xsd:sequence>
+ <xsd:attribute name="key" type="TstringValue" use="required" />
+ <xsd:attribute name="valueFIXME" type="TstringValue" use="optional" />
+ </xsd:complexType>
+
+ <!-- General types -->
+
+ <xsd:complexType name="Tdescription" mixed="true">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ A generic <description> element type to allow documentation to added to the
+ blueprint configuration.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded" />
+ </xsd:complexType>
+
+ <xsd:complexType name="Tinterfaces">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ The type definition for the <interfaces> element used for <service>,
+ <reference>, <ref-set>, and <ref-list>;
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:choice minOccurs="1" maxOccurs="unbounded">
+ <xsd:element name="value" type="TinterfaceValue" />
+ </xsd:choice>
+ </xsd:complexType>
+
+ <xsd:simpleType name="TinterfaceValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TinterfaceValue is used for subelements of the <interfaces> element.
+ This is just a <value>xxxxx</value> element where the contained
+ value is the name of an interface class.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="Tclass" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Tclass">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tclass is a base type that should be used for all attributes that
+ refer to java class names or java types.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Tmethod">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tmethod is a base type that should be used for all attributes that
+ refer to java method names.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TnullableMethod">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tmethod is a base type that should be used for all attributes that
+ refer to java method names. This version also allows "" to be
+ specified to specify that no name should be used.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:pattern value="[\i-[:]][\c-[:]]*" />
+ <xsd:pattern value="" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <!-- Should be used for all attributes and elements that refer to method names -->
+ <xsd:simpleType name="Tidref">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Tidref is a base type that should be used for all attributes that
+ refer to component ids.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:NCName" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TstringValue">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TstringValue is a base type that should be used for all attributes that
+ refer to raw string values
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:normalizedString" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TautoExportModes">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TautoExportModes is a base type that should be used for export-mode
+ attributes. Also used by the blueprint-cm compendium.
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="disabled" />
+ <xsd:enumeration value="interfaces" />
+ <xsd:enumeration value="class-hierarchy" />
+ <xsd:enumeration value="all-classes" />
+ </xsd:restriction>
+ </xsd:simpleType>
+
+ <xsd:simpleType name="Ttimeout">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ Ttimeout is a base type that should be used for all attributes that
+ specify timeout values
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:unsignedLong" />
+ </xsd:simpleType>
+
+ <xsd:simpleType name="TdependsOn">
+ <xsd:annotation>
+ <xsd:documentation>
+ <![CDATA[
+ TdependsOn is a base type that should be used for all attributes that
+ specify depends-on relationships
+ ]]>
+ </xsd:documentation>
+ </xsd:annotation>
+ <xsd:restriction base="xsd:normalizedString" />
+ </xsd:simpleType>
+
+</xsd:schema>
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/main/resources/schema/blueprint-jbxb.xsd
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/ParserTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/ParserTestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/ParserTestCase.java 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.blueprint.parser;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.osgi.blueprint.parser.BlueprintParser;
+import org.jboss.osgi.spi.testing.OSGiTest;
+
+/**
+ * Blueprint parser tests
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 13-May-2009
+ */
+public class ParserTestCase extends OSGiTest
+{
+ public void testBlueprintBasic() throws Exception
+ {
+ URL xmlURL = getResourceURL("parser/blueprint-basic.xml");
+ BlueprintParser parser = new BlueprintParser();
+ parser.parse(xmlURL);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/java/org/jboss/test/osgi/blueprint/parser/ParserTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/log4j.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/log4j.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/log4j.xml 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="${log4j.output.dir}/test.log"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <param name="Threshold" value="INFO" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Show jboss deployer traces
+ <category name="org.jboss.deployers">
+ <priority value="TRACE" />
+ </category>
+ -->
+
+ <!-- Show jboss deployer traces -->
+ <category name="org.jboss.xb">
+ <priority value="TRACE" />
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <!--appender-ref ref="CONSOLE"/-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/blueprint-basic.xml
===================================================================
--- projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/blueprint-basic.xml (rev 0)
+++ projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/blueprint-basic.xml 2009-05-13 14:27:03 UTC (rev 88817)
@@ -0,0 +1,3 @@
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd schema/blueprint.xsd">
+
+</blueprint>
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/bundle/blueprint/src/test/resources/parser/blueprint-basic.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-05-13 13:58:47 UTC (rev 88816)
+++ projects/jboss-osgi/trunk/pom.xml 2009-05-13 14:27:03 UTC (rev 88817)
@@ -386,28 +386,20 @@
<repository>
<id>repository.jboss.org</id>
<name>JBoss Repository</name>
- <layout>default</layout>
<url>http://repository.jboss.org/maven2/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
</repository>
<repository>
- <id>aQute</id>
- <url>http://www.aQute.biz/repo</url>
- </repository>
- <repository>
<id>snapshots.jboss.org</id>
<name>JBoss Snapshots Repository</name>
- <layout>default</layout>
<url>http://snapshots.jboss.org/maven2/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
</repository>
+ <repository>
+ <id>aQute</id>
+ <url>http://www.aQute.biz/repo</url>
+ </repository>
</repositories>
<!-- PluginRepositories -->
More information about the jboss-osgi-commits
mailing list