Skip to content

Commit

Permalink
[Implement] IFeature
Browse files Browse the repository at this point in the history
  • Loading branch information
samatrhea committed Aug 9, 2024
1 parent 5608caa commit f3edcd2
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 0 deletions.
14 changes: 14 additions & 0 deletions uml4net/POCO/Classification/IFeature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,24 @@

namespace uml4net.POCO.Classification
{
using uml4net.Decorators;

/// <summary>
/// A Feature declares a behavioral or structural characteristic of Classifiers.
/// </summary>
public interface IFeature : IRedefinableElement
{
/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly:true, isDerived:true, isDerivedUnion:true)]
public IClassifier FeaturingClassifier { get; }

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue:"false")]
public bool IsStatic { get; set; }
}
}
15 changes: 15 additions & 0 deletions uml4net/POCO/Classification/Operation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,5 +230,20 @@ public class Operation : IOperation
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)]
[Implements(implementation: "IBehavioralFeature.RaisedException")]
public List<IType> RaisedException { get; set; }

/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly: true, isDerived: true, isDerivedUnion: true)]
[Implements(implementation: "IFeature.FeaturingClassifier")]
public IClassifier FeaturingClassifier => throw new NotImplementedException();

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue: "false")]
[Implements(implementation: "IFeature.IsStatic")]
public bool IsStatic { get; set; } = false;
}
}
15 changes: 15 additions & 0 deletions uml4net/POCO/Classification/Property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,5 +175,20 @@ public class Property : IProperty
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)]
[Implements(implementation: "ITypedElement.Type")]
public IType Type { get; set; }

/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly: true, isDerived: true, isDerivedUnion: true)]
[Implements(implementation: "IFeature.FeaturingClassifier")]
public IClassifier FeaturingClassifier => throw new NotImplementedException();

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue: "false")]
[Implements(implementation: "IFeature.IsStatic")]
public bool IsStatic { get; set; } = false;
}
}
15 changes: 15 additions & 0 deletions uml4net/POCO/SimpleClassifiers/Reception.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,20 @@ public class Reception : IReception
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: int.MaxValue)]
[Implements(implementation: "IBehavioralFeature.RaisedException")]
public List<IType> RaisedException { get; set; }

/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly: true, isDerived: true, isDerivedUnion: true)]
[Implements(implementation: "IFeature.FeaturingClassifier")]
public IClassifier FeaturingClassifier => throw new NotImplementedException();

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue: "false")]
[Implements(implementation: "IFeature.IsStatic")]
public bool IsStatic { get; set; } = false;
}
}
15 changes: 15 additions & 0 deletions uml4net/POCO/StructuredClassifiers/Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,5 +102,20 @@ public class Connector : IConnector
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)]
[Implements(implementation: "INamedElement.Visibility")]
public VisibilityKind Visibility { get; set; }

/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly: true, isDerived: true, isDerivedUnion: true)]
[Implements(implementation: "IFeature.FeaturingClassifier")]
public IClassifier FeaturingClassifier => throw new NotImplementedException();

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue: "false")]
[Implements(implementation: "IFeature.IsStatic")]
public bool IsStatic { get; set; } = false;
}
}
15 changes: 15 additions & 0 deletions uml4net/POCO/StructuredClassifiers/Port.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,20 @@ public class Port : IPort
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1)]
[Implements(implementation: "ITypedElement.Type")]
public IType Type { get; set; }

/// <summary>
/// The Classifiers that have this Feature as a feature.
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 0, upperValue: 1, isReadOnly: true, isDerived: true, isDerivedUnion: true)]
[Implements(implementation: "IFeature.FeaturingClassifier")]
public IClassifier FeaturingClassifier => throw new NotImplementedException();

/// <summary>
/// Specifies whether this Feature characterizes individual instances classified by the Classifier (false)
/// or the Classifier itself (true).
/// </summary>
[Property(aggregation: AggregationKind.None, lowerValue: 1, upperValue: 1, defaultValue: "false")]
[Implements(implementation: "IFeature.IsStatic")]
public bool IsStatic { get; set; } = false;
}
}

0 comments on commit f3edcd2

Please sign in to comment.