Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2020 Robert Bosch GmbH |
| 3 | * Author: Constantin Ziesche (constantin.ziesche@bosch.com) |
| 4 | * |
| 5 | * This program and the accompanying materials are made available under the |
| 6 | * terms of the Eclipse Public License 2.0 which is available at |
| 7 | * http://www.eclipse.org/legal/epl-2.0 |
| 8 | * |
| 9 | * SPDX-License-Identifier: EPL-2.0 |
| 10 | *******************************************************************************/ |
| 11 | using BaSyx.Models.Core.AssetAdministrationShell.Identification; |
| 12 | using System.Collections.Generic; |
| 13 | using System.Runtime.Serialization; |
| 14 | |
| 15 | namespace BaSyx.Models.Core.AssetAdministrationShell.References |
| 16 | { |
Constantin Ziesche | 310d2aa | 2020-03-25 11:48:26 +0100 | [diff] [blame^] | 17 | /// <summary> |
| 18 | /// Reference to either a model element of the same or another AAs or to an external entity. |
| 19 | /// A reference is an ordered list of keys, each key referencing an element. |
| 20 | /// The complete list of keys may for example be concatenated to a path that then gives unique access to an element or entity. |
| 21 | /// </summary> |
Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 22 | public interface IReference |
| 23 | { |
| 24 | [IgnoreDataMember] |
| 25 | IKey First { get; } |
| 26 | |
Constantin Ziesche | 310d2aa | 2020-03-25 11:48:26 +0100 | [diff] [blame^] | 27 | /// <summary> |
| 28 | /// Unique reference in its name space. |
| 29 | /// </summary> |
Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 30 | [DataMember(EmitDefaultValue = false, IsRequired = false, Name = "keys")] |
Constantin Ziesche | 310d2aa | 2020-03-25 11:48:26 +0100 | [diff] [blame^] | 31 | List<IKey> Keys { get; } |
Constantin Ziesche | 857c7ab | 2020-02-25 11:24:51 +0100 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | public interface IReference<out T> : IReference where T : IReferable |
| 35 | { } |
| 36 | } |