Working on Task #7616
Increased pom version at 3.0.0 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/gcubedatacatalogue-metadata-discovery@146248 82a268e6-3cf1-43bd-a215-b396298e98cffeature/17423
parent
0072222f36
commit
608181fb64
@ -0,0 +1,36 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
package org.gcube.datacatalogue.metadatadiscovery.adapter;
|
||||
|
||||
import javax.xml.bind.annotation.adapters.XmlAdapter;
|
||||
|
||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.TaggingGroupingValue;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* The Class TaggingGroupingAdapter.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 21, 2017
|
||||
*/
|
||||
public class TaggingGroupingAdapter extends XmlAdapter<String, TaggingGroupingValue> {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#marshal(java.lang.Object)
|
||||
*/
|
||||
public String marshal(TaggingGroupingValue dt) {
|
||||
|
||||
return dt.name();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see javax.xml.bind.annotation.adapters.XmlAdapter#unmarshal(java.lang.Object)
|
||||
*/
|
||||
public TaggingGroupingValue unmarshal(String dt) {
|
||||
|
||||
return TaggingGroupingValue.fromValue(dt);
|
||||
}
|
||||
}
|
@ -0,0 +1,116 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.datacatalogue.metadatadiscovery.bean.jaxb;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 21, 2017
|
||||
*/
|
||||
@XmlRootElement(name = "metadatacategory")
|
||||
@XmlAccessorType (XmlAccessType.FIELD)
|
||||
public class MetadataCategory implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -7282676787740920115L;
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
private String id = null;
|
||||
|
||||
@XmlElement(required = true)
|
||||
private String title = "";
|
||||
|
||||
private String description = null;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public MetadataCategory() {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public String getId() {
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the title
|
||||
*/
|
||||
public String getTitle() {
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the description
|
||||
*/
|
||||
public String getDescription() {
|
||||
|
||||
return description;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param id the id to set
|
||||
*/
|
||||
public void setId(String id) {
|
||||
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param title the title to set
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param description the description to set
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("MetadataCategory [id=");
|
||||
builder.append(id);
|
||||
builder.append(", title=");
|
||||
builder.append(title);
|
||||
builder.append(", description=");
|
||||
builder.append(description);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.datacatalogue.metadatadiscovery.bean.jaxb;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.gcube.datacatalogue.metadatadiscovery.adapter.TaggingGroupingAdapter;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 21, 2017
|
||||
*/
|
||||
@XmlRootElement(name = "grouping")
|
||||
@XmlAccessorType (XmlAccessType.FIELD)
|
||||
public class MetadataGrouping implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4684835556193102991L;
|
||||
|
||||
@XmlAttribute
|
||||
private Boolean create = false;
|
||||
|
||||
@XmlJavaTypeAdapter(TaggingGroupingAdapter.class)
|
||||
private TaggingGroupingValue groupingValue = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public MetadataGrouping() {
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.datacatalogue.metadatadiscovery.bean.jaxb;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.gcube.datacatalogue.metadatadiscovery.adapter.TaggingGroupingAdapter;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 21, 2017
|
||||
*/
|
||||
@XmlRootElement(name = "tagging")
|
||||
@XmlAccessorType (XmlAccessType.FIELD)
|
||||
public class MetadataTagging implements Serializable{
|
||||
|
||||
@XmlAttribute
|
||||
private Boolean create = false;
|
||||
|
||||
@XmlAttribute
|
||||
private String separator = ":";
|
||||
|
||||
@XmlJavaTypeAdapter(TaggingGroupingAdapter.class)
|
||||
private TaggingGroupingValue taggingValue = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3853551415977545419L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public MetadataTagging() {
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.gcube.datacatalogue.metadatadiscovery.bean.jaxb;
|
||||
|
||||
|
||||
/**
|
||||
* The Enum TaggingGroupingValue.
|
||||
*
|
||||
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
||||
* Mar 21, 2017
|
||||
*/
|
||||
public enum TaggingGroupingValue {
|
||||
|
||||
onFieldName,
|
||||
onValue;
|
||||
|
||||
/**
|
||||
* Value.
|
||||
*
|
||||
* @return the string
|
||||
*/
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* From value.
|
||||
*
|
||||
* @param v the v
|
||||
* @return the tagging grouping value
|
||||
*/
|
||||
public static TaggingGroupingValue fromValue(String v) {
|
||||
TaggingGroupingValue vv;
|
||||
try{
|
||||
vv = valueOf(v);
|
||||
}catch(Exception e){
|
||||
return TaggingGroupingValue.onValue;
|
||||
}
|
||||
|
||||
return vv;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue