-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/maven/fixes/9.0' into maven/rele…
…ase/9.0
- Loading branch information
Showing
20 changed files
with
280 additions
and
198 deletions.
There are no files selected for viewing
149 changes: 49 additions & 100 deletions
149
Backend/alfresco/module/src/main/java/org/edu_sharing/metadataset/v2/MetadataKey.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,108 +1,57 @@ | ||
package org.edu_sharing.metadataset.v2; | ||
|
||
import lombok.Data; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@Getter | ||
@Setter | ||
public class MetadataKey extends MetadataTranslatable { | ||
|
||
public static class MetadataKeyRelated extends MetadataKey { | ||
public enum Relation { | ||
exactMatch, | ||
narrowMatch, | ||
relatedMatch, | ||
closeMatch, | ||
broadMatch, | ||
}; | ||
private Relation relation; | ||
|
||
public MetadataKeyRelated(Relation relation) { | ||
this.relation = relation; | ||
} | ||
|
||
public Relation getRelation() { | ||
return relation; | ||
} | ||
} | ||
private String key,caption,description,parent,locale; | ||
/** | ||
* List of other keys this child is a precedor of | ||
*/ | ||
private List<String> preceds; | ||
|
||
private final List<MetadataKeyRelated> related = new ArrayList<>(); | ||
|
||
private List<String> alternativeKeys; | ||
|
||
private String url; | ||
|
||
public void setUrl(String url) { | ||
this.url = url; | ||
} | ||
|
||
public String getUrl() { | ||
return url; | ||
} | ||
|
||
public void setAlternativeKeys(List<String> alternativeKeys) { | ||
this.alternativeKeys = alternativeKeys; | ||
} | ||
|
||
public List<String> getAlternativeKeys() { | ||
return alternativeKeys; | ||
} | ||
|
||
public String getParent() { | ||
return parent; | ||
} | ||
|
||
public void setParent(String parent) { | ||
if ( parent==null || parent.trim().isEmpty() ) | ||
this.parent=null; | ||
else | ||
this.parent = parent; | ||
} | ||
|
||
public void addRelated(MetadataKeyRelated related) { | ||
this.related.add(related); | ||
} | ||
|
||
public List<MetadataKeyRelated> getRelated() { | ||
return related; | ||
} | ||
|
||
public String getKey() { | ||
return key; | ||
} | ||
|
||
public void setKey(String key) { | ||
this.key = key; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public String getCaption() { | ||
return caption; | ||
} | ||
|
||
public void setCaption(String caption) { | ||
this.caption = caption; | ||
} | ||
|
||
public List<String> getPreceds() { | ||
return preceds; | ||
} | ||
|
||
public void setPreceds(List<String> preceds) { | ||
this.preceds = preceds; | ||
} | ||
|
||
public void setLocale(String locale) { this.locale = locale;} | ||
|
||
public String getLocale() { return locale;} | ||
@Getter | ||
public static class MetadataKeyRelated extends MetadataKey { | ||
public enum Relation { | ||
exactMatch, | ||
narrowMatch, | ||
relatedMatch, | ||
closeMatch, | ||
broadMatch, | ||
} | ||
|
||
private final Relation relation; | ||
|
||
public MetadataKeyRelated(Relation relation) { | ||
this.relation = relation; | ||
} | ||
|
||
} | ||
private String key; | ||
private String caption; | ||
private String icon; | ||
private String description; | ||
private String parent; | ||
private String locale; | ||
/** | ||
* List of other keys this child is a precedor of | ||
*/ | ||
private List<String> preceds; | ||
private final List<MetadataKeyRelated> related = new ArrayList<>(); | ||
private List<String> alternativeKeys; | ||
private String url; | ||
|
||
public void setParent(String parent) { | ||
if (StringUtils.isBlank(parent)) { | ||
this.parent = null; | ||
} else { | ||
this.parent = parent; | ||
} | ||
} | ||
|
||
public void addRelated(MetadataKeyRelated related) { | ||
this.related.add(related); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.