svn commit: r13317 - branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-08-13 15:53:58-0700
New Revision: 13317

Modified:
   branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi
   branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java

Log:
update example

Modified: branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi?view=diff&rev=13317&p1=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi&p2=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi&r1=13316&r2=13317
==============================================================================
--- branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi	(original)
+++ branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeans.xmi	2007-08-13 15:53:58-0700
@@ -1,5 +1,5 @@
 <?xml version = '1.0' encoding = 'UTF-8' ?>

-<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Thu Jun 07 08:15:31 BRT 2007'>

+<XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML' timestamp = 'Mon Aug 13 17:18:43 BRT 2007'>

   <XMI.header>    <XMI.documentation>
       <XMI.exporter>ArgoUML (using Netbeans XMI Writer version 1.0)</XMI.exporter>
       <XMI.exporterVersion>PRE-0.25.4(5) revised on $Date: 2007-05-12 03:08:08 -0300 $ </XMI.exporterVersion>
@@ -7,8 +7,8 @@
     <XMI.metamodel xmi.name="UML" xmi.version="1.4"/></XMI.header>

   <XMI.content>

     <UML:Model xmi.id = '10-1-1-3--78fd8828:1127669a1fa:-8000:000000000000077B'

-      name = 'untitledModel' isSpecification = 'false' isRoot = 'false' isLeaf = 'false'

-      isAbstract = 'false'>

+      name = 'UML Profile for JavaBeans' isSpecification = 'false' isRoot = 'false'

+      isLeaf = 'false' isAbstract = 'false'>

       <UML:Namespace.ownedElement>

         <UML:Stereotype xmi.id = '10-1-1-3--78fd8828:1127669a1fa:-8000:000000000000077C'

           name = 'Bean' isSpecification = 'false' isRoot = 'false' isLeaf = 'false'


Modified: branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java?view=diff&rev=13317&p1=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java&p2=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java&r1=13316&r2=13317
==============================================================================
--- branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java	(original)
+++ branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java	2007-08-13 15:53:58-0700
@@ -24,10 +24,14 @@
 

 package org.argouml.uml.profile.javabeans;

 

+import java.util.ArrayList;

+import java.util.Collection;

+

 import org.argouml.model.Model;

 import org.argouml.uml.profile.FigNodeStrategy;

 import org.argouml.uml.profile.FormatingStrategy;

 import org.argouml.uml.profile.Profile;

+import org.argouml.uml.profile.ProfileException;

 import org.argouml.uml.profile.ProfileJava;

 import org.argouml.uml.profile.ProfileModelLoader;

 import org.argouml.uml.profile.ResourceModelLoader;

@@ -37,16 +41,17 @@
     private static ProfileJavaBeans instance = null;

     

     private ProfileModelLoader profileModelLoader;

-    private Object model;

+    private Collection model;

     private FigNodeStrategy figStrategy = new JavaBeansFigNodeStrategy();

 

     private ProfileJavaBeans() {

 	    profileModelLoader = new ResourceModelLoader(this.getClass());

 	    model = profileModelLoader.loadModel("JavaBeans.xmi");	

 	    

-	    if (model == null) {

-	    	model = Model.getModelManagementFactory().createModel();

-	    }

+        if (model == null) {

+            model = new ArrayList();

+            model.add(Model.getModelManagementFactory().createModel());

+        }

 		addProfileDependency(ProfileJava.getInstance());

     }

 

@@ -62,7 +67,7 @@
     }

 

     public Object getModel() {

-	return model;

+    	return model;

     }

 

     public String getDisplayName() {

@@ -73,4 +78,9 @@
 	return figStrategy;

     }

 

+	@Override

+	public Collection getProfilePackages() throws ProfileException {

+		return model;

+	}

+

 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.