diff options
author | huangjian <huang.jian12@zte.com.cn> | 2016-08-31 16:47:33 +0800 |
---|---|---|
committer | huangjian <huang.jian12@zte.com.cn> | 2016-08-31 16:47:33 +0800 |
commit | fa49e78cc199526a9e33b59c5194f8e3bf0f0952 (patch) | |
tree | 3478e867a8f304266dbceca6e992cceca410ede4 /winery/documentation | |
parent | 159d40f0011559c8f82338b29dca1bffd700f2c8 (diff) |
Add winery source code
Change-Id: I1c5088121d79b71098c3cba1996c6f784737532e
Issue-id: TOSCA-49
Signed-off-by: huangjian <huang.jian12@zte.com.cn>
Diffstat (limited to 'winery/documentation')
-rw-r--r-- | winery/documentation/CodeHeaders.md | 45 | ||||
-rw-r--r-- | winery/documentation/HowToRelease.md | 26 | ||||
-rw-r--r-- | winery/documentation/RepositoryLayout.md | 71 | ||||
-rw-r--r-- | winery/documentation/TOSCA specification/.gitignore | 2 | ||||
-rw-r--r-- | winery/documentation/TOSCA specification/TOSCA-v1.0-os-attributes.xlsx | bin | 0 -> 11108 bytes | |||
-rw-r--r-- | winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.pdf | bin | 0 -> 189664 bytes | |||
-rw-r--r-- | winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.plantuml | 470 | ||||
-rw-r--r-- | winery/documentation/TOSCA specification/startplantuml.bat | 20 |
8 files changed, 634 insertions, 0 deletions
diff --git a/winery/documentation/CodeHeaders.md b/winery/documentation/CodeHeaders.md new file mode 100644 index 0000000..533dfe4 --- /dev/null +++ b/winery/documentation/CodeHeaders.md @@ -0,0 +1,45 @@ +# About this file + +This file explains how to create and maintain copyright headers in source files. + +# Initial header + +``` +/*********************************************************************** + * Copyright (c) {DATE} {INITIAL COPYRIGHT OWNER} {OTHER COPYRIGHT OWNERS}. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Apache License v2.0 which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Apache License v2.0 is available at + * http://www.opensource.org/licenses/apache2.0.php. + * You may elect to redistribute this code under either of these licenses. + * Contributors: + * {INITIAL AUTHOR} - initial API and implementation + ************************************************************************* +``` + +## Templates +* Company: John Smith (University of Stuttgart) +* Student: John Smith +* Copyright (c) 2013 John Smith (University of Stuttgart). + +# Full information + +Full information is available at: http://www.eclipse.org/legal/copyrightandlicensenotice.php + +# License +Copyright (c) 2014 University of Stuttgart. + +All rights reserved. This program and the accompanying materials +are made available under the terms of the [Eclipse Public License v1.0] +and the [Apache License v2.0] which both accompany this distribution, +and are available at http://www.eclipse.org/legal/epl-v10.html +and http://www.apache.org/licenses/LICENSE-2.0 + +Contributors: +* Oliver Kopp - initial API and implementation + + + [Apache License v2.0]: http://www.apache.org/licenses/LICENSE-2.0.html + [Eclipse Public License v1.0]: http://www.eclipse.org/legal/epl-v10.html diff --git a/winery/documentation/HowToRelease.md b/winery/documentation/HowToRelease.md new file mode 100644 index 0000000..859cf3a --- /dev/null +++ b/winery/documentation/HowToRelease.md @@ -0,0 +1,26 @@ +# How to do a release + +As the maven release plugin does not yet support bower, the versions in `bower.json` have to be adapted manually. + +- remove `-SNAPSHOT` in `/org.eclipse.repository/bower.json` +- remove `-SNAPSHOT` in `/org.eclipse.winery.topologymodeler/bower.json` +- execute `mvn -B release:prepare` +- increase version number in /org.eclipse.repository/bower.json and add `-SNAPSHOT` +- increase version number in /org.eclipse.winery.topologymodeler/bower.json and add `-SNAPSHOT` +- execute `mvn release:perform` + +# License +Copyright (c) 2013-2014 University of Stuttgart. + +All rights reserved. This program and the accompanying materials +are made available under the terms of the [Eclipse Public License v1.0] +and the [Apache License v2.0] which both accompany this distribution, +and are available at http://www.eclipse.org/legal/epl-v10.html +and http://www.apache.org/licenses/LICENSE-2.0 + +Contributors: +* Oliver Kopp - initial API and implementation + + + [Apache License v2.0]: http://www.apache.org/licenses/LICENSE-2.0.html + [Eclipse Public License v1.0]: http://www.eclipse.org/legal/epl-v10.html diff --git a/winery/documentation/RepositoryLayout.md b/winery/documentation/RepositoryLayout.md new file mode 100644 index 0000000..5256f3b --- /dev/null +++ b/winery/documentation/RepositoryLayout.md @@ -0,0 +1,71 @@ +# Layout of the filebased repository + +## Typical layout + +Typically, all TOSCA components have the path `componenttype/ns/id`. + +## Directory `imports` + +This directory stores files belonging to a CSAR. +That means, when a definitions points to an external reference, the file has to be stored at the external location and not inside the repository + +### Directory layout + +`imports/<encoded importtype>/<encoded namespace>/<id>/` + +In case no namespace is specified, then `__NONE__` is used as namespace. +Handling of that is currently not supported. + +`id` is a randomly generated id reflecting a single imported file. + +Inside the directory, a `.tosca` is stored containing the import element only. +In future, this can be used to contain the extensibility attributes, which are currently unsupported. + +`location` points to +i) the local file or +ii) to some external definition (absolute URL!) + +Currently, ii is not implemented and the storage is used as mirror only to be able to +a) offer choice of known XML Schema definitions +b) generate a UI for known XML Schemas (current idea: use http://sourceforge.net/projects/xsd2gui/) + +Typically, all TOSCA components have the path `componenttype/ns/id`. +We add `imports` before to group the imports. +The chosen ordering allows to present all available imports for a given import type +by just querying the contents of `<encoded importtype>`. + +### Handling of the extensibility parts + +Handling of the extensible part of `tImport` is not supported. +A first idea is to store the Import XML Element as file in the respective directory. + +### Special treatment of XSD definitions + +#### Knowing the definitions for a QName + +Currently, all contained XSDs are queried for their defined local names and this set is aggregated. + +The following is an implementation idea: + +Each namespace may contain multiple definitions. +Therefore, each folder `<enocded namespace>` contains a file `import.properties`, +which provides a mapping of local names to id. +For instance, if `theElement`is defined in `myxmldefs.xsd` (being the human-readable id of the folder), +`index.properties` contains `theElement = myxmldefs.xsd`. +The local name is sufficient as the namespace is given by the parent directory. + +## License +Copyright (c) 2013-2014 University of Stuttgart. + +All rights reserved. This program and the accompanying materials +are made available under the terms of the [Eclipse Public License v1.0] +and the [Apache License v2.0] which both accompany this distribution, +and are available at http://www.eclipse.org/legal/epl-v10.html +and http://www.apache.org/licenses/LICENSE-2.0 + +Contributors: +* Oliver Kopp - initial API and implementation + + + [Apache License v2.0]: http://www.apache.org/licenses/LICENSE-2.0.html + [Eclipse Public License v1.0]: http://www.eclipse.org/legal/epl-v10.html diff --git a/winery/documentation/TOSCA specification/.gitignore b/winery/documentation/TOSCA specification/.gitignore new file mode 100644 index 0000000..664db10 --- /dev/null +++ b/winery/documentation/TOSCA specification/.gitignore @@ -0,0 +1,2 @@ +*.png +*.svg diff --git a/winery/documentation/TOSCA specification/TOSCA-v1.0-os-attributes.xlsx b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-attributes.xlsx Binary files differnew file mode 100644 index 0000000..fb03f8c --- /dev/null +++ b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-attributes.xlsx diff --git a/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.pdf b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.pdf Binary files differnew file mode 100644 index 0000000..3ed41fc --- /dev/null +++ b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.pdf diff --git a/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.plantuml b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.plantuml new file mode 100644 index 0000000..d186078 --- /dev/null +++ b/winery/documentation/TOSCA specification/TOSCA-v1.0-os-class-diagram.plantuml @@ -0,0 +1,470 @@ +/*********************************************************************** + * Copyright (c) 2013-2014 University of Stuttgart. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * and Apache License v2.0 which accompanies this distribution. + * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html + * and the Apache License v2.0 is available at + * http://www.opensource.org/licenses/apache2.0.php. + * You may elect to redistribute this code under either of these licenses. + * Contributors: + * Oliver Kopp - initial implementation + ************************************************************************* + +This model describes the XSD of TOSCA-v1.0.xsd as released by TOSCA v1.0 cos01. +URL: http://docs.oasis-open.org/tosca/TOSCA/v1.0/os/schemas/TOSCA-v1.0.xsd +Specification: http://docs.oasis-open.org/tosca/TOSCA/v1.0/TOSCA-v1.0.html + +@startuml + +'skinparam monochrome true +'Chooses LightGray as background color +'We're better off with manual setting + +skinparam class { + BackgroundColor White + ArrowColor Black + BorderColor Black + LegendBackgroundColor White +} + +skinparam stereotypeCBackgroundColor LightGray + +skinparam noteBackgroundColor White +skinparam noteBorderColor Black + +'required for SVG +skinparam defaultFontName sans-serif + + +Title <size:33>TOSCA v1.0 as UML class diagram. This is not an official OASIS document. No warranty. (c) University of Stuttgart. Dual-licensed under EPL and ASLv2. Version 2014-01-29. + +legend right +== Note on the model +The model stays close to the XSD with following exceptions: +* Containers such as tTags are ignored: A class is then wired using a 1:n relation to the elements nested in the container +* Relations to TOSCA artifacts are encoded. +** E.g., a QName modelling a substitutable Node Type is modeled as reference to a Node Type +** *Ref elements are not modeled, the association is drawn directly +*** E.g., tCapabilityRef is not contained in the model +* xsd types are presented more relaxed. E.g., xsd:string becomes String + +== Conventions +* green: required (+ prefix) +* all others: optional +endlegend + + + +'OS line 19 +class tExtensibleElements { + documentation + contents of other namespaces +} + +'OS line 26 +tExtensibleElements <|-- tImport +class tImport { + anyURI namespace + anyURI location + +(anyURI) importType +} + +'OS line 42 +tExtensibleElements <|-- tDefinitions +class tDefinitions { + +ID id + String name + anyURI targetNamespace + List<Object> Types +} +tDefinitions *-- "*" tExtension +tDefinitions *-- "*" tImport + +'OS line 61 +tDefinitions *-- "*" tServiceTemplate +tDefinitions *-- "*" tNodeType +tDefinitions *-- "*" tNodeTypeImplementation +tDefinitions *-- "*" tRelationshipType +tDefinitions *-- "*" tRelationshipTypeImplementation +tDefinitions *-- "*" tCapabilityType +tDefinitions *-- "*" tArtifactType +tDefinitions *-- "*" tArtifactTemplate +tDefinitions *-- "*" tPolicyType +tDefinitions *-- "*" tPolicyTemplate + +'OS line 81 +tExtensibleElements <|-- tServiceTemplate +class tServiceTemplate { + +ID id + String name + anyURI targetNamespace +} +tServiceTemplate *-- "*" tTag +tServiceTemplate *-- "*" tBoundaryDefinitions +tServiceTemplate *-- tTopologyTemplate +tServiceTemplate *-- "*" tPlan +tServiceTemplate --> "0..1" tNodeType : substitutable + +'OS line 102 +class tTag { + +String name + +String value +} + +'OS line 106 +class tBoundaryDefinitions { + Properties +} +tBoundaryDefinitions *-- "*" tPropertyMapping +tBoundaryDefinitions *-- "*" tPropertyConstraint +tBoundaryDefinitions --> "*" tRequirement +tBoundaryDefinitions --> "*" tCapability +tBoundaryDefinitions *-- "*" tPolicy +tBoundaryDefinitions *-- "*" tExportedInterface + +'OS line 159 +class tPropertyMapping { + +String serviceTemplatePropertyRef + +String targetPropertyRef +} +tPropertyMapping --> "0..1" tNodeTemplate +tPropertyMapping --> "0..1" tRelationshipTemplate +tPropertyMapping --> "0..1" tRequirement +tPropertyMapping --> "0..1" tCapability + +'OS lines 164 to 171 define tRequiermentRef and tCapabilityRef +'to enable referencing requirements and capabilities +'We directly point to the elements + +'OS line 172 +abstract class tEntityType +tExtensibleElements <|-- tEntityType +class tEntityType { +' DerivedFrom is rendered as self-association in all subclasses +' DerivedFrom + PropertiesDefinition + +NCName name + Boolean abstract [no] + Boolean final [no] + anyURI targetNamespace +} +tEntityType *-- "*" tTag + +'OS line 196 +abstract class tEntityTemplate +tExtensibleElements <|-- tEntityTemplate +class tEntityTemplate { + Properties + +xs:ID id + +QName type +} +tEntityTemplate *-- "*" tPropertyConstraint + +'OS line 219 +tEntityTemplate <|-- tNodeTemplate +class tNodeTemplate #DDDDDD/EEEEEE { + String name + int minInstances [1] + int|unbounded maxInstances [1] +} +tNodeTemplate *-- "*" tRequirement +tNodeTemplate *-- "*" tCapability +tNodeTemplate *-- "*" tPolicy +tNodeTemplate *-- "*" tDeploymentArtifact +'due to the subclassing of tEntityTemplate +'There, the type attribute references the parent class +tNodeTemplate --> tNodeType : type + +'OS line 268 +tExtensibleElements <|-- tTopologyTemplate +class tTopologyTemplate +'no attributes exist +tTopologyTemplate *-- "*" tNodeTemplate +tTopologyTemplate *-- "*" tRelationshipTemplate + +'OS line 278 +tEntityType <|-- tRelationshipType +class tRelationshipType #DDDDDD/EEEEEE +'no attributes +'InstanceStates +tRelationshipType *-- "*" tTopologyElementInstanceState +'SourceInterfaces +tRelationshipType *-- "*" tInterface : SourceInterface +'TargetInterfaces +tRelationshipType *-- "*" tInterface : TargetInterface +'ValidSource +tRelationshipType --> "0..1" tNodeType : ValidSource +tRelationshipType --> "0..1" tRequirementType : ValidSource +'ValidTarget +tRelationshipType --> "0..1" tNodeType : ValidTarget +tRelationshipType --> "0..1" tCapabilityType : ValidTarget +'DerivedFrom +tRelationshipType --> "0..1" tRelationshipType : DerivedFrom + + +'OS line 311 +tExtensibleElements <|-- tRelationshipTypeImplementation +class tRelationshipTypeImplementation { + +NCName name + anyURI targetNamespace + Boolean abstract + Boolean final +} +tRelationshipTypeImplementation --> tRelationshipType +tRelationshipTypeImplementation *-- "*" tTag +tRelationshipTypeImplementation --> "0..1" tRelationshipTypeImplementation : DerivedFrom +tRelationshipTypeImplementation *-- "*" tRequiredContainerFeature +tRelationshipTypeImplementation *-- "*" tImplementationArtifact + +'OS line 332 +tEntityTemplate <|-- tRelationshipTemplate +class tRelationshipTemplate #DDDDDD/EEEEEE { + String name +} +'SourceElement +tRelationshipTemplate --> "0..1" tNodeTemplate : SourceElement +tRelationshipTemplate --> "0..1" tRequirement : SourceElement +'TargetElement +tRelationshipTemplate --> "0..1" tNodeTemplate : TargetElement +tRelationshipTemplate --> "0..1" tCapability : TargetElement +' +tRelationshipTemplate *-- "*" tRelationshipConstraint +'due to the subclassing of tEntityTemplate +tRelationshipTemplate --> tRelationshipType + +'OS line 349 +'not modeled as t, but directly nested in tRelationshipTemplate +'We model it as t to be consistent with the other definitions +class tRelationshipConstraint { + +anyURI constraintType +} + +'OS line 365 +tEntityType <|-- tNodeType +class tNodeType #DDDDDD/EEEEEE +'No new attributes +' +tNodeType *-- "*" tRequirementDefinition +tNodeType *-- "*" tCapabilityDefinition +tNodeType *-- "*" tTopologyElementInstanceState +tNodeType *-- "*" tInterface +'DerivedFrom +tNodeType --> "0..1" tNodeType : DerivedFrom + +'OS line 395 +tExtensibleElements <|-- tNodeTypeImplementation +class tNodeTypeImplementation { + +NCname name + anyURI targetNamespace + Boolean abstract + Boolean final +} +tNodeTypeImplementation --> tNodeType +tNodeTypeImplementation *-- "*" tTag +tNodeTypeImplementation --> "0..1" tNodeTypeImplementation : DerivedFrom +tNodeTypeImplementation *-- "*" tRequiredContainerFeature +tNodeTypeImplementation *-- "*" tDeploymentArtifact +tNodeTypeImplementation *-- "*" tImplementationArtifact + +'OS line 417 +tEntityType <|-- tRequirementType +class tRequirementType +tRequirementType --> "0..1" tCapabilityType : requiredCapabilityType +'DerivedFrom +tRequirementType --> "0..1" tRequirementType : DerivedFrom + +'OS line 424 +tExtensibleElements <|-- tRequirementDefinition +class tRequirementDefinition { + +String name + int lowerBound [1] + int|unbounded upperBound [1] +} +tRequirementDefinition *-- "*" tConstraint +tRequirementDefinition --> tRequirementType + +'OS line 458 +tEntityTemplate <|-- tRequirement +class tRequirement { + +String name +} +'"name" is also used to point to tRequirementDefinition +tRequirement --> tRequirementDefinition : name +'due to the subclassing of tEntityTemplate +tRequirement --> tRequirementType + +'OS line 465 +tEntityType <|-- tCapabilityType +'DerivedFrom +tCapabilityType --> "0..1" tCapabilityType : DerivedFrom + +'OS line 470 +tExtensibleElements <|-- tCapabilityDefinition +class tCapabilityDefinition { + +String name + int lowerBound [1] + int|unbounded upperBound [1] +} +tCapabilityDefinition *-- "*" tConstraint +tCapabilityDefinition --> tCapabilityType + +'OS line 504 +tEntityTemplate <|-- tCapability +class tCapability { + +String name +} +'"name" is also used to point to tCapabilityDefinition +tCapability --> tCapabilityDefinition : name +'due to the subclassing of tEntityTemplate +tCapability --> tCapabilityType + +'OS line 511 +tEntityType <|-- tArtifactType +tArtifactType --> "0..1" tArtifactType : DerivedFrom + +'OS line 516 +tEntityTemplate <|-- tArtifactTemplate +'PDF line 2607 +class tArtifactTemplate { + String name +} +tArtifactTemplate *-- "*" tArtifactReference +'due to the subclassing of tEntityTemplate +tArtifactTemplate --> tArtifactType + +'OS line 537 +tExtensibleElements <|-- tDeploymentArtifact +class tDeploymentArtifact { + +String Name +} +tDeploymentArtifact --> tArtifactType +tDeploymentArtifact --> "0..1" tArtifactTemplate + +'OS line 557 +tExtensibleElements <|-- tImplementationArtifact +class tImplementationArtifact { + anyURI interfaceName + String operationName +} +tImplementationArtifact --> tArtifactType +tImplementationArtifact --> "0..1" tArtifactTemplate + +'OS line 573 +tExtensibleElements <|-- tPlan +class tPlan { + +ID id + String name + +anyURI planType + +anyURI languageUsed + PlanModel | PlanModelReference +} +tPlan *-- "0..1" tCondition : Precondition +tPlan *-- "*" tParameter : InputParamter +tPlan *-- "*" tParameter : OutputParamter + +'OS line 614 +tEntityType <|-- tPolicyType +class tPolicyType { + anyURI policyLanguage +} +'AppliesTo/NodeTypeReference: CS02 line 631 +tPolicyType --> "*" tNodeType : tAppliesTo/NodeTypeReference +'DerivedFrom +tPolicyType --> "0..1" tPolicyType : DerivedFrom + +'OS line 624 +tEntityTemplate <|-- tPolicyTemplate +class tPolicyTemplate { + String name +} +'due to inheritance of tEntityTemplate +tPolicyTemplate --> tPolicyType + +'OS line 640 +tExtensibleElements <|-- tPolicy +class tPolicy { + String name +} +tPolicy --> tPolicyType +tPolicy --> "0..1" tPolicyTemplate + +'OS line 649 +class tConstraint { + +anyURI constraintType +} + +'OS line 655 +tConstraint <|-- tPropertyConstraint +class tPropertyConstraint { + +String property +} + +'OS line 671 +tExtensibleElements <|-- tExtension +class tExtension { + +anyURI namespace + Boolean mustUnderstand [yes] +} + +'OS line 679 +class tParameter { + +String name + +String type + Boolean required [yes] +} + +'OS line 684 +class tInterface { + +anyURI name 'NCName is a subset of anyURI +} +tInterface *-- tOperation + +'OS line 690 +class tExportedInterface { + +anyURI name +} +tExportedInterface --> "1..*" tExportedOperation + +'OS line 696 +tExtensibleElements <|-- tOperation +class tOperation { + +NCName name +} +tOperation *-- "*" tParameter : InputParameters +tOperation *-- "*" tParameter : OutputParamters + +'OS line 719 +class tExportedOperation { + +NCName name + +anyURI interfaceName + +NCName operationName +} +tExportedOperation --> "0..1" tNodeTemplate +tExportedOperation --> "0..1" tRelationshipTemplate +tExportedOperation --> "0..1" tPlan + + +'OS line 743 +class tCondition { + +anyURI expressionLanguage +} + +'OS line 751 +'tTopologyElementInstanceState does not exist directly, but to be consistent with the others, we introduce it +class tTopologyElementInstanceState { + anyURI state +} + +'OS line 758 +class tArtifactReference { + Include + Exclude + +anyURI reference +} + +'OS line 773 +class tRequiredContainerFeature { + +anyURI feature +} +@enduml diff --git a/winery/documentation/TOSCA specification/startplantuml.bat b/winery/documentation/TOSCA specification/startplantuml.bat new file mode 100644 index 0000000..9da178a --- /dev/null +++ b/winery/documentation/TOSCA specification/startplantuml.bat @@ -0,0 +1,20 @@ +:/*********************************************************************** +: * Copyright (c) 2013-2014 University of Stuttgart. +: * All rights reserved. This program and the accompanying materials +: * are made available under the terms of the Eclipse Public License v1.0 +: * and Apache License v2.0 which accompanies this distribution. +: * The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html +: * and the Apache License v2.0 is available at +: * http://www.opensource.org/licenses/apache2.0.php. +: * You may elect to redistribute this code under either of these licenses. +: * Contributors: +: * Oliver Kopp - initial implementation +: ************************************************************************* + +@echo off +echo Generating SVG... +SET PLANTUML=C:\Users\Oliver\BTSync\plantuml.jar +java -jar %PLANTUML% -tsvg TOSCA-v1.0-os-class-diagram.plantuml +echo Generating PDF... +inkscape -z -D --file=TOSCA-v1.0-os-class-diagram.svg --export-pdf=TOSCA-v1.0-os-class-diagram.pdf +echo Done |