-
Notifications
You must be signed in to change notification settings - Fork 58
Jtikekar/reverting nullables #353
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
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
bd9177f
Revert nullables,
juileetikekar 8019df6
Upgrading to API version 3.0.2
juileetikekar 7903985
Remove child elements from MetadataDTOs (3.0.2)
juileetikekar 82968b6
Support for Metadata as per 3.0.2
juileetikekar afcd792
Support for /submodel-elements and Get + $path
juileetikekar b1047e9
Fix for ExceptionHandling
juileetikekar 970cc96
Support for $Path
juileetikekar 6eb3b40
Support for Level in case of Operation Element
juileetikekar eb02564
Rebasing and resoling conflicts
juileetikekar d0e2e7c
rebase and resolve conflicts
juileetikekar 6294e63
Remove child elements from MetadataDTOs (3.0.2)
juileetikekar 72cb493
Resolve conflicts
juileetikekar a27d37e
Resolve conflicts
juileetikekar 679483b
Fix for ExceptionHandling
juileetikekar e4b29fb
Resolve conflicts
juileetikekar 3652758
Support for Level in case of Operation Element
juileetikekar 537acf7
Resolve conflicts
juileetikekar 6522200
Resolve issues after rebase
juileetikekar 384ba1a
Headers added
martafullen 9bbbd20
Remove null check on DataSpecRef
juileetikekar 86dd10c
Merge branch 'jtikekar/revertingNullables' of https://github.com/admi…
juileetikekar 7058fe9
Support for encoded AssetId in GetAllShells
juileetikekar 2890023
Upgrade to 3.0.3,
juileetikekar 1897991
Upgrade to BugFix version 3.0.3
juileetikekar 0e3bacc
Update to BugFix Version 3.0.3
juileetikekar a5bc270
Fix bugs w.r.t., Path and submodel service
juileetikekar 1b820ad
Upgrade CD APIs to 3.0.3
juileetikekar ad136e6
Fix tests
juileetikekar 5eb7d44
Removing support of Path on AnnotatedRelationshipElement
juileetikekar 3ad1ea8
Support for API Versioning
juileetikekar 58c3465
Resolove conflicts with main
juileetikekar 186e732
Resolve conflicts with main
juileetikekar fda39c7
resolve conflicts with main
juileetikekar ff8d934
Resolve conflicts with main
juileetikekar 6c15c5d
Resolve conflicts with main
juileetikekar 0f61bdf
Resolve conflicts with main
juileetikekar 8602797
Support for Level in case of Operation Element
juileetikekar 6946eed
Remove null check on DataSpecRef
juileetikekar ca45b6f
Headers added
martafullen ad5204a
Support for encoded AssetId in GetAllShells
juileetikekar 0dd86cd
Upgrade to 3.0.3,
juileetikekar 8732300
Upgrade to BugFix version 3.0.3
juileetikekar 1ca0668
Update to BugFix Version 3.0.3
juileetikekar 0c8b7ef
Fix bugs w.r.t., Path and submodel service
juileetikekar 050ed8c
Upgrade CD APIs to 3.0.3
juileetikekar 6a881e0
Fix tests
juileetikekar e92ee14
Removing support of Path on AnnotatedRelationshipElement
juileetikekar bf0b061
Support for API Versioning
juileetikekar 933c76a
Merge branch 'jtikekar/revertingNullables' of https://github.com/admi…
juileetikekar de30a84
Correct errors after rebase
juileetikekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
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
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,25 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| using System; | ||
|
|
||
| namespace AasCore.Aas3_0.Attributes | ||
| { | ||
| /// <summary> | ||
| /// This attribute indicates, that it should e.g. serialized in JSON. | ||
| /// </summary> | ||
| [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)] | ||
| public class CountForHash : Attribute | ||
| { | ||
| } | ||
| } |
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,28 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| namespace AasCore.Aas3_0.Attributes | ||
| { | ||
| /// <summary> | ||
| /// This attribute indicates, that the field / property is searchable | ||
| /// </summary> | ||
| [System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple = true)] | ||
| public class MetaModelName : System.Attribute | ||
| { | ||
| public string name; | ||
| public MetaModelName(string name) | ||
| { | ||
| this.name = name; | ||
| } | ||
| } | ||
| } |
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,24 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| namespace AasCore.Aas3_0.Attributes | ||
| { | ||
| /// <summary> | ||
| /// This attribute indicates, that the field / property shall be skipped for reflection | ||
| /// in order to avoid cycles | ||
| /// </summary> | ||
| [System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple = true)] | ||
| public class SkipForReflection : System.Attribute | ||
| { | ||
| } | ||
| } |
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,24 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| namespace AasCore.Aas3_0.Attributes | ||
| { | ||
| /// <summary> | ||
| /// This attribute indicates, that the field / property shall be skipped for searching, because it is not | ||
| /// directly displayed in Package Explorer | ||
| /// </summary> | ||
| [System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple = true)] | ||
| public class SkipForSearch : System.Attribute | ||
| { | ||
| } | ||
| } |
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,23 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| namespace AasCore.Aas3_0.Attributes | ||
| { | ||
| /// <summary> | ||
| /// This attribute indicates, that the field / property is searchable | ||
| /// </summary> | ||
| [System.AttributeUsage(System.AttributeTargets.Field | System.AttributeTargets.Property, AllowMultiple = true)] | ||
| public class TextSearchable : System.Attribute | ||
| { | ||
| } | ||
| } |
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,71 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| using AasCore.Aas3_0; | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Text.Json.Serialization; | ||
| using System.Xml.Serialization; | ||
|
|
||
| namespace AdminShellNS.DiaryData | ||
| { | ||
| public class DiaryDataDef | ||
| { | ||
| public enum TimeStampKind { Create, Update } | ||
|
|
||
| [XmlIgnore] | ||
| [JsonIgnore] | ||
| private DateTime[] _timeStamp = new DateTime[2]; | ||
|
|
||
| [XmlIgnore] | ||
| [JsonIgnore] | ||
| public DateTime[] TimeStamp { get { return _timeStamp; } } | ||
|
|
||
| /// <summary> | ||
| /// List of entries, timewise one after each other (entries are timestamped). | ||
| /// Note: Default is <c>Entries = null</c>, as handling of many many AAS elements does not | ||
| /// create additional overhead of creating empty lists. An empty list shall be avoided. | ||
| /// </summary> | ||
| public List<IAasDiaryEntry> Entries = null; | ||
|
|
||
| public static void AddAndSetTimestamps(IReferable element, IAasDiaryEntry de, bool isCreate = false) | ||
| { | ||
| // trivial | ||
| if (element == null || de == null || element.DiaryData == null) | ||
| return; | ||
|
|
||
| // add entry | ||
| if (element.DiaryData.Entries == null) | ||
| element.DiaryData.Entries = new List<IAasDiaryEntry>(); | ||
| element.DiaryData.Entries.Add(de); | ||
|
|
||
| // figure out which timestamp | ||
| var tsk = TimeStampKind.Update; | ||
| if (isCreate) | ||
| { | ||
| tsk = TimeStampKind.Create; | ||
| } | ||
|
|
||
| // set this timestamp (and for the parents, as well) | ||
| IDiaryData el = element; | ||
| while (el?.DiaryData != null) | ||
| { | ||
| // itself | ||
| el.DiaryData.TimeStamp[(int)tsk] = DateTime.UtcNow; | ||
|
|
||
| // go up | ||
| el = (el as IReferable)?.Parent as IDiaryData; | ||
| } | ||
| } | ||
| } | ||
| } | ||
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,19 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| namespace AdminShellNS.DiaryData | ||
| { | ||
| public interface IAasDiaryEntry | ||
| { | ||
| } | ||
| } |
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,26 @@ | ||
| /******************************************************************************** | ||
| * Copyright (c) {2019 - 2024} Contributors to the Eclipse Foundation | ||
| * | ||
| * See the NOTICE file(s) distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Apache License Version 2.0 which is available at | ||
| * https://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| ********************************************************************************/ | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using System.Threading.Tasks; | ||
|
|
||
| namespace AdminShellNS.DiaryData | ||
| { | ||
| public interface IDiaryData | ||
| { | ||
| DiaryDataDef DiaryData { get; } | ||
| } | ||
| } |
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.
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity