-
Notifications
You must be signed in to change notification settings - Fork 4
GCD PR For Nuget - DO NOT MERGE #210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
alexatstariongroup
wants to merge
6
commits into
development
Choose a base branch
from
GCD
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
975009a
Model version 1.3.17 and features
b093fe9
Version number adjustments for DALs
b776752
Update version to be in line with dev
df61ea5
Json file dal support for model version 1.3.0
450c73c
Fix test
b3938e0
Bump json file dal version
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -286,4 +286,4 @@ __pycache__/ | |
| *.btm.cs | ||
| *.odx.cs | ||
| *.xsd.cs | ||
| /*/*.orig | ||
| /**/*.orig | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
| // <copyright file="AttachmentTestFixture.cs" company="RHEA System S.A."> | ||
| // Copyright (c) 2015-2021 RHEA System S.A. | ||
| // | ||
| // Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft | ||
| // | ||
| // This file is part of CDP4-SDK Community Edition | ||
| // | ||
| // The CDP4-SDK Community Edition is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; either | ||
| // version 3 of the License, or (at your option) any later version. | ||
| // | ||
| // The CDP4-SDK Community Edition is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| // Lesser General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU Lesser General Public License | ||
| // along with this program; if not, write to the Free Software Foundation, | ||
| // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| // </copyright> | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| namespace CDP4Common.Tests.Poco | ||
| { | ||
| using System; | ||
|
|
||
| using CDP4Common.EngineeringModelData; | ||
| using CDP4Common.SiteDirectoryData; | ||
|
|
||
| using NUnit.Framework; | ||
|
|
||
| [TestFixture] | ||
| internal class AttachmentTestFixture | ||
| { | ||
| private Attachment attachment; | ||
|
|
||
| [SetUp] | ||
| public void Setup() | ||
| { | ||
| this.attachment = new Attachment(Guid.NewGuid(), null, null); | ||
| this.attachment.FileName = "filerev"; | ||
|
|
||
| this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext1" }); | ||
| this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext2" }); | ||
| } | ||
|
|
||
| [Test] | ||
| public void VerifyPathForFileRevisionLocatedInFileStore() | ||
| { | ||
| Assert.AreEqual("filerev.ext1.ext2", this.attachment.Path); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
| // <copyright file="AttachmentTestFixture.cs" company="RHEA System S.A."> | ||
| // Copyright (c) 2015-2021 RHEA System S.A. | ||
| // | ||
| // Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft | ||
| // | ||
| // This file is part of CDP4-SDK Community Edition | ||
| // | ||
| // The CDP4-SDK Community Edition is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; either | ||
| // version 3 of the License, or (at your option) any later version. | ||
| // | ||
| // The CDP4-SDK Community Edition is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| // Lesser General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU Lesser General Public License | ||
| // along with this program; if not, write to the Free Software Foundation, | ||
| // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| // </copyright> | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| namespace CDP4Common.Tests.Poco | ||
| { | ||
| using System; | ||
|
|
||
| using CDP4Common.EngineeringModelData; | ||
| using CDP4Common.SiteDirectoryData; | ||
|
|
||
| using NUnit.Framework; | ||
|
|
||
| [TestFixture] | ||
| internal class AttachmentTestFixture | ||
| { | ||
| private Attachment attachment; | ||
|
|
||
| [SetUp] | ||
| public void Setup() | ||
| { | ||
| this.attachment = new Attachment(Guid.NewGuid(), null, null); | ||
| this.attachment.FileName = "filerev"; | ||
|
|
||
| this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext1" }); | ||
| this.attachment.FileType.Add(new FileType(Guid.NewGuid(), null, null) { Extension = "ext2" }); | ||
| } | ||
|
|
||
| [Test] | ||
| public void VerifyPathForFileRevisionLocatedInFileStore() | ||
| { | ||
| Assert.AreEqual("filerev.ext1.ext2", this.attachment.Path); | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
| // <copyright file="ArchitectureDiagram.cs" company="RHEA System S.A."> | ||
| // Copyright (c) 2015-2021 RHEA System S.A. | ||
| // | ||
| // Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Nathanael Smiechowski | ||
| // | ||
| // This file is part of COMET-SDK Community Edition | ||
| // This is an auto-generated class. Any manual changes to this file will be overwritten! | ||
| // | ||
| // The COMET-SDK Community Edition is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; either | ||
| // version 3 of the License, or (at your option) any later version. | ||
| // | ||
| // The COMET-SDK Community Edition is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| // Lesser General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU Lesser General Public License | ||
| // along with this program; if not, write to the Free Software Foundation, | ||
| // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
| // -------------------------------------------------------------------------------------------------------------------- | ||
|
|
||
| namespace CDP4Common.DTO | ||
| { | ||
| using System; | ||
| using System.Collections; | ||
| using System.Collections.Concurrent; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Runtime.Serialization; | ||
| using System.Xml.Serialization; | ||
| using CDP4Common.CommonData; | ||
| using CDP4Common.DiagramData; | ||
| using CDP4Common.EngineeringModelData; | ||
| using CDP4Common.ReportingData; | ||
| using CDP4Common.SiteDirectoryData; | ||
| using CDP4Common.Types; | ||
|
|
||
| /// <summary> | ||
| /// A Data Transfer Object representation of the <see cref="ArchitectureDiagram"/> class. | ||
| /// </summary> | ||
| [DataContract] | ||
| [CDPVersion("1.3.0")] | ||
| [Container(typeof(Iteration), "DiagramCanvas")] | ||
| public sealed partial class ArchitectureDiagram : DiagramCanvas, IOwnedThing | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="ArchitectureDiagram"/> class. | ||
| /// </summary> | ||
| public ArchitectureDiagram() | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="ArchitectureDiagram"/> class. | ||
| /// </summary> | ||
| /// <param name="iid"> | ||
| /// The unique identifier. | ||
| /// </param> | ||
| /// <param name="rev"> | ||
| /// The revision number. | ||
| /// </param> | ||
| public ArchitectureDiagram(Guid iid, int rev) : base(iid: iid, rev: rev) | ||
| { | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the unique identifier of the referenced Owner. | ||
| /// </summary> | ||
| [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)] | ||
| [DataMember] | ||
| public Guid Owner { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets or sets the unique identifier of the referenced TopArchitectureElement. | ||
| /// </summary> | ||
| [UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: true, isPersistent: true)] | ||
| [DataMember] | ||
| public Guid? TopArchitectureElement { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Gets the route for the current <see ref="ArchitectureDiagram"/>. | ||
| /// </summary> | ||
| public override string Route | ||
| { | ||
| get { return this.ComputedRoute(); } | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Instantiate a <see cref="CDP4Common.DiagramData.ArchitectureDiagram"/> from a <see cref="ArchitectureDiagram"/> | ||
| /// </summary> | ||
| /// <param name="cache">The cache that stores all the <see cref="CommonData.Thing"/>s</param>. | ||
| /// <param name="uri">The <see cref="Uri"/> of the <see cref="CDP4Common.DiagramData.ArchitectureDiagram"/></param>. | ||
| /// <returns>A new <see cref="CommonData.Thing"/></returns> | ||
| public override CommonData.Thing InstantiatePoco(ConcurrentDictionary<CacheKey, Lazy<CommonData.Thing>> cache, Uri uri) | ||
| { | ||
| return new CDP4Common.DiagramData.ArchitectureDiagram(this.Iid, cache, uri); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Resolves the properties of a copied <see cref="Thing"/> based on the original and a collection of copied <see cref="Thing"/>. | ||
| /// </summary> | ||
| /// <param name="originalThing">The original <see cref="Thing"/></param>. | ||
| /// <param name="originalCopyMap">The map containig all instance of copied <see cref="Thing"/>s with their original</param>. | ||
| public override void ResolveCopy(Thing originalThing, IReadOnlyDictionary<Thing, Thing> originalCopyMap) | ||
| { | ||
| var original = originalThing as ArchitectureDiagram; | ||
| if (original == null) | ||
| { | ||
| throw new InvalidOperationException("The originalThing cannot be null or is of the incorrect type"); | ||
| } | ||
|
|
||
| foreach (var guid in original.Bounds) | ||
| { | ||
| var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); | ||
| if (Equals(copy, default(KeyValuePair<Thing, Thing>))) | ||
| { | ||
| throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); | ||
| } | ||
|
|
||
| this.Bounds.Add(copy.Value.Iid); | ||
| } | ||
|
|
||
| this.CreatedOn = original.CreatedOn; | ||
|
|
||
| this.Description = original.Description; | ||
|
|
||
| foreach (var guid in original.DiagramElement) | ||
| { | ||
| var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); | ||
| if (Equals(copy, default(KeyValuePair<Thing, Thing>))) | ||
| { | ||
| throw new InvalidOperationException(string.Format("The copy could not be found for {0}", guid)); | ||
| } | ||
|
|
||
| this.DiagramElement.Add(copy.Value.Iid); | ||
| } | ||
|
|
||
| foreach (var guid in original.ExcludedDomain) | ||
| { | ||
| var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); | ||
| this.ExcludedDomain.Add(copy.Value == null ? guid : copy.Value.Iid); | ||
| } | ||
|
|
||
| foreach (var guid in original.ExcludedPerson) | ||
| { | ||
| var copy = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == guid); | ||
| this.ExcludedPerson.Add(copy.Value == null ? guid : copy.Value.Iid); | ||
| } | ||
|
|
||
| this.ModifiedOn = original.ModifiedOn; | ||
|
|
||
| this.Name = original.Name; | ||
|
|
||
| var copyOwner = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.Owner); | ||
| this.Owner = copyOwner.Value == null ? original.Owner : copyOwner.Value.Iid; | ||
|
|
||
| this.PublicationState = original.PublicationState; | ||
|
|
||
| this.ThingPreference = original.ThingPreference; | ||
|
|
||
| var copyTopArchitectureElement = originalCopyMap.SingleOrDefault(kvp => kvp.Key.Iid == original.TopArchitectureElement); | ||
| this.TopArchitectureElement = copyTopArchitectureElement.Value == null ? original.TopArchitectureElement : copyTopArchitectureElement.Value.Iid; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Resolves the references of a copied <see cref="Thing"/> based on a original to copy map. | ||
| /// </summary> | ||
| /// <param name="originalCopyMap">The map containig all instance of copied <see cref="Thing"/>s with their original</param>. | ||
| /// <returns>True if a modification was done in the process of this method</returns>. | ||
| public override bool ResolveCopyReference(IReadOnlyDictionary<Thing, Thing> originalCopyMap) | ||
| { | ||
| var hasChanges = false; | ||
|
|
||
| return hasChanges; | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.