• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wistefan / tmforum-api / #159

15 Sep 2025 01:39PM UTC coverage: 29.514%. First build
#159

push

web-flow
Merge 018f4de6e into b50f22db9

389 of 5758 branches covered (6.76%)

Branch coverage included in aggregate %.

0 of 11 new or added lines in 1 file covered. (0.0%)

2627 of 4461 relevant lines covered (58.89%)

0.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/common/src/main/java/org/fiware/tmforum/common/domain/RelatedParty.java
1
package org.fiware.tmforum.common.domain;
2

3
import com.fasterxml.jackson.annotation.JsonIgnore;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import io.github.wistefan.mapping.annotations.*;
6
import lombok.EqualsAndHashCode;
7
import lombok.Getter;
8
import lombok.Setter;
9

10
import java.net.URI;
11
import java.util.ArrayList;
12
import java.util.List;
13
import java.util.Optional;
14
import java.util.StringTokenizer;
15

16
@MappingEnabled(entityType = {"organization", "individual"})
17
@EqualsAndHashCode(callSuper = true)
×
18
public class RelatedParty extends RefEntity {
19

NEW
20
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "name", embedProperty = true)}))
×
NEW
21
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "name", targetClass = String.class)}))
×
22
        private String name;
23

NEW
24
        @Getter(onMethod = @__({@AttributeGetter(value = AttributeType.PROPERTY, targetName = "role", embedProperty = true)}))
×
NEW
25
        @Setter(onMethod = @__({@AttributeSetter(value = AttributeType.PROPERTY, targetName = "role", targetClass = String.class)}))
×
26
        private String role;
27

28
        public RelatedParty(@JsonProperty("id") String id) {
NEW
29
                super(id);
×
NEW
30
        }
×
31

32
        @Override
33
        @JsonIgnore
34
        public List<String> getReferencedTypes() {
NEW
35
                return new ArrayList<>(List.of("organization", "individual"));
×
36
        }
37

38
        @RelationshipObject
39
        @Override
40
        public URI getId() {
NEW
41
                return id;
×
42
        }
43

44
        @DatasetId
45
        public URI getDatasetId() {
NEW
46
                String role = Optional.ofNullable(getRole()).orElse("role");
×
NEW
47
                String name = Optional.ofNullable(getName()).orElse("name");
×
48

NEW
49
                return URI.create(String.format("%s:%s:%s", id.toString(), role, name));
×
50
        }
51
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc