[savara-commits] savara SVN: r552 - in branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model: generator and 1 other directory.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Jan 7 14:16:31 EST 2011


Author: objectiser
Date: 2011-01-07 14:16:30 -0500 (Fri, 07 Jan 2011)
New Revision: 552

Added:
   branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/
   branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java
Removed:
   branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/DefaultModelGenerator.java
   branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java
Log:


Copied: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator (from rev 506, branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/model/generator)

Deleted: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/DefaultModelGenerator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/model/generator/DefaultModelGenerator.java	2010-12-16 16:32:57 UTC (rev 506)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/DefaultModelGenerator.java	2011-01-07 19:16:30 UTC (rev 552)
@@ -1,52 +0,0 @@
-/*
- * Copyright 2005-8 Pi4 Technologies Ltd
- *
- * 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.
- *
- *
- * Change History:
- * 24 Jul 2008 : Initial version created by gary
- */
-package org.savara.model.generator;
-
-import org.savara.model.change.AbstractModelChangeContext;
-import org.scribble.protocol.model.*;
-
-/**
- * This class represents a default implementation of the model
- * generator interface.
- */
-public class DefaultModelGenerator implements ModelGenerator {
-
-	/**
-	 * This method generates the contents of the target
-	 * model using information in the source model. This
-	 * mechanism is used to create a new instance of the
-	 * model, but with a specific underlying representation.
-	 * 
-	 * @param targetRef The target model's reference
-	 * @param role The role associated with the model
-	 * @param target The model being generated
-	 * @param source The reference model
-	 */
-	public void generate(ModelReference targetRef, Role role,
-					ProtocolModel target, ProtocolModel source) {
-		
-		AbstractModelChangeContext context=
-			new AbstractModelChangeContext(targetRef, role);
-		context.setParent(target);
-		
-		context.insert(target, source, null);
-	}
-	
-}

Deleted: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/model/generator/ModelGenerator.java	2010-12-16 16:32:57 UTC (rev 506)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java	2011-01-07 19:16:30 UTC (rev 552)
@@ -1,51 +0,0 @@
-/*
- * Copyright 2005-8 Pi4 Technologies Ltd
- *
- * 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.
- *
- *
- * Change History:
- * 24 Jul 2008 : Initial version created by gary
- */
-package org.savara.model.generator;
-
-import org.scribble.common.logging.Journal;
-import org.scribble.protocol.model.*;
-
-/**
- * This interface represents a model generator.
- */
-public interface ModelGenerator {
-	
-	/**
-	 * This method determines whether the generator is appropriate for
-	 * the specified source and target types.
-	 * 
-	 * @param sourceType The source type
-	 * @param targetType The target type
-	 * @return Whether the specified types are supported
-	 */
-	public boolean isSupported(String sourceType, String targetType);
-
-	/**
-	 * This method generates the contents of the target
-	 * model using information in the source model.
-	 * 
-	 * @param targetRef The target model's reference
-	 * @param role The role associated with the model
-	 * @param target The model being generated
-	 * @param source The reference model
-	 */
-	public Object generate(Object source, Journal journal);
-	
-}

Copied: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java (from rev 511, branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/model/generator/ModelGenerator.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java	                        (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/common/model/generator/ModelGenerator.java	2011-01-07 19:16:30 UTC (rev 552)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2005-8 Pi4 Technologies Ltd
+ *
+ * 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.
+ *
+ *
+ * Change History:
+ * 24 Jul 2008 : Initial version created by gary
+ */
+package org.savara.common.model.generator;
+
+import org.scribble.common.resource.ResourceLocator;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This interface represents a model generator.
+ */
+public interface ModelGenerator {
+	
+	/**
+	 * This method determines whether the generator is appropriate for
+	 * the specified source and target types.
+	 * 
+	 * @param sourceType The source type
+	 * @param targetType The target type
+	 * @return Whether the specified types are supported
+	 */
+	public boolean isSupported(String sourceType, String targetType);
+
+	/**
+	 * This method generates the contents of the target
+	 * model using information in the source model.
+	 * 
+	 * @param source The source model
+	 * @param journal The log
+	 * @param locator The resource locator
+	 * @return The target model
+	 */
+	public Object generate(Object source, Journal journal, ResourceLocator locator);
+	
+}



More information about the savara-commits mailing list