Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » java.lang.NumberFormatException when reading a model
java.lang.NumberFormatException when reading a model [message #426393] Fri, 02 January 2009 15:03 Go to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,
I have the error
java.lang.NumberFormatException: For input string:
"aadlSpec[@name=prodcons]" when I try to read a model in a standalone
environment. This model is successfully opened in an eclipse plugin
environment.
The used plugin have the following extensions:
<plugin>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/property"
class="edu.cmu.sei.aadl.model.property.PropertyPackage">
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/component"
class="edu.cmu.sei.aadl.model.component.ComponentPackage">
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/instance"
class="edu.cmu.sei.aadl.model.instance.InstancePackage">
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/connection"
class="edu.cmu.sei.aadl.model.connection.ConnectionPackage" >
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/core"
class="edu.cmu.sei.aadl.model.core.CorePackage">
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/feature"
class="edu.cmu.sei.aadl.model.feature.FeaturePackage">
</package>
</extension>
<extension
point="org.eclipse.emf.ecore.generated_package">
<package
uri="http:///AADL/flow"
class="edu.cmu.sei.aadl.model.flow.FlowPackage">
</package>
</extension>
<extension
id="AadlObjectMarker"
name="Aadl Model Object Marker"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.problemmarker"/>
<super type = "org.eclipse.emf.ecore.diagnostic"/>
<!--attribute
name="uri">
</attribute-->
<persistent
value="true">
</persistent>
</extension>
<extension
id="AadlGotoMarker"
name="Goto AObject Marker"
point="org.eclipse.core.resources.markers">
<super
type="edu.cmu.sei.aadl.model.AadlObjectMarker">
</super>
<super type = "org.eclipse.emf.ecore.diagnostic"/>
<!--attribute
name="uri">
</attribute-->
<persistent
value="true">
</persistent>
</extension>
<extension
id="AadlTextMarker"
name="Aadl Text Marker"
point="org.eclipse.core.resources.markers">
<super
type="org.eclipse.core.resources.problemmarker">
</super>
<persistent
value="true">
</persistent>
</extension>
<extension
id="AadlTextGotoMarker"
name="Goto AADL Source Text Marker"
point="org.eclipse.core.resources.markers">
<super
type="edu.cmu.sei.aadl.model.AadlTextMarker">
</super>
<persistent
value="false">
</persistent>
</extension>

<extension point="org.eclipse.core.runtime.adapters">
<factory

class="edu.cmu.sei.aadl.model.pluginsupport.AObjectAdapterFactory "
adaptableType="edu.cmu.sei.aadl.model.core.AObject">
<adapter type="org.eclipse.ui.IActionFilter"/>
</factory>
<factory

class=" edu.cmu.sei.aadl.model.pluginsupport.IResourceAdapterFactory "
adaptableType="org.eclipse.core.resources.IResource">
<adapter type="edu.cmu.sei.aadl.model.core.AObject"/>
</factory>
</extension>

</plugin>

How can I read this model in a standalone environment?

Thanks in advance,
Anne Robert.
Re: java.lang.NumberFormatException when reading a model [message #426397 is a reply to message #426393] Fri, 02 January 2009 18:38 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Anne,

Have you tried invoking Generate Test Code and using the generated
XyzExample.java? You'll see explicit registration of packages and
resource factories...


Anne Robert wrote:
> Hi,
> I have the error java.lang.NumberFormatException: For input string:
> "aadlSpec[@name=prodcons]" when I try to read a model in a standalone
> environment. This model is successfully opened in an eclipse plugin
> environment.
> The used plugin have the following extensions:
> <plugin>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/property"
> class="edu.cmu.sei.aadl.model.property.PropertyPackage">
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/component"
> class="edu.cmu.sei.aadl.model.component.ComponentPackage">
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/instance"
> class="edu.cmu.sei.aadl.model.instance.InstancePackage">
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/connection"
> class="edu.cmu.sei.aadl.model.connection.ConnectionPackage" >
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/core"
> class="edu.cmu.sei.aadl.model.core.CorePackage">
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/feature"
> class="edu.cmu.sei.aadl.model.feature.FeaturePackage">
> </package>
> </extension>
> <extension
> point="org.eclipse.emf.ecore.generated_package">
> <package
> uri="http:///AADL/flow"
> class="edu.cmu.sei.aadl.model.flow.FlowPackage">
> </package>
> </extension>
> <extension
> id="AadlObjectMarker"
> name="Aadl Model Object Marker"
> point="org.eclipse.core.resources.markers">
> <super
> type="org.eclipse.core.resources.problemmarker"/>
> <super type = "org.eclipse.emf.ecore.diagnostic"/>
> <!--attribute
> name="uri">
> </attribute-->
> <persistent
> value="true">
> </persistent>
> </extension>
> <extension
> id="AadlGotoMarker"
> name="Goto AObject Marker"
> point="org.eclipse.core.resources.markers">
> <super
> type="edu.cmu.sei.aadl.model.AadlObjectMarker">
> </super>
> <super type = "org.eclipse.emf.ecore.diagnostic"/>
> <!--attribute
> name="uri">
> </attribute-->
> <persistent
> value="true">
> </persistent>
> </extension>
> <extension
> id="AadlTextMarker"
> name="Aadl Text Marker"
> point="org.eclipse.core.resources.markers">
> <super
> type="org.eclipse.core.resources.problemmarker">
> </super>
> <persistent
> value="true">
> </persistent>
> </extension>
> <extension
> id="AadlTextGotoMarker"
> name="Goto AADL Source Text Marker"
> point="org.eclipse.core.resources.markers">
> <super
> type="edu.cmu.sei.aadl.model.AadlTextMarker">
> </super>
> <persistent
> value="false">
> </persistent>
> </extension>
>
> <extension point="org.eclipse.core.runtime.adapters">
> <factory
> class="edu.cmu.sei.aadl.model.pluginsupport.AObjectAdapterFactory "
> adaptableType="edu.cmu.sei.aadl.model.core.AObject">
> <adapter type="org.eclipse.ui.IActionFilter"/>
> </factory>
> <factory
> class=" edu.cmu.sei.aadl.model.pluginsupport.IResourceAdapterFactory "
> adaptableType="org.eclipse.core.resources.IResource">
> <adapter type="edu.cmu.sei.aadl.model.core.AObject"/>
> </factory>
> </extension>
>
> </plugin>
>
> How can I read this model in a standalone environment?
>
> Thanks in advance,
> Anne Robert.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: java.lang.NumberFormatException when reading a model [message #426445 is a reply to message #426397] Tue, 06 January 2009 13:41 Go to previous messageGo to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks for your help,
But the generated code for test have the same problem
Regards,
Anne.
Re: java.lang.NumberFormatException when reading a model [message #426447 is a reply to message #426445] Tue, 06 January 2009 14:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Anne,

It sounds like your input is ill formed, but what can I say when you've
not shown me a model, Java code, an instance being read, even even a
stack trace. Your question implies it working well elsewhere, which to
me implies that things like the registered resource factory you'd
normally use isn't being used stand alone. You've really only shown a
plugin.xml and that's of no use stand alone...


Anne Robert wrote:
> Thanks for your help,
> But the generated code for test have the same problem
> Regards,
> Anne.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: java.lang.NumberFormatException when reading a model [message #426449 is a reply to message #426447] Tue, 06 January 2009 15:17 Go to previous messageGo to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I use a model generated by OSATE plateform (I use a version from
http://openembedd.org/experimental/bundle/OpenEmbeDD_bundle_ linux-gtk_EXPERIMENTAL.tar.gz
) , and I import the corresponding Metamodel.

Here is my java code:

import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;

import edu.cmu.sei.aadl.model.component.ComponentPackage;
import edu.cmu.sei.aadl.model.connection.ConnectionPackage;
import edu.cmu.sei.aadl.model.core.CorePackage;
import edu.cmu.sei.aadl.model.core.util.AadlModelPlugin;
import edu.cmu.sei.aadl.model.feature.FeaturePackage;
import edu.cmu.sei.aadl.model.flow.FlowPackage;
import edu.cmu.sei.aadl.model.instance.InstancePackage;
import edu.cmu.sei.aadl.model.property.PropertyPackage;

public class AaxlRead {

/**
* @param args
*/
public static void main(String[] args) {



AadlModelPlugin modelPlugin = new AadlModelPlugin();
CorePackage.eINSTANCE.getEFactoryInstance() ;
ComponentPackage.eINSTANCE.getEFactoryInstance() ;
ConnectionPackage.eINSTANCE.getEFactoryInstance() ;
PropertyPackage.eINSTANCE.getEFactoryInstance() ;
InstancePackage.eINSTANCE.getEFactoryInstance() ;
FeaturePackage.eINSTANCE.getEFactoryInstance() ;
FlowPackage.eINSTANCE.getEFactoryInstance() ;

ResourceSet resourceSet = new ResourceSetImpl();

// Register the appropriate resource factory to handle all file
extentions.
//
resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
(Resource.Factory.Registry.DEFAULT_EXTENSION,
new XMIResourceFactoryImpl());

// Register the package to ensure it is available during loading.
//
resourceSet.getPackageRegistry().put
(InstancePackage.eNS_URI,
InstancePackage.eINSTANCE);



// Demand load the resource for this file.
Resource resource =
resourceSet.getResource(URI.createFileURI(args[0]), true);

}

}


Thanks for your help,
Anne.
Re: java.lang.NumberFormatException when reading a model [message #426450 is a reply to message #426449] Tue, 06 January 2009 16:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Anne,

Comments below.

Anne Robert wrote:
> Hi,
>
> I use a model generated by OSATE plateform (I use a version from
> http://openembedd.org/experimental/bundle/OpenEmbeDD_bundle_ linux-gtk_EXPERIMENTAL.tar.gz
>
> ) , and I import the corresponding Metamodel.
>
> Here is my java code:
>
> import org.eclipse.emf.common.util.URI;
> import org.eclipse.emf.ecore.resource.Resource;
> import org.eclipse.emf.ecore.resource.ResourceSet;
> import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
> import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl;
> import org.eclipse.emf.ecore.xmi.impl.XMLResourceFactoryImpl;
>
> import edu.cmu.sei.aadl.model.component.ComponentPackage;
> import edu.cmu.sei.aadl.model.connection.ConnectionPackage;
> import edu.cmu.sei.aadl.model.core.CorePackage;
> import edu.cmu.sei.aadl.model.core.util.AadlModelPlugin;
> import edu.cmu.sei.aadl.model.feature.FeaturePackage;
> import edu.cmu.sei.aadl.model.flow.FlowPackage;
> import edu.cmu.sei.aadl.model.instance.InstancePackage;
> import edu.cmu.sei.aadl.model.property.PropertyPackage;
>
> public class AaxlRead {
>
> /**
> * @param args
> */
> public static void main(String[] args) {
>
>
>
> AadlModelPlugin modelPlugin = new AadlModelPlugin();
> CorePackage.eINSTANCE.getEFactoryInstance() ;
> ComponentPackage.eINSTANCE.getEFactoryInstance() ;
> ConnectionPackage.eINSTANCE.getEFactoryInstance() ;
> PropertyPackage.eINSTANCE.getEFactoryInstance() ;
> InstancePackage.eINSTANCE.getEFactoryInstance() ;
> FeaturePackage.eINSTANCE.getEFactoryInstance() ;
> FlowPackage.eINSTANCE.getEFactoryInstance() ;
>
> ResourceSet resourceSet = new ResourceSetImpl();
>
> // Register the appropriate resource factory to handle all
> file extentions.
> //
>
> resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap().put
> (Resource.Factory.Registry.DEFAULT_EXTENSION,
> new XMIResourceFactoryImpl());
And you're reading an XMI resource? The resource you're reading is one
you've read in elsewhere correctly? You're sure that these folks aren't
providing specialized resource factories you should be using? It would
seem to make sense to ask for help from the folks providing this
stuff... If you want help here, I can only provide generic help. I'll
need to see thing like what instance file you are loading...
> // Register the package to ensure it is available during loading.
> //
> resourceSet.getPackageRegistry().put
> (InstancePackage.eNS_URI,
> InstancePackage.eINSTANCE);
>
>
> // Demand load the resource for this file.
> Resource resource =
> resourceSet.getResource(URI.createFileURI(args[0]), true);
>
> }
>
> }
>
>
> Thanks for your help,
> Anne.
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: java.lang.NumberFormatException when reading a model [message #426454 is a reply to message #426450] Tue, 06 January 2009 17:03 Go to previous messageGo to next message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,
Sorry, I forgot the readed file:

<?xml version="1.0" encoding="UTF-8"?>
<core:AadlSpec xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:core="http:///AADL/core" xmlns:property="http:///AADL/property"
name="prodcons">
<systemType name="prodcons"/>
<systemImpl name="prodcons.Impl"
compType="/aadlSpec[@name=prodcons]/systemType[@name=prodcons] ">
<properties>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "

appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod]
/aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer1] ">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "

appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod]
/aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer2] ">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "

appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons]
/aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l]/subcomponents/threadSubcomponent[@name=Consumer1] ">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p2] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "

appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] ">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "

appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] ">
<propertyValue xsi:type="property:ReferenceValue"
referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p2] "/>
</propertyAssociation>
</properties>
<connections>
<eventConnection
srcContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] "

dstContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] "

dst=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "

src=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source1] "/>
<eventConnection
srcContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] "

dstContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] "

dst=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "

src=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source2] "/>
</connections>
<subcomponents>
<processSubcomponent name="prod"
classifier=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "/>
<processSubcomponent name="cons"
classifier=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l] "/>
<processorSubcomponent name="p1"
classifier="/aadlSpec[@name=prodcons]/processorType[@name=myProcessor] "/>
<processorSubcomponent name="p2"
classifier="/aadlSpec[@name=prodcons]/processorType[@name=myProcessor] "/>
</subcomponents>
</systemImpl>
<threadType name="Producer">
<features>
<eventPort name="Data_Source" direction="out"/>
</features>
</threadType>
<threadImpl name="Producer.Impl"
compType="/aadlSpec[@name=prodcons]/threadType[@name=Producer] ">
<properties>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Dispatch_Protocol] ">
<propertyValue xsi:type="property:EnumValue"
enumLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Supported_Dispatch_Protocols]/enumLiter al[@name=Periodic] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Period] ">
<comment> Compute_Execution_Time => 1 ms .. 2 ms;</comment>
<propertyValue xsi:type="property:IntegerValue"
unitLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Time_Units]/unitLiteral[@name=Ms] "
valueString="6" value="6" base="10"/>
</propertyAssociation>
</properties>
</threadImpl>
<threadType name="Consumer">
<features>
<eventPort name="Data_Sink"/>
</features>
</threadType>
<threadImpl name="Consumer.Impl"
compType="/aadlSpec[@name=prodcons]/threadType[@name=Consumer] ">
<properties>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Dispatch_Protocol] ">
<propertyValue xsi:type="property:EnumValue"
enumLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Supported_Dispatch_Protocols]/enumLiter al[@name=Periodic] "/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Period] ">
<propertyValue xsi:type="property:IntegerValue"
unitLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Time_Units]/unitLiteral[@name=Ms] "
valueString="3" value="3" base="10"/>
</propertyAssociation>
<propertyAssociation
propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Queue_Size] "

appliesTo=" /aadlSpec[@name=prodcons]/threadType[@name=Consumer]/feature s/eventPort[@name=Data_Sink] ">
<propertyValue xsi:type="property:IntegerValue" valueString="4"
value="4"
base="10"/>
</propertyAssociation>
</properties>
</threadImpl>
<processorType name="myProcessor"/>
<processType name="producerProc">
<features>
<eventPort name="Data_source1" direction="out"/>
<eventPort name="Data_source2" direction="out"/>
</features>
</processType>
<processImpl name="producerProc.Impl"
compType="/aadlSpec[@name=prodcons]/processType[@name=producerProc] ">
<connections>
<eventConnection
srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer1] "

dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "

dst=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source1] "

src=" /aadlSpec[@name=prodcons]/threadType[@name=Producer]/feature s/eventPort[@name=Data_Source] "/>
<eventConnection
srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer2] "

dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "

dst=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source2] "

src=" /aadlSpec[@name=prodcons]/threadType[@name=Producer]/feature s/eventPort[@name=Data_Source] "/>
</connections>
<subcomponents>
<threadSubcomponent name="Producer1"
classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Producer.Impl] "/>
<threadSubcomponent name="Producer2"
classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Producer.Impl] "/>
</subcomponents>
</processImpl>
<processType name="consumerProc">
<features>
<eventPort name="Data_Sink"/>
</features>
</processType>
<processImpl name="consumerProc.Impl"
compType="/aadlSpec[@name=prodcons]/processType[@name=consumerProc] ">
<connections>
<eventConnection
srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l] "

dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l]/subcomponents/threadSubcomponent[@name=Consumer1] "

dst=" /aadlSpec[@name=prodcons]/threadType[@name=Consumer]/feature s/eventPort[@name=Data_Sink] "

src=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "/>
</connections>
<subcomponents>
<threadSubcomponent name="Consumer1"
classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Consumer.Impl] "/>
</subcomponents>
</processImpl>
</core:AadlSpec>
Re: java.lang.NumberFormatException when reading a model [message #426455 is a reply to message #426454] Tue, 06 January 2009 17:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Anne,

I think it's best to ask the folks providing this model. I see that
things like "/aadlSpec[@name=prodcons]/" provides specialized syntax
that would require a specialized reosurce impl to handle it so I assume
they must provide such that specialized resource factory for you to use...


Anne Robert wrote:
> Hi,
> Sorry, I forgot the readed file:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <core:AadlSpec xmi:version="2.0"
> xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:core="http:///AADL/core"
> xmlns:property="http:///AADL/property" name="prodcons">
> <systemType name="prodcons"/>
> <systemImpl name="prodcons.Impl"
> compType="/aadlSpec[@name=prodcons]/systemType[@name=prodcons] ">
> <properties>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod]
> /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer1] ">
>
> <propertyValue xsi:type="property:ReferenceValue"
> referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod]
> /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer2] ">
>
> <propertyValue xsi:type="property:ReferenceValue"
> referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons]
> /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l]/subcomponents/threadSubcomponent[@name=Consumer1] ">
>
> <propertyValue xsi:type="property:ReferenceValue"
> referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p2] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] ">
>
> <propertyValue xsi:type="property:ReferenceValue"
> referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p1] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Actual_Processor_Binding] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] ">
>
> <propertyValue xsi:type="property:ReferenceValue"
> referenceElement=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processorSubcomponent[@name=p2] "/>
>
> </propertyAssociation>
> </properties>
> <connections>
> <eventConnection
> srcContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] "
>
>
> dstContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] "
>
>
> dst=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "
>
>
> src=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source1] "/>
>
> <eventConnection
> srcContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=prod] "
>
>
> dstContext=" /aadlSpec[@name=prodcons]/systemImpl[@name=prodcons.Impl]/su bcomponents/processSubcomponent[@name=cons] "
>
>
> dst=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "
>
>
> src=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source2] "/>
>
> </connections>
> <subcomponents>
> <processSubcomponent name="prod"
> classifier=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "/>
>
> <processSubcomponent name="cons"
> classifier=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l] "/>
>
> <processorSubcomponent name="p1"
> classifier="/aadlSpec[@name=prodcons]/processorType[@name=myProcessor] "/>
> <processorSubcomponent name="p2"
> classifier="/aadlSpec[@name=prodcons]/processorType[@name=myProcessor] "/>
> </subcomponents>
> </systemImpl>
> <threadType name="Producer">
> <features>
> <eventPort name="Data_Source" direction="out"/>
> </features>
> </threadType>
> <threadImpl name="Producer.Impl"
> compType="/aadlSpec[@name=prodcons]/threadType[@name=Producer] ">
> <properties>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Dispatch_Protocol] ">
>
> <propertyValue xsi:type="property:EnumValue"
> enumLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Supported_Dispatch_Protocols]/enumLiter al[@name=Periodic] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Period] ">
>
> <comment> Compute_Execution_Time => 1 ms .. 2 ms;</comment>
> <propertyValue xsi:type="property:IntegerValue"
> unitLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Time_Units]/unitLiteral[@name=Ms] "
>
> valueString="6" value="6" base="10"/>
> </propertyAssociation>
> </properties>
> </threadImpl>
> <threadType name="Consumer">
> <features>
> <eventPort name="Data_Sink"/>
> </features>
> </threadType>
> <threadImpl name="Consumer.Impl"
> compType="/aadlSpec[@name=prodcons]/threadType[@name=Consumer] ">
> <properties>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Dispatch_Protocol] ">
>
> <propertyValue xsi:type="property:EnumValue"
> enumLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Supported_Dispatch_Protocols]/enumLiter al[@name=Periodic] "/>
>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Period] ">
>
> <propertyValue xsi:type="property:IntegerValue"
> unitLiteral=" /aadlSpec[@name=AADL_Project]/propertySet[@name=AADL_Project ]/propertyType[@name=Time_Units]/unitLiteral[@name=Ms] "
>
> valueString="3" value="3" base="10"/>
> </propertyAssociation>
> <propertyAssociation
> propertyDefinition=" /aadlSpec[@name=AADL_Properties]/propertySet[@name=AADL_Prop erties]/propertyDefinition[@name=Queue_Size] "
>
>
> appliesTo=" /aadlSpec[@name=prodcons]/threadType[@name=Consumer]/feature s/eventPort[@name=Data_Sink] ">
>
> <propertyValue xsi:type="property:IntegerValue" valueString="4"
> value="4"
> base="10"/>
> </propertyAssociation>
> </properties>
> </threadImpl>
> <processorType name="myProcessor"/>
> <processType name="producerProc">
> <features>
> <eventPort name="Data_source1" direction="out"/>
> <eventPort name="Data_source2" direction="out"/>
> </features>
> </processType>
> <processImpl name="producerProc.Impl"
> compType="/aadlSpec[@name=prodcons]/processType[@name=producerProc] ">
> <connections>
> <eventConnection
> srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer1] "
>
>
> dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "
>
>
> dst=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source1] "
>
>
> src=" /aadlSpec[@name=prodcons]/threadType[@name=Producer]/feature s/eventPort[@name=Data_Source] "/>
>
> <eventConnection
> srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l]/subcomponents/threadSubcomponent[@name=Producer2] "
>
>
> dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=producerProc.Imp l] "
>
>
> dst=" /aadlSpec[@name=prodcons]/processType[@name=producerProc]/fe atures/eventPort[@name=Data_source2] "
>
>
> src=" /aadlSpec[@name=prodcons]/threadType[@name=Producer]/feature s/eventPort[@name=Data_Source] "/>
>
> </connections>
> <subcomponents>
> <threadSubcomponent name="Producer1"
> classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Producer.Impl] "/>
> <threadSubcomponent name="Producer2"
> classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Producer.Impl] "/>
> </subcomponents>
> </processImpl>
> <processType name="consumerProc">
> <features>
> <eventPort name="Data_Sink"/>
> </features>
> </processType>
> <processImpl name="consumerProc.Impl"
> compType="/aadlSpec[@name=prodcons]/processType[@name=consumerProc] ">
> <connections>
> <eventConnection
> srcContext=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l] "
>
>
> dstContext=" /aadlSpec[@name=prodcons]/processImpl[@name=consumerProc.Imp l]/subcomponents/threadSubcomponent[@name=Consumer1] "
>
>
> dst=" /aadlSpec[@name=prodcons]/threadType[@name=Consumer]/feature s/eventPort[@name=Data_Sink] "
>
>
> src=" /aadlSpec[@name=prodcons]/processType[@name=consumerProc]/fe atures/eventPort[@name=Data_Sink] "/>
>
> </connections>
> <subcomponents>
> <threadSubcomponent name="Consumer1"
> classifier="/aadlSpec[@name=prodcons]/threadImpl[@name=Consumer.Impl] "/>
> </subcomponents>
> </processImpl>
> </core:AadlSpec>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: java.lang.NumberFormatException when reading a model [message #426457 is a reply to message #426455] Tue, 06 January 2009 18:00 Go to previous message
Anne Robert is currently offline Anne RobertFriend
Messages: 14
Registered: July 2009
Junior Member
Ok, thanks for your help.
Anne.
Previous Topic:Error in CDO (DBException)
Next Topic:[CDO] EMFObservables are not being notified
Goto Forum:
  


Current Time: Fri Apr 26 00:04:24 GMT 2024

Powered by FUDForum. Page generated in 0.03672 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top