File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed
src/main/java/com/contentful/java/cda Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change 11package com .contentful .java .cda ;
22
3+ import com .google .gson .annotations .SerializedName ;
4+
5+ import java .util .Map ;
36
47public class CDATaxonomyConcept extends CDAResource {
8+ private static final long serialVersionUID = -2852530837647669036L ;
9+
10+ @ SerializedName ("prefLabel" )
11+ protected Map <String , String > prefLabel ;
12+
13+ /**
14+ * @return the preferred label map containing locale-to-label mappings.
15+ */
16+ public Map <String , String > prefLabel () {
17+ return prefLabel ;
18+ }
19+
20+ /**
21+ * Get the preferred label for a specific locale.
22+ * @param locale the locale code (e.g., "en-US")
23+ * @return the label for the specified locale, or null if not found
24+ */
25+ public String getPrefLabel (String locale ) {
26+ return prefLabel != null ? prefLabel .get (locale ) : null ;
27+ }
28+
529 @ Override
630 public String toString () {
731 return "CDATaxonomyConcept{"
8- + "attrs=" + attrs
32+ + "attrs=" + attrs + '\''
33+ + ", prefLabel=" + prefLabel
934 + '}' ;
1035 }
1136}
You can’t perform that action at this time.
0 commit comments