Commit 55c0d305 authored by Lionel Seinturier's avatar Lionel Seinturier
Browse files

Rollback previous commit (that was not the issue: the support for <include>...

Rollback previous commit (that was not the issue: the support for <include> tags is provided by an extension of the parser in frascati-tinfi-sca-parser.)
parent 1e228ee8
......@@ -49,7 +49,6 @@ import org.eclipse.stp.sca.ComponentService;
import org.eclipse.stp.sca.Composite;
import org.eclipse.stp.sca.DocumentRoot;
import org.eclipse.stp.sca.Implementation;
import org.eclipse.stp.sca.Include;
import org.eclipse.stp.sca.Interface;
import org.eclipse.stp.sca.JavaImplementation;
import org.eclipse.stp.sca.JavaInterface;
......@@ -274,27 +273,6 @@ public class EMFParserSupportImpl implements ADLParserSupportItf {
private ComponentDesc toComponentDesc( Composite composite )
throws IOException {
/*
* Includes.
*
* The <include> tag is used in frascati-assembly-factory.
*/
EList<Include> includes = composite.getInclude();
if( includes.size() != 0 ) {
if( includes.size() > 1 ) {
String name = composite.getName();
String msg = "Only 1 <include> tag supported in "+name;
throw new IOException(msg);
}
Include include = includes.get(0);
QName qname = include.getName();
String namespaceURI = qname.getNamespaceURI();
String localpart = qname.getLocalPart();
String adl = namespaceURI.replace('/','.')+'.'+localpart;
ComponentDesc cdesc = parse(adl,null);
return cdesc;
}
/*
* Naming convention for component-based membranes. The thing is that
* the grammar of the SCA ADL does not allow specifying a controller
......
......@@ -75,19 +75,4 @@ public class EMFParserSupportImplTestCase {
Assert.assertEquals(Class.class.getName(),type);
Assert.assertEquals(Runnable.class.getName(),value);
}
@Test
public void testInclude() throws IOException {
ComponentDesc cdesc =
emfps.parse("org.ow2.frascati.bootstrap.FraSCAti",null);
List<ComponentDesc> subs = cdesc.getSubComponents();
ComponentDesc sub = subs.get(0);
AttributeDesc adesc = sub.getAttribute("classprop");
String type = adesc.getType();
String value = adesc.getValue();
Assert.assertEquals(Class.class.getName(),type);
Assert.assertEquals(Runnable.class.getName(),value);
}
}
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:java="http://frascati.ow2.org/xmlns/java"
name="org.ow2.frascati.FraSCAti">
<component name="server">
<property name="stringprop">Hello World!</property>
<property name="classprop" type="java:java.lang.Class">java.lang.Runnable</property>
<implementation.java class="java.lang.Object" />
</component>
</composite>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:frascati="org/ow2/frascati"
name="org.ow2.frascati.bootstrap.FraSCAti">
<include name="frascati:FraSCAti"/>
</composite>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment