Skip to content
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

[Add] QueryReferencedThings() and QueryReferencedThingsDeep() methods to the abstract Thing class #143

Merged
merged 5 commits into from
Oct 23, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions CDP4Common/AutoGenPoco/ActionItem.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActionItem.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -120,6 +120,26 @@ public ActionItem(Guid iid, ConcurrentDictionary<CacheKey, Lazy<CommonData.Thing
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public DateTime DueDate { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="ActionItem"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

yield return this.Actionee;
}

/// <summary>
/// Creates and returns a copy of this <see cref="ActionItem"/> for edit purpose.
/// </summary>
Expand Down
27 changes: 25 additions & 2 deletions CDP4Common/AutoGenPoco/ActualFiniteState.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActualFiniteState.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -154,6 +154,29 @@ public string ShortName
set { throw new InvalidOperationException("Forbidden Set value for the derived property ActualFiniteState.ShortName"); }
}

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="ActualFiniteState"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

foreach (var thing in this.PossibleState)
{
yield return thing;
}
}

/// <summary>
/// Creates and returns a copy of this <see cref="ActualFiniteState"/> for edit purpose.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/ActualFiniteStateKind.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActualFiniteStateKind.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
34 changes: 32 additions & 2 deletions CDP4Common/AutoGenPoco/ActualFiniteStateList.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ActualFiniteStateList.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -175,6 +175,36 @@ public override IEnumerable<IEnumerable> ContainerLists
}
}

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="ActualFiniteStateList"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

foreach (var thing in this.ExcludeOption)
{
yield return thing;
}

yield return this.Owner;

foreach (var thing in this.PossibleFiniteStateList.Select(x => x))
{
yield return thing;
}
}

/// <summary>
/// Creates and returns a copy of this <see cref="ActualFiniteStateList"/> for edit purpose.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/Alias.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Alias.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
27 changes: 25 additions & 2 deletions CDP4Common/AutoGenPoco/AndExpression.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AndExpression.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -95,6 +95,29 @@ public AndExpression(Guid iid, ConcurrentDictionary<CacheKey, Lazy<CommonData.Th
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public List<BooleanExpression> Term { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="AndExpression"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

foreach (var thing in this.Term)
{
yield return thing;
}
}

/// <summary>
/// Creates and returns a copy of this <see cref="AndExpression"/> for edit purpose.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/AnnotationApprovalKind.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AnnotationApprovalKind.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/AnnotationClassificationKind.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AnnotationClassificationKind.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/AnnotationStatusKind.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="AnnotationStatusKind.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
26 changes: 24 additions & 2 deletions CDP4Common/AutoGenPoco/Approval.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="Approval.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -112,6 +112,28 @@ public Approval(Guid iid, ConcurrentDictionary<CacheKey, Lazy<CommonData.Thing>>
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public DomainOfExpertise Owner { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="Approval"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

yield return this.Author;

yield return this.Owner;
}

/// <summary>
/// Creates and returns a copy of this <see cref="Approval"/> for edit purpose.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions CDP4Common/AutoGenPoco/ArrayParameterType.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ArrayParameterType.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down
24 changes: 22 additions & 2 deletions CDP4Common/AutoGenPoco/BinaryNote.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BinaryNote.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -102,6 +102,26 @@ public BinaryNote(Guid iid, ConcurrentDictionary<CacheKey, Lazy<CommonData.Thing
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public FileType FileType { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="BinaryNote"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

yield return this.FileType;
}

/// <summary>
/// Creates and returns a copy of this <see cref="BinaryNote"/> for edit purpose.
/// </summary>
Expand Down
26 changes: 24 additions & 2 deletions CDP4Common/AutoGenPoco/BinaryRelationship.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BinaryRelationship.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -102,6 +102,28 @@ public BinaryRelationship(Guid iid, ConcurrentDictionary<CacheKey, Lazy<CommonDa
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public Thing Target { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="BinaryRelationship"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

yield return this.Source;

yield return this.Target;
}

/// <summary>
/// Creates and returns a copy of this <see cref="BinaryRelationship"/> for edit purpose.
/// </summary>
Expand Down
28 changes: 26 additions & 2 deletions CDP4Common/AutoGenPoco/BinaryRelationshipRule.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="BinaryRelationshipRule.cs" company="RHEA System S.A.">
// Copyright (c) 2015-2019 RHEA System S.A.
// Copyright (c) 2015-2020 RHEA System S.A.
//
// Author: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov
// Authors: Sam Gerené, Merlin Bieze, Alex Vorobiev, Naron Phou, Alexander van Delft, Yevhen Ikonnykov, Smiechowski Nathanael
//
// This file is part of CDP4-SDK Community Edition
//
Expand Down Expand Up @@ -132,6 +132,30 @@ public BinaryRelationshipRule(Guid iid, ConcurrentDictionary<CacheKey, Lazy<Comm
[UmlInformation(aggregation: AggregationKind.None, isDerived: false, isOrdered: false, isNullable: false, isPersistent: true)]
public Category TargetCategory { get; set; }

/// <summary>
/// Queries the referenced <see cref="Thing"/>s of the current <see cref="BinaryRelationshipRule"/>
/// </summary>
/// <remarks>
/// this does not include the contained <see cref="Thing"/>s, the contained <see cref="Thing"/>s
/// are exposed via the <see cref="ContainerLists"/> method
/// </remarks>
/// <returns>
/// An <see cref="IEnumerable{Thing}"/>
/// </returns>
public override IEnumerable<Thing> QueryReferencedThings()
{
foreach (var thing in base.QueryReferencedThings())
{
yield return thing;
}

yield return this.RelationshipCategory;

yield return this.SourceCategory;

yield return this.TargetCategory;
}

/// <summary>
/// Creates and returns a copy of this <see cref="BinaryRelationshipRule"/> for edit purpose.
/// </summary>
Expand Down
Loading