Skip to content

Commit

Permalink
related: make url multilingual in related service
Browse files Browse the repository at this point in the history
  • Loading branch information
fgravin authored and fxprunayre committed Jun 1, 2017
1 parent dfc20d6 commit 6f99531
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
Expand Up @@ -69,10 +69,17 @@ public RelatedSiblingMetadataItem createRelatedSiblingMetadataItem() {
}

/**
* Create an instance of {@link org.fao.geonet.api.records.model.related.RelatedItem.Title }
* Create an instance of {@link RelatedItem.MultilingualValue }
*/
public org.fao.geonet.api.records.model.related.RelatedItem.Title createRelatedItemTitle() {
return new org.fao.geonet.api.records.model.related.RelatedItem.Title();
public RelatedItem.MultilingualValue createRelatedItemTitle() {
return new RelatedItem.MultilingualValue();
}

/**
* Create an instance of {@link RelatedItem.MultilingualValue }
*/
public RelatedItem.MultilingualValue createRelatedItemUrl() {
return new RelatedItem.MultilingualValue();
}

/**
Expand Down
Expand Up @@ -57,11 +57,11 @@
public abstract class RelatedItem {

protected String id;
protected String url;
protected MultilingualValue url;
protected String type;

@XmlElement(required = true)
protected RelatedItem.Title title;
protected MultilingualValue title;

/**
* Gets the value of the id property.
Expand All @@ -84,18 +84,18 @@ public void setId(String value) {
/**
* Gets the value of the url property.
*
* @return possible object is {@link String }
* @return possible object is {@link MultilingualValue }
*/
public String getUrl() {
public MultilingualValue getUrl() {
return url;
}

/**
* Sets the value of the url property.
*
* @param value allowed object is {@link String }
* @param value allowed object is {@link MultilingualValue }
*/
public void setUrl(String value) {
public void setUrl(MultilingualValue value) {
this.url = value;
}

Expand All @@ -120,18 +120,18 @@ public void setType(String value) {
/**
* Gets the value of the title property.
*
* @return possible object is {@link RelatedItem.Title }
* @return possible object is {@link MultilingualValue }
*/
public RelatedItem.Title getTitle() {
public MultilingualValue getTitle() {
return title;
}

/**
* Sets the value of the title property.
*
* @param value allowed object is {@link RelatedItem.Title }
* @param value allowed object is {@link MultilingualValue }
*/
public void setTitle(RelatedItem.Title value) {
public void setTitle(MultilingualValue value) {
this.title = value;
}

Expand Down Expand Up @@ -159,7 +159,7 @@ public void setTitle(RelatedItem.Title value) {
"value"
})
@JsonSerialize(using = LocalizedStringSerializer.class)
public static class Title implements ILocalizedStringProperty {
public static class MultilingualValue implements ILocalizedStringProperty {
protected List<LocalizedString> value;

/**
Expand Down
Expand Up @@ -147,7 +147,14 @@
<xs:complexType name="relatedItem" abstract="true">
<xs:sequence>
<xs:element name="id" type="xs:string" minOccurs="0"/>
<xs:element name="url" type="xs:string" minOccurs="0"/>
<xs:element name="url">
<xs:complexType>
<xs:sequence>
<!--<xs:any processContents="skip" maxOccurs="unbounded" minOccurs="0" />-->
<xs:element name="value" type="localizedString" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="title">
<xs:complexType>
<xs:sequence>
Expand Down

0 comments on commit 6f99531

Please sign in to comment.