You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/02/21 07:54:10 UTC
svn commit: r379376 [3/11] - in /incubator/tuscany/java/sca/model: ./
src/main/java/org/apache/tuscany/model/
src/main/java/org/apache/tuscany/model/assembly/
src/main/java/org/apache/tuscany/model/assembly/impl/
src/main/java/org/apache/tuscany/model/...
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,133 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
+import org.apache.tuscany.model.assembly.Binding;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.apache.tuscany.model.assembly.OverrideOption;
+
+/**
+ * An implementation ExternalService.
+ */
+public class ExternalServiceImpl extends AggregatePartImpl implements ExternalService {
+
+ private ConfiguredService configuredService;
+ private OverrideOption overrideOption;
+ private List<Binding> bindings=new ArrayList<Binding>();
+
+ /**
+ * Constructor
+ */
+ protected ExternalServiceImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.sdo.impl.ExternalServiceImpl#getOverrideOption()
+ */
+ public OverrideOption getOverrideOption() {
+ return overrideOption;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ExternalService#setOverrideOption(org.apache.tuscany.model.assembly.OverrideOption)
+ */
+ public void setOverrideOption(OverrideOption newOverridable) {
+ checkNotFrozen();
+ overrideOption=newOverridable;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ExternalService#getBindings()
+ */
+ public List<Binding> getBindings() {
+ return bindings;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ExternalService#getConfiguredService()
+ */
+ public ConfiguredService getConfiguredService() {
+ return configuredService;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ExternalService#setConfiguredService(org.apache.tuscany.model.assembly.ConfiguredService)
+ */
+ public void setConfiguredService(ConfiguredService configuredService) {
+ checkNotFrozen();
+ this.configuredService=configuredService;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
+ */
+ public void initialize(AssemblyModelContext modelContext) {
+ if (isInitialized())
+ return;
+ super.initialize(modelContext);
+
+ // Initialize the configured service
+ if (configuredService != null)
+ configuredService.initialize(modelContext);
+
+ // Initialize the bindings
+ initialize(bindings, modelContext);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
+ */
+ public void freeze() {
+ if (isFrozen())
+ return;
+ super.freeze();
+
+ // Freeze the configured service
+ if (configuredService!= null)
+ configuredService.freeze();
+
+ // Freeze the bindings
+ bindings=Collections.unmodifiableList(bindings);
+ freeze(bindings);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.impl.ExtensibleImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
+ */
+ public boolean accept(AssemblyModelVisitor visitor) {
+ if (!super.accept(visitor))
+ return false;
+
+ if (configuredService!=null) {
+ if (!configuredService.accept(visitor))
+ return false;
+ }
+
+ if (!accept(bindings, visitor))
+ return false;
+
+ return true;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ExternalServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,65 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleComponent;
+
+/**
+ * An implementation of ModuleComponent.
+ */
+public class ModuleComponentImpl extends ComponentImpl implements ModuleComponent {
+
+ private String uri;
+
+ /**
+ * Constructor
+ */
+ protected ModuleComponentImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ModuleComponent#setModuleImplementation(org.apache.tuscany.model.assembly.Module)
+ */
+ public void setModuleImplementation(Module module) {
+ checkNotFrozen();
+ super.setComponentImplementation(module);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ModuleComponent#getModuleImplementation()
+ */
+ public Module getModuleImplementation() {
+ return (Module)super.getComponentImplementation();
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ModuleComponent#getURI()
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ModuleComponent#setURI(java.lang.String)
+ */
+ public void setURI(String value) {
+ checkNotFrozen();
+ uri=value;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.ModuleFragment;
+
+/**
+ * An implementation of ModuleFragment.
+ */
+public class ModuleFragmentImpl extends AggregateImpl implements ModuleFragment {
+
+ /**
+ * Constructor
+ */
+ protected ModuleFragmentImpl() {
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleFragmentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,311 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.model.assembly.AssemblyFactory;
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.EntryPoint;
+import org.apache.tuscany.model.assembly.ExternalService;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleFragment;
+import org.apache.tuscany.model.assembly.Reference;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.ServiceContract;
+
+/**
+ * An implementation of Module.
+ */
+public class ModuleImpl extends AggregateImpl implements Module {
+
+ private List<ModuleFragment> moduleFragments = new ArrayList<ModuleFragment>();
+ private Map<String, ModuleFragment> moduleFragmentsMap;
+ private ComponentType componentType;
+ private Object runtimeConfiguration;
+
+ /**
+ * Constructor
+ */
+ protected ModuleImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ComponentImplementation#getComponentType()
+ */
+ public ComponentType getComponentType() {
+ return componentType;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ComponentImplementation#setComponentType(org.apache.tuscany.model.assembly.ComponentType)
+ */
+ public void setComponentType(ComponentType componentType) {
+ checkNotFrozen();
+ this.componentType=componentType;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Module#getModuleFragments()
+ */
+ public List<ModuleFragment> getModuleFragments() {
+ return moduleFragments;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Module#getModuleFragment(java.lang.String)
+ */
+ public ModuleFragment getModuleFragment(String name) {
+ checkInitialized();
+ return moduleFragmentsMap.get(name);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.AssemblyModelObject#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
+ */
+ public void initialize(AssemblyModelContext modelContext) {
+ if (isInitialized())
+ return;
+
+ // Populate map of module fragments
+ moduleFragmentsMap = new HashMap<String, ModuleFragment>();
+ for (ModuleFragment moduleFragment : moduleFragments) {
+ moduleFragmentsMap.put(moduleFragment.getName(), moduleFragment);
+
+ // Add all components, entry points and external services from the module fragments
+ getComponents().addAll(moduleFragment.getComponents());
+ getEntryPoints().addAll(moduleFragment.getEntryPoints());
+ getExternalServices().addAll(moduleFragment.getExternalServices());
+ }
+
+ // Initialize the aggregate
+ super.initialize(modelContext);
+
+ //FIXME derive the module properties from the overridable properties of the components in the module
+
+ // Derive the component type from the entry points and external services in the module
+ if (componentType==null) {
+ AssemblyFactory factory = modelContext.getAssemblyFactory();
+ componentType = factory.createComponentType();
+ for (EntryPoint entryPoint : getEntryPoints()) {
+ Service service = factory.createService();
+ service.setName(entryPoint.getName());
+ ServiceContract serviceContract = entryPoint.getConfiguredService().getService().getServiceContract();
+ if (serviceContract != null)
+ service.setServiceContract(serviceContract);
+ componentType.getServices().add(service);
+ }
+ for (Iterator<ExternalService> i = getExternalServices().iterator(); i.hasNext();) {
+ ExternalService externalService = i.next();
+ Reference reference = factory.createReference();
+ reference.setName(externalService.getName());
+ ServiceContract serviceContract = externalService.getConfiguredService().getService().getServiceContract();
+ if (serviceContract != null)
+ reference.setServiceContract(serviceContract);
+ componentType.getReferences().add(reference);
+ }
+ }
+ componentType.initialize(modelContext);
+
+ //FIXME add wiring later
+//
+// // Resolve the references and the wires
+// AssemblyFactory factory = modelContext.getAssemblyFactory();
+//
+// // Resolve entry point references
+// for (Iterator<EntryPoint> i = entryPointsMap.values().iterator(); i.hasNext();) {
+// EntryPoint entryPoint = i.next();
+// ConfiguredReference configuredReference = entryPoint.getConfiguredReference();
+// for (Iterator<DataObject> r = ((org.osoa.sca.model.EntryPoint) entryPoint).getReferences().iterator(); r.hasNext();) {
+// DataObject targetURIElement = r.next();
+// ConfiguredService configuredService = resolveURIElement(factory, targetURIElement);
+// if (configuredService != null) {
+// if (!configuredReference.getReference().isMultiplicityN() && !configuredReference.getTargetConfiguredServices().isEmpty()) {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Attempting to wire multiple targets to reference " + configuredReference.getReference().getName());
+// } else {
+// configuredReference.getTargetConfiguredServices().add(configuredService);
+// }
+// }
+// }
+// }
+//
+// // Resolve component references
+// for (Iterator<Component> i = componentsMap.values().iterator(); i.hasNext();) {
+// Component component = i.next();
+// ReferenceValues referenceValues = ((org.osoa.sca.model.Component) component).getReferenceValues();
+// if (referenceValues == null)
+// continue;
+// Sequence sequence = referenceValues.getAny();
+// for (int p = 0, n = sequence.size(); p < n; p++) {
+// Property property = sequence.getProperty(p);
+// DataObject targetURIElement = (DataObject) sequence.getValue(p);
+//
+// // Get the named reference
+// ConfiguredReference configuredReference = component.getConfiguredReference(property.getName());
+// if (configuredReference != null) {
+// ConfiguredService configuredService = resolveURIElement(factory, targetURIElement);
+// if (configuredService != null) {
+// if (!configuredReference.getReference().isMultiplicityN() && !configuredReference.getTargetConfiguredServices().isEmpty()) {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Attempting to wire multiple targets to reference " + configuredReference.getReference().getName());
+// } else {
+// configuredReference.getTargetConfiguredServices().add(configuredService);
+// }
+// }
+// } else {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Undefined reference " + property.getName());
+// }
+// }
+// }
+//
+// // Resolve wires from this module and its module fragments
+// resolveWires(factory, getWires());
+// for (Iterator<ModuleFragment> i = getModuleFragments().iterator(); i.hasNext();) {
+// ModuleFragment moduleFragment = i.next();
+// resolveWires(factory, ((org.osoa.sca.model.ModuleFragment) moduleFragment).getWires());
+// }
+ }
+
+// /**
+// * Resolve a target URI
+// *
+// * @param factory
+// * @param targetURIElement
+// */
+// private ConfiguredService resolveURIElement(AssemblyFactory factory, DataObject targetURIElement) {
+// Sequence sequence = targetURIElement.getSequence(0);
+// String targetURI = (String) sequence.getValue(0);
+// ServiceURI serviceURI = factory.createServiceURI(null, targetURI);
+// ConfiguredService configuredService = getConfiguredService(serviceURI);
+// if (configuredService == null) {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Cannot find service for " + targetURI);
+// }
+// return configuredService;
+// }
+//
+// /**
+// * Resolve the given wires
+// *
+// * @param factory
+// * @param wires
+// */
+// private void resolveWires(AssemblyFactory factory, List<ModuleWire> wires) {
+//
+// // Loop through the wires
+// for (Iterator<ModuleWire> i = wires.iterator(); i.hasNext();) {
+// ModuleWire wire = i.next();
+//
+// // Get the source reference
+// ServiceURI sourceURI = factory.createServiceURI(null, wire.getSourceUri());
+// ConfiguredReference configuredReference = null;
+// String partName = sourceURI.getPartName();
+// String referenceName = sourceURI.getServiceName();
+// if (referenceName != null) {
+// Component component = getComponent(partName);
+// if (component != null) {
+// configuredReference = component.getConfiguredReference(referenceName);
+// }
+// } else {
+// EntryPoint entryPoint = getEntryPoint(partName);
+// if (entryPoint != null) {
+// configuredReference = entryPoint.getConfiguredReference();
+// }
+// }
+// if (configuredReference == null) {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Cannot find wire source " + sourceURI);
+// } else {
+//
+// // Resolve the target service endpoint
+// ServiceURI targetURI = factory.createServiceURI(null, wire.getTargetUri());
+// ConfiguredService configuredService = getConfiguredService(targetURI);
+// if (configuredService != null) {
+//
+// // Wire the reference to the target
+// if (configuredReference.getReference().isMultiplicityN()) {
+// configuredReference.getTargetConfiguredServices().add(configuredService);
+// } else {
+// configuredReference.getTargetConfiguredServices().clear();
+// configuredReference.getTargetConfiguredServices().add(configuredService);
+// }
+// } else {
+// // FIXME shouldn't we be throwing an exception here
+// // log.error("Cannot find service for " + targetURI.getAddress());
+// }
+// }
+// }
+// }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.AssemblyModelObject#freeze()
+ */
+ public void freeze() {
+ if (isFrozen())
+ return;
+ super.freeze();
+
+ // Freeze component type and module fragments
+ if (componentType!=null)
+ componentType.freeze();
+ moduleFragments=Collections.unmodifiableList(moduleFragments);
+ freeze(moduleFragments);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#getRuntimeConfiguration()
+ */
+ public Object getRuntimeConfiguration() {
+ return runtimeConfiguration;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.RuntimeConfigurationHolder#setRuntimeConfiguration(java.lang.Object)
+ */
+ public void setRuntimeConfiguration(Object configuration) {
+ checkNotFrozen();
+ this.runtimeConfiguration = configuration;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.impl.AggregateImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
+ */
+ public boolean accept(AssemblyModelVisitor visitor) {
+ if (!super.accept(visitor))
+ return false;
+
+ if (componentType!=null) {
+ if (!componentType.accept(visitor))
+ return false;
+ }
+
+ if (!accept(moduleFragments, visitor))
+ return false;
+
+ return true;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ModuleImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,106 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.AssemblyModelContext;
+import org.apache.tuscany.model.assembly.AssemblyModelVisitor;
+import org.apache.tuscany.model.assembly.Port;
+import org.apache.tuscany.model.assembly.ServiceContract;
+
+/**
+ * An implementation of Port.
+ */
+public abstract class PortImpl extends AssemblyModelObjectImpl implements Port {
+
+ private ServiceContract serviceContract;
+ private String name;
+
+ /**
+ * Constructor
+ */
+ protected PortImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Port#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Port#setName(java.lang.String)
+ */
+ public void setName(String value) {
+ checkNotFrozen();
+ name=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Port#getServiceContract()
+ */
+ public ServiceContract getServiceContract() {
+ return serviceContract;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Port#setServiceContract(org.apache.tuscany.model.assembly.ServiceContract)
+ */
+ public void setServiceContract(ServiceContract value) {
+ checkNotFrozen();
+ serviceContract=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#initialize(org.apache.tuscany.model.assembly.AssemblyModelContext)
+ */
+ public void initialize(AssemblyModelContext modelContext) {
+ if (isInitialized())
+ return;
+ super.initialize(modelContext);
+
+ if (serviceContract!=null)
+ serviceContract.initialize(modelContext);
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#freeze()
+ */
+ public void freeze() {
+ if (isFrozen())
+ return;
+ super.freeze();
+
+ if (serviceContract!=null)
+ serviceContract.freeze();
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.impl.AssemblyModelObjectImpl#accept(org.apache.tuscany.model.assembly.AssemblyModelVisitor)
+ */
+ public boolean accept(AssemblyModelVisitor visitor) {
+ if (!super.accept(visitor))
+ return false;
+
+ if (serviceContract!=null) {
+ if (!serviceContract.accept(visitor))
+ return false;
+ }
+
+ return true;
+ }
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PortImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,112 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Property;
+
+/**
+ * An implementation of Property.
+ */
+public class PropertyImpl extends ExtensibleImpl implements Property {
+
+ private Object defaultValue;
+ private String name;
+ private boolean many;
+ private boolean required;
+ private Class type;
+
+ /**
+ * Constructor
+ */
+ protected PropertyImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#getDefaultValue()
+ */
+ public Object getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#getName()
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#getType()
+ */
+ public Class getType() {
+ return type;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#isMany()
+ */
+ public boolean isMany() {
+ return many;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#isRequired()
+ */
+ public boolean isRequired() {
+ return required;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#setDefaultValue(java.lang.Object)
+ */
+ public void setDefaultValue(Object value) {
+ defaultValue=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#setMany(boolean)
+ */
+ public void setMany(boolean value) {
+ checkNotFrozen();
+ many=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#setName(java.lang.String)
+ */
+ public void setName(String value) {
+ checkNotFrozen();
+ name=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#setRequired(boolean)
+ */
+ public void setRequired(boolean value) {
+ checkNotFrozen();
+ required=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Property#setType(java.lang.Class)
+ */
+ public void setType(Class value) {
+ checkNotFrozen();
+ type=value;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/PropertyImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,50 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Multiplicity;
+import org.apache.tuscany.model.assembly.Reference;
+
+/**
+ * An implementation of Reference.
+ */
+public class ReferenceImpl extends PortImpl implements Reference {
+
+ private Multiplicity multiplicity;
+
+ /**
+ * Constructor
+ */
+ protected ReferenceImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Reference#getMultiplicity()
+ */
+ public Multiplicity getMultiplicity() {
+ return multiplicity;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Reference#setMultiplicity(org.apache.tuscany.model.assembly.Multiplicity)
+ */
+ public void setMultiplicity(Multiplicity multiplicity) {
+ checkNotFrozen();
+ this.multiplicity=multiplicity;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ReferenceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,81 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Scope;
+import org.apache.tuscany.model.assembly.ServiceContract;
+
+/**
+ * An implementation of ServiceContract.
+ */
+public class ServiceContractImpl extends ExtensibleImpl implements ServiceContract {
+
+ private Class interface_;
+ private Class callbackInterface;
+ private Scope scope;
+
+ /**
+ * Constructor
+ */
+ protected ServiceContractImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#getCallbackInterface()
+ */
+ public Class getCallbackInterface() {
+ return callbackInterface;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#getInterface()
+ */
+ public Class getInterface() {
+ return interface_;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#getScope()
+ */
+ public Scope getScope() {
+ return scope;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#setCallbackInterface(java.lang.Class)
+ */
+ public void setCallbackInterface(Class value) {
+ checkNotFrozen();
+ callbackInterface=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#setInterface(java.lang.Class)
+ */
+ public void setInterface(Class value) {
+ checkNotFrozen();
+ interface_=value;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.ServiceContract#setScope(org.apache.tuscany.model.assembly.Scope)
+ */
+ public void setScope(Scope scope) {
+ checkNotFrozen();
+ this.scope=scope;
+ }
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceContractImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Service;
+
+/**
+ * An implementation of Service.
+ */
+public class ServiceImpl extends PortImpl implements Service {
+
+ /**
+ * Constructor
+ */
+ protected ServiceImpl() {
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,196 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.eclipse.emf.common.util.URI;
+
+import org.apache.tuscany.model.assembly.ConfiguredPort;
+import org.apache.tuscany.model.assembly.ConfiguredReference;
+import org.apache.tuscany.model.assembly.ConfiguredService;
+import org.apache.tuscany.model.assembly.ModuleComponent;
+import org.apache.tuscany.model.assembly.AggregatePart;
+import org.apache.tuscany.model.assembly.Service;
+import org.apache.tuscany.model.assembly.ServiceURI;
+
+/**
+ * An implementation of ServiceURI.
+ */
+public class ServiceURIImpl implements ServiceURI {
+
+ private String address;
+ private Boolean isSCAScheme;
+ private boolean isParsed;
+ private String moduleComponentName;
+ private String partName;
+ private String serviceName;
+
+ /**
+ * Constructor
+ */
+ protected ServiceURIImpl(String address) {
+ this.address = address;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param moduleComponent
+ * @param configuredPort
+ */
+ protected ServiceURIImpl(ModuleComponent moduleComponent, ConfiguredPort configuredPort) {
+ if (moduleComponent != null)
+ moduleComponentName = moduleComponent.getName();
+ else
+ moduleComponentName = "";
+ if (configuredPort instanceof ConfiguredService) {
+ ConfiguredService configuredService = (ConfiguredService) configuredPort;
+ partName = configuredService.getAggregatePart().getName();
+ Service service = configuredService.getService();
+ if (service != null) {
+ serviceName = configuredService.getService().getName();
+ address = "sca:///" + moduleComponentName + '/' + partName + '/' + serviceName;
+ } else {
+ address = "sca:///" + moduleComponentName + '/' + partName;
+ }
+
+ } else if (configuredPort instanceof ConfiguredReference) {
+ ConfiguredReference configuredReference = (ConfiguredReference) configuredPort;
+ AggregatePart part = configuredReference.getAggregatePart();
+ partName = part.getName();
+ serviceName = "reference." + configuredReference.getReference().getName();
+ address = "sca:///" + moduleComponentName + '/' + partName + '/' + serviceName;
+ }
+
+ isSCAScheme = Boolean.TRUE;
+ isParsed = true;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param moduleComponent
+ * @param service
+ */
+ protected ServiceURIImpl(ModuleComponent moduleComponent, String targetServiceName) {
+ if (moduleComponent != null)
+ moduleComponentName = moduleComponent.getName();
+ else
+ moduleComponentName = "";
+ int s = targetServiceName.indexOf('/');
+ if (s == -1) {
+ partName = targetServiceName;
+ address = "sca:///" + moduleComponentName + '/' + partName;
+ } else {
+ partName = targetServiceName.substring(0, s);
+ this.serviceName = targetServiceName.substring(s + 1);
+ address = "sca:///" + moduleComponentName + '/' + partName + '/' + this.serviceName;
+ }
+ isSCAScheme = Boolean.TRUE;
+ isParsed = true;
+ }
+
+ /**
+ * Returns true if the address scheme is sca:
+ *
+ * @return
+ */
+ public boolean isSCAScheme() {
+ if (isSCAScheme == null) {
+ if (address.startsWith("sca://")) {
+ isSCAScheme = Boolean.TRUE;
+ } else {
+ isSCAScheme = Boolean.FALSE;
+ }
+ }
+ return isSCAScheme.booleanValue();
+ }
+
+ /**
+ * Returns a URI for this address
+ *
+ * @return
+ */
+ public URI getURI() {
+ return URI.createURI(address);
+ }
+
+ /**
+ * @return Returns the address.
+ */
+ public String getAddress() {
+ return address;
+ }
+
+ /**
+ * Parse the address.
+ */
+ private void parse() {
+ isParsed = true;
+ if (isSCAScheme()) {
+ int s1 = address.indexOf('/', 6);
+ if (s1 == -1)
+ return;
+ s1++;
+ int s2 = address.indexOf('/', s1);
+ if (s2 == -1)
+ return;
+ moduleComponentName = address.substring(s1, s2);
+ s2++;
+ int s3 = address.indexOf('/', s2);
+ if (s3 == -1) {
+ partName = address.substring(s2);
+ return;
+ }
+ partName = address.substring(s2, s3);
+ s3++;
+ serviceName = address.substring(s3);
+ }
+ }
+
+ /**
+ * Returns the module component name
+ *
+ * @return
+ */
+ public String getModuleComponentName() {
+ if (!isParsed)
+ parse();
+ return moduleComponentName;
+ }
+
+ /**
+ * Returns the part name
+ *
+ * @return
+ */
+ public String getPartName() {
+ if (!isParsed)
+ parse();
+ return partName;
+ }
+
+ /**
+ * Returns the service name
+ * @return
+ */
+ public String getServiceName() {
+ if (!isParsed)
+ parse();
+ return serviceName;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/ServiceURIImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,32 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.SimpleComponent;
+
+/**
+ * An implementation of SimpleComponent.
+ */
+public class SimpleComponentImpl extends ComponentImpl implements SimpleComponent {
+
+ /**
+ * Constructor
+ */
+ protected SimpleComponentImpl() {
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SimpleComponentImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,49 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.impl;
+
+import org.apache.tuscany.model.assembly.Subsystem;
+
+/**
+ * An implementation of Subsystem.
+ */
+public class SubsystemImpl extends AggregateImpl implements Subsystem {
+
+ private String uri;
+
+ /**
+ * Constructor
+ */
+ protected SubsystemImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Subsystem#getURI()
+ */
+ public String getURI() {
+ return uri;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.Subsystem#setURI(java.lang.String)
+ */
+ public void setURI(String value) {
+ checkNotFrozen();
+ uri=value;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/impl/SubsystemImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,49 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.loader;
+
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleFragment;
+
+
+/**
+ * An assembly model loader.
+ */
+public interface AssemblyLoader {
+
+ /**
+ * Returns the module at the given uri
+ *
+ * @return
+ */
+ Module getModule(String uri);
+
+ /**
+ * Returns the module at the given uri
+ *
+ * @return
+ */
+ ModuleFragment getModuleFragment(String uri);
+
+ /**
+ * Returns the component type at the given uri
+ * @return
+ */
+ ComponentType getComponentType(String uri);
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/AssemblyLoader.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,57 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.loader.impl;
+
+import org.apache.tuscany.model.assembly.ComponentType;
+import org.apache.tuscany.model.assembly.Module;
+import org.apache.tuscany.model.assembly.ModuleFragment;
+import org.apache.tuscany.model.assembly.loader.AssemblyLoader;
+
+/**
+ */
+public class AssemblyLoaderImpl implements AssemblyLoader {
+
+ /**
+ * Constructor
+ */
+ public AssemblyLoaderImpl() {
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.loader.AssemblyLoader#getComponentType(java.lang.String)
+ */
+ public ComponentType getComponentType(String uri) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.loader.AssemblyLoader#getModule(java.lang.String)
+ */
+ public Module getModule(String uri) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /**
+ * @see org.apache.tuscany.model.assembly.loader.AssemblyLoader#getModuleFragment(java.lang.String)
+ */
+ public ModuleFragment getModuleFragment(String uri) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/AssemblyLoaderImpl.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,128 @@
+/**
+ *
+ * Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+ *
+ * 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.
+ */
+package org.apache.tuscany.model.assembly.loader.impl;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.tuscany.model.assembly.scdl.ComponentType;
+import org.apache.tuscany.model.assembly.scdl.DocumentRoot;
+import org.apache.tuscany.model.assembly.scdl.Module;
+import org.apache.tuscany.model.assembly.scdl.ModuleFragment;
+import org.apache.tuscany.model.assembly.scdl.Subsystem;
+import org.apache.tuscany.model.assembly.scdl.impl.SCDLPackageImpl;
+import org.apache.tuscany.model.assembly.scdl.util.SCDLResourceFactoryImpl;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.XMLMapImpl;
+
+/**
+ */
+public class SCDLXMLLoader extends ResourceSetImpl {
+
+ /**
+ * Constructor
+ */
+ public SCDLXMLLoader() {
+
+ // Register resource factories
+ Map extensionToFactoryMap=getResourceFactoryRegistry().getExtensionToFactoryMap();
+ SCDLResourceFactoryImpl resourceFactory=new SCDLResourceFactoryImpl();
+ extensionToFactoryMap.put("module", resourceFactory);
+ extensionToFactoryMap.put("fragment", resourceFactory);
+ extensionToFactoryMap.put("subsystem", resourceFactory);
+ extensionToFactoryMap.put("componentType", resourceFactory);
+
+ // Initialize SCDL package
+ SCDLPackageImpl.eINSTANCE.eClass();
+
+ }
+
+ /**
+ * Returns an SCDL document root.
+ * @param uri
+ * @return
+ */
+ private DocumentRoot getDocumentRoot(String uri) {
+ Resource resource = (Resource) getResource(URI.createURI(uri), true);
+ List contents=resource.getContents();
+ if (!contents.isEmpty()) {
+ return (DocumentRoot)contents.get(0);
+ } else
+ return null;
+ }
+
+ /**
+ * Returns an SCDL module.
+ * @param uri
+ * @return
+ */
+ public Module getModule(String uri) {
+ DocumentRoot documentRoot=getDocumentRoot(uri);
+ return documentRoot!=null? documentRoot.getModule():null;
+ }
+
+ /**
+ * Returns an SCDL module fragment.
+ * @param uri
+ * @return
+ */
+ public ModuleFragment getModuleFragment(String uri) {
+ DocumentRoot documentRoot=getDocumentRoot(uri);
+ return documentRoot!=null? documentRoot.getModuleFragment():null;
+ }
+
+ /**
+ * Returns an SCDL component type.
+ * @param uri
+ * @return
+ */
+ public ComponentType getComponentType(String uri) {
+ DocumentRoot documentRoot=getDocumentRoot(uri);
+ return documentRoot!=null? documentRoot.getComponentType():null;
+ }
+
+ /**
+ * Returns an SCDL subsystem.
+ * @param uri
+ * @return
+ */
+ public Subsystem getSubsystem(String uri) {
+ DocumentRoot documentRoot=getDocumentRoot(uri);
+ return documentRoot!=null? documentRoot.getSubsystem():null;
+ }
+
+ /**
+ * @see org.eclipse.emf.ecore.resource.impl.ResourceSetImpl#getLoadOptions()
+ */
+ public Map getLoadOptions() {
+ if (loadOptions == null) {
+ loadOptions = new HashMap();
+ XMLResource.XMLMap xmlMap = new XMLMapImpl();
+ loadOptions.put(XMLResource.OPTION_XML_MAP, xmlMap);
+ loadOptions.put(XMLResource.OPTION_EXTENDED_META_DATA, Boolean.TRUE);
+ loadOptions.put(XMLResource.OPTION_ENCODING, "UTF-8");
+ loadOptions.put(XMLResource.OPTION_USE_ENCODED_ATTRIBUTE_STYLE, Boolean.TRUE);
+ loadOptions.put(XMLResource.OPTION_USE_LEXICAL_HANDLER, Boolean.TRUE);
+ }
+ return loadOptions;
+ }
+
+}
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/loader/impl/SCDLXMLLoader.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,50 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.tuscany.model.assembly.scdl;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Binding</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Binding#getUri <em>Uri</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public interface Binding
+{
+ /**
+ * Returns the value of the '<em><b>Uri</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Uri</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Uri</em>' attribute.
+ * @see #setUri(String)
+ * @generated
+ */
+ String getUri();
+
+ /**
+ * Sets the value of the '{@link org.apache.tuscany.model.assembly.scdl.Binding#getUri <em>Uri</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Uri</em>' attribute.
+ * @see #getUri()
+ * @generated
+ */
+ void setUri(String value);
+
+} // Binding
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Binding.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,168 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.tuscany.model.assembly.scdl;
+
+import commonj.sdo.Sequence;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Component</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getImplementationGroup <em>Implementation Group</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getImplementation <em>Implementation</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getProperties <em>Properties</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getReferences <em>References</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getAny <em>Any</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getName <em>Name</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.Component#getAnyAttribute <em>Any Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public interface Component
+{
+ /**
+ * Returns the value of the '<em><b>Implementation Group</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Implementation Group</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Implementation Group</em>' attribute list.
+ * @generated
+ */
+ Sequence getImplementationGroup();
+
+ /**
+ * Returns the value of the '<em><b>Implementation</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Implementation</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Implementation</em>' containment reference.
+ * @see #setImplementation(Implementation)
+ * @generated
+ */
+ Implementation getImplementation();
+
+ /**
+ * Sets the value of the '{@link org.apache.tuscany.model.assembly.scdl.Component#getImplementation <em>Implementation</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Implementation</em>' containment reference.
+ * @see #getImplementation()
+ * @generated
+ */
+ void setImplementation(Implementation value);
+
+ /**
+ * Returns the value of the '<em><b>Properties</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Properties</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Properties</em>' containment reference.
+ * @see #setProperties(PropertyValues)
+ * @generated
+ */
+ PropertyValues getProperties();
+
+ /**
+ * Sets the value of the '{@link org.apache.tuscany.model.assembly.scdl.Component#getProperties <em>Properties</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Properties</em>' containment reference.
+ * @see #getProperties()
+ * @generated
+ */
+ void setProperties(PropertyValues value);
+
+ /**
+ * Returns the value of the '<em><b>References</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>References</em>' containment reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>References</em>' containment reference.
+ * @see #setReferences(ReferenceValues)
+ * @generated
+ */
+ ReferenceValues getReferences();
+
+ /**
+ * Sets the value of the '{@link org.apache.tuscany.model.assembly.scdl.Component#getReferences <em>References</em>}' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>References</em>' containment reference.
+ * @see #getReferences()
+ * @generated
+ */
+ void setReferences(ReferenceValues value);
+
+ /**
+ * Returns the value of the '<em><b>Any</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Any</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Any</em>' attribute list.
+ * @generated
+ */
+ Sequence getAny();
+
+ /**
+ * Returns the value of the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Name</em>' attribute isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Name</em>' attribute.
+ * @see #setName(String)
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link org.apache.tuscany.model.assembly.scdl.Component#getName <em>Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Name</em>' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Any Attribute</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Any Attribute</em>' attribute list.
+ * @generated
+ */
+ Sequence getAnyAttribute();
+
+} // Component
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/Component.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date
Added: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java?rev=379376&view=auto
==============================================================================
--- incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java (added)
+++ incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java Mon Feb 20 22:54:02 2006
@@ -0,0 +1,101 @@
+/**
+ * <copyright>
+ * </copyright>
+ *
+ * $Id$
+ */
+package org.apache.tuscany.model.assembly.scdl;
+
+import commonj.sdo.Sequence;
+
+import java.util.List;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Component Type</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.ComponentType#getService <em>Service</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.ComponentType#getReference <em>Reference</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.ComponentType#getProperty <em>Property</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.ComponentType#getAny <em>Any</em>}</li>
+ * <li>{@link org.apache.tuscany.model.assembly.scdl.ComponentType#getAnyAttribute <em>Any Attribute</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public interface ComponentType
+{
+ /**
+ * Returns the value of the '<em><b>Service</b></em>' containment reference list.
+ * The list contents are of type {@link org.apache.tuscany.model.assembly.scdl.Service}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Service</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Service</em>' containment reference list.
+ * @generated
+ */
+ List getService();
+
+ /**
+ * Returns the value of the '<em><b>Reference</b></em>' containment reference list.
+ * The list contents are of type {@link org.apache.tuscany.model.assembly.scdl.Reference}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Reference</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Reference</em>' containment reference list.
+ * @generated
+ */
+ List getReference();
+
+ /**
+ * Returns the value of the '<em><b>Property</b></em>' containment reference list.
+ * The list contents are of type {@link org.apache.tuscany.model.assembly.scdl.Property}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Property</em>' containment reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Property</em>' containment reference list.
+ * @generated
+ */
+ List getProperty();
+
+ /**
+ * Returns the value of the '<em><b>Any</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Any</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Any</em>' attribute list.
+ * @generated
+ */
+ Sequence getAny();
+
+ /**
+ * Returns the value of the '<em><b>Any Attribute</b></em>' attribute list.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Any Attribute</em>' attribute list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Any Attribute</em>' attribute list.
+ * @generated
+ */
+ Sequence getAnyAttribute();
+
+} // ComponentType
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/model/src/main/java/org/apache/tuscany/model/assembly/scdl/ComponentType.java
------------------------------------------------------------------------------
svn:keywords = Rev,Date