Updated pom version at 3.3.0
Added cardinality as maxOccurs Task: #10383 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/data-catalogue/gcubedatacatalogue-metadata-discovery@158726 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
76ea47cd2c
commit
b65004e6b8
2
pom.xml
2
pom.xml
|
@ -13,7 +13,7 @@
|
||||||
<groupId>org.gcube.data-catalogue</groupId>
|
<groupId>org.gcube.data-catalogue</groupId>
|
||||||
<artifactId>gcubedatacatalogue-metadata-discovery</artifactId>
|
<artifactId>gcubedatacatalogue-metadata-discovery</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>3.2.0-SNAPSHOT</version>
|
<version>3.3.0-SNAPSHOT</version>
|
||||||
<name>The gCube data catalogue metadata discovery library</name>
|
<name>The gCube data catalogue metadata discovery library</name>
|
||||||
<description>The gCube data catalogue metadata discovery library</description>
|
<description>The gCube data catalogue metadata discovery library</description>
|
||||||
<scm>
|
<scm>
|
||||||
|
|
|
@ -43,6 +43,9 @@ public class MetadataField implements Serializable{
|
||||||
private String fieldName;
|
private String fieldName;
|
||||||
@XmlElement(required = true)
|
@XmlElement(required = true)
|
||||||
private Boolean mandatory = false;
|
private Boolean mandatory = false;
|
||||||
|
|
||||||
|
@XmlElement(name = "maxOccurs")
|
||||||
|
private String maxOccurs;
|
||||||
// private Boolean isBoolean = false;
|
// private Boolean isBoolean = false;
|
||||||
@XmlJavaTypeAdapter(DataTypeAdapter.class)
|
@XmlJavaTypeAdapter(DataTypeAdapter.class)
|
||||||
private DataType dataType = DataType.String;
|
private DataType dataType = DataType.String;
|
||||||
|
@ -166,6 +169,25 @@ public class MetadataField implements Serializable{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the max occurs.
|
||||||
|
*
|
||||||
|
* @return the maxOccurs
|
||||||
|
*/
|
||||||
|
public String getMaxOccurs() {
|
||||||
|
|
||||||
|
return maxOccurs;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param maxOccurs the maxOccurs to set
|
||||||
|
*/
|
||||||
|
public void setMaxOccurs(String maxOccurs) {
|
||||||
|
|
||||||
|
this.maxOccurs = maxOccurs;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the default value.
|
* Gets the default value.
|
||||||
*
|
*
|
||||||
|
@ -343,6 +365,8 @@ public class MetadataField implements Serializable{
|
||||||
builder.append(fieldName);
|
builder.append(fieldName);
|
||||||
builder.append(", mandatory=");
|
builder.append(", mandatory=");
|
||||||
builder.append(mandatory);
|
builder.append(mandatory);
|
||||||
|
builder.append(", maxOccurs=");
|
||||||
|
builder.append(maxOccurs);
|
||||||
builder.append(", dataType=");
|
builder.append(", dataType=");
|
||||||
builder.append(dataType);
|
builder.append(dataType);
|
||||||
builder.append(", defaultValue=");
|
builder.append(", defaultValue=");
|
||||||
|
@ -361,4 +385,5 @@ public class MetadataField implements Serializable{
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@ import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategories;
|
||||||
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategory;
|
import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategory;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Class TestJaxbMetadataMarshUnmarsh.
|
* The Class TestJaxbMetadataMarshUnmarsh.
|
||||||
*
|
*
|
||||||
|
@ -131,7 +130,7 @@ public class TestJaxbMetadataMarshUnmarsh {
|
||||||
*/
|
*/
|
||||||
private static void unMarshalingMetadataFields() throws JAXBException
|
private static void unMarshalingMetadataFields() throws JAXBException
|
||||||
{
|
{
|
||||||
unMarshalingCategories();
|
//unMarshalingCategories();
|
||||||
JAXBContext jaxbContext = JAXBContext.newInstance(MetadataFormat.class);
|
JAXBContext jaxbContext = JAXBContext.newInstance(MetadataFormat.class);
|
||||||
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
|
||||||
|
|
||||||
|
@ -155,6 +154,7 @@ public class TestJaxbMetadataMarshUnmarsh {
|
||||||
System.out.println("Category Ref: "+field.getCategoryRef());
|
System.out.println("Category Ref: "+field.getCategoryRef());
|
||||||
System.out.println("Category CategoryField Q Name: "+field.getCategoryFieldQName());
|
System.out.println("Category CategoryField Q Name: "+field.getCategoryFieldQName());
|
||||||
System.out.println("QName: "+field.getCategoryFieldQName());
|
System.out.println("QName: "+field.getCategoryFieldQName());
|
||||||
|
System.out.println("MaxOccurs: "+field.getMaxOccurs());
|
||||||
|
|
||||||
// System.out.println(field.getGrouping());
|
// System.out.println(field.getGrouping());
|
||||||
// System.out.println(field.getTagging());
|
// System.out.println(field.getTagging());
|
||||||
|
@ -199,5 +199,12 @@ public class TestJaxbMetadataMarshUnmarsh {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
||||||
//System.out.println(DataType.valueOf("aa"));
|
//System.out.println(DataType.valueOf("aa"));
|
||||||
|
try {
|
||||||
|
unMarshalingMetadataFields();
|
||||||
|
}
|
||||||
|
catch (JAXBException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class TestMetadataFormatDiscovery {
|
||||||
//System.out.println(reader.getMetadataProfiles());
|
//System.out.println(reader.getMetadataProfiles());
|
||||||
|
|
||||||
for (MetadataProfile metaProfile : reader.getMetadataProfiles()) {
|
for (MetadataProfile metaProfile : reader.getMetadataProfiles()) {
|
||||||
System.out.println(metaProfile.getId() +" name: "+metaProfile.getName() +" type: "+metaProfile.getMetadataType());
|
System.out.println(metaProfile.getId() +", name: "+metaProfile.getName() +", type: "+metaProfile.getMetadataType());
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue