-
Notifications
You must be signed in to change notification settings - Fork 45
/
RepresentationMetadata.java
60 lines (49 loc) · 1.69 KB
/
RepresentationMetadata.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*******************************************************************************
* Copyright (c) 2022, 2023 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.sirius.components.core;
import java.text.MessageFormat;
import java.util.Objects;
/**
* The metadata of a representation.
*
* @author sbegaudeau
*/
public class RepresentationMetadata {
private final String id;
private final String kind;
private final String label;
private final String descriptionId;
public RepresentationMetadata(String id, String kind, String label, String descriptionId) {
this.id = Objects.requireNonNull(id);
this.kind = Objects.requireNonNull(kind);
this.label = Objects.requireNonNull(label);
this.descriptionId = Objects.requireNonNull(descriptionId);
}
public String getId() {
return this.id;
}
public String getKind() {
return this.kind;
}
public String getLabel() {
return this.label;
}
public String getDescriptionId() {
return this.descriptionId;
}
@Override
public String toString() {
String pattern = "{0} '{'id: {1}, kind: {2}, label: {3}, descriptionId: {4}'}'";
return MessageFormat.format(pattern, this.getClass().getSimpleName(), this.id, this.kind, this.label, this.descriptionId);
}
}