Template oriented logic for XML generation

git-svn-id: http://svn.research-infrastructures.eu/d4science/gcube/trunk/spatial-data/geonetwork@182082 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Fabio Sinibaldi 2019-10-22 16:58:47 +00:00
parent ace34bee2d
commit ed1843e1f2
24 changed files with 572 additions and 568 deletions

View File

@ -4,6 +4,7 @@ import static org.gcube.common.authorization.client.Constants.authorizationServi
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@ -16,20 +17,25 @@ import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
import org.gcube.portlets.user.uriresolvermanager.exception.IllegalArgumentException;
import org.gcube.portlets.user.uriresolvermanager.exception.UriResolverMapException;
import org.gcube.spatial.data.geonetwork.iso.tpl.ISOMetadataByTemplate;
import org.gcube.spatial.data.geonetwork.iso.tpl.Keyword;
import org.gcube.spatial.data.geonetwork.iso.tpl.MetadataDescriptor;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.KeywordType;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.ResponsiblePartyRole;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.RestrictionCode;
import org.gcube.spatial.data.geonetwork.iso.tpl.constraints.LegalConstraints;
import org.gcube.spatial.data.geonetwork.iso.tpl.constraints.ResourceConstraints;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.DistributionInfo;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.OnlineResource;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.DistributionInfo.DistributionInfoType;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.OnlineResource;
import org.gcube.spatial.data.geonetwork.iso.tpl.extent.BoundingBox;
import org.gcube.spatial.data.geonetwork.iso.tpl.keys.KeywordSet;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.Contact;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.ResponsibleParty;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.ResponsibleParty.Contact;
import org.gcube.spatial.data.geonetwork.iso.tpl.spatial.VectorRepresentation;
import org.gcube.spatial.data.geonetwork.utils.StringValidator;
import org.geotoolkit.metadata.iso.extent.DefaultExtent;
import org.geotoolkit.xml.XML;
import org.opengis.metadata.Metadata;
import org.opengis.metadata.citation.PresentationForm;
import org.opengis.metadata.identification.KeywordType;
import org.opengis.metadata.identification.TopicCategory;
import org.opengis.metadata.spatial.GeometricObjectType;
import org.opengis.metadata.spatial.TopologyLevel;
@ -42,6 +48,7 @@ import lombok.Setter;
@Getter
@Setter
@RequiredArgsConstructor
@Deprecated
public class GcubeISOMetadata {
private EnvironmentConfiguration config;
@ -87,12 +94,19 @@ public class GcubeISOMetadata {
private double resolution=0.5d;
@NonNull
private String inspireTheme;
private ArrayList<String> graphicOverviewsURI=new ArrayList<String>();
private DistributionInfo distributionInfo;
private ResourceConstraints contraints=new ResourceConstraints("I'll tell you when",
new LegalConstraints(RestrictionCode.LICENSE,"CC-BY-SA"),
new LegalConstraints(RestrictionCode.LICENSE,"CC-BY-SA"));
@Deprecated
public GcubeISOMetadata() throws Exception {
config=EnvironmentConfiguration.getConfiguration();
credits.add(config.getProjectCitation());
@ -119,32 +133,53 @@ public class GcubeISOMetadata {
}
// public File getMetadataFile() throws Exception{
// checkConstraints();
// // TODO
// MetadataDescriptor desc=new MetadataDescriptor();
// ArrayList<ResponsibleParty> respParties=new ArrayList<>();
// AuthorizationEntry authEntry = authorizationService().get(SecurityTokenProvider.instance.get());
//
// respParties.add(new ResponsibleParty(this.getUser(), "gCube Context "+authEntry.getContext(),ResponsibleParty.Roles.AUTHOR));
// respParties.add(new ResponsibleParty(config.getProjectName(), config.getProjectName(), ResponsibleParty.Roles.ORIGINATOR));
// respParties.add(new ResponsibleParty(config.getDistributorIndividualName(), config.getDistributorOrganisationName(), ResponsibleParty.Roles.DISTRIBUTOR,new Contact(config.getDistributorEMail(),config.getDistributorSite())));
// respParties.add(new ResponsibleParty(config.getProviderIndividualName(), config.getProviderOrganisationName(), ResponsibleParty.Roles.RESOURCE_PROVIDER,new Contact(config.getProviderEMail(),config.getProviderSite())));
//
// desc.setResponsibleParties(respParties);
//
// desc.setTitle(this.getTitle());
// desc.setCreationTime(this.getCreationDate());
// desc.setAbstractField(this.getAbstractField());
//
//
// //TODO Multiple Credits
// desc.setCredit(this.getCredits().get(0));
//
//
// desc.setGeometricObjectCount(new Long(this.getGeometryCount()));
//
//
public File getMetadataFile() throws Exception{
checkConstraints();
MetadataDescriptor desc=new MetadataDescriptor();
ArrayList<ResponsibleParty> respParties=new ArrayList<>();
AuthorizationEntry authEntry = authorizationService().get(SecurityTokenProvider.instance.get());
respParties.add(new ResponsibleParty(this.getUser(), "gCube Context "+authEntry.getContext(),ResponsiblePartyRole.AUTHOR));
respParties.add(new ResponsibleParty(this.getUser(), "gCube Context "+authEntry.getContext(),ResponsiblePartyRole.POINT_OF_CONTACT));
respParties.add(new ResponsibleParty(config.getProjectName(), config.getProjectName(), ResponsiblePartyRole.ORIGINATOR));
respParties.add(new ResponsibleParty(config.getDistributorIndividualName(), config.getDistributorOrganisationName(), ResponsiblePartyRole.DISTRIBUTOR,new Contact(config.getDistributorEMail(),config.getDistributorSite())));
respParties.add(new ResponsibleParty(config.getProviderIndividualName(), config.getProviderOrganisationName(), ResponsiblePartyRole.RESOURCE_PROVIDER,new Contact(config.getProviderEMail(),config.getProviderSite())));
desc.setResponsibleParties(respParties);
desc.setTitle(this.getTitle());
desc.setCreationTime(this.getCreationDate());
desc.setAbstractField(this.getAbstractField());
for(String credit:getCredits()) {
desc.addCredits(credit);
}
VectorRepresentation representation=new VectorRepresentation(
org.gcube.spatial.data.geonetwork.iso.tpl.codelists.TopologyLevel.getById(this.getTopologyLevel().identifier()),
this.getGeometryCount(),
org.gcube.spatial.data.geonetwork.iso.tpl.codelists.GeometricObjectType.getById(this.getGeometricObjectType().identifier()));
desc.setSpatialRepresentation(representation);
KeywordSet keySet=new KeywordSet();
for(Entry<Thesaurus,HashSet<String> > entry : this.getDescriptiveKeywords().entrySet()) {
for(String s:entry.getValue()) {
keySet.addKeyword(s);
}
}
desc.addKeywordSet(keySet);
desc.addKeywordSet(new KeywordSet(
KeywordType.THEME,
Collections.singleton(getInspireTheme()),
org.gcube.spatial.data.geonetwork.iso.tpl.keys.Thesaurus.INSPIRE_THEMES));
// ArrayList<Keyword> keys=new ArrayList<>();
//// for(Entry<Thesaurus,HashSet<String> > entry : this.getDescriptiveKeywords().entrySet()) {
//// Thesaurus t=entry.getKey();
@ -152,29 +187,28 @@ public class GcubeISOMetadata {
////
//// }
// desc.setKeywords(keys);
//
//
// desc.setPublicationTime(desc.getCreationTime());
//
// desc.setPurpose(this.getPurpose());
//
// desc.setUUIDIdentifier(UUIDIdentifier!=null?UUIDIdentifier:UUID.randomUUID().toString());
// desc.setBoundingBox(BoundingBox.WORLD_EXTENT);
//
// desc.setSpatialResolution(this.getResolution());
//
//
// // TODO Multiple Categories
// desc.setTopicCategory(this.getTopicCategories().get(0).identifier());
//
//
// desc.setDistributionInfo(distributionInfo);
//
// desc.setLineageStatement(this.getLineageStatement());
//
//
// return ISOMetadataByTemplate.createXML(desc);
// }
desc.setPublicationTime(desc.getCreationTime());
desc.setPurpose(this.getPurpose());
desc.setUUIDIdentifier(UUIDIdentifier!=null?UUIDIdentifier:UUID.randomUUID().toString());
desc.getExtent().addGeographicExtent((BoundingBox.WORLD_EXTENT));
desc.setSpatialResolution(this.getResolution());
for(TopicCategory cat:getTopicCategories())
desc.addTopicCategory(org.gcube.spatial.data.geonetwork.iso.tpl.codelists.TopicCategory.getById(cat.identifier()));
desc.setDistributionInfo(distributionInfo);
desc.setLineageStatement(this.getLineageStatement());
desc.setConstraints(this.getContraints());
return ISOMetadataByTemplate.createXML(desc);
}
public void setGeoServerDistributionInfo(String geoServerUrl,String layerName, String workspace, String style, String CRS) throws UriResolverMapException, IllegalArgumentException{

View File

@ -0,0 +1,205 @@
package org.gcube.spatial.data.geonetwork.iso;
import java.util.Date;
import org.opengis.metadata.identification.KeywordType;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@Deprecated
@XStreamAlias("Thesaurus")
public class Thesaurus {
private KeywordType type;
private String title;
private Date citationDate;
private String citationDescription;
private String citationUri;
private String citationOrganization;
private boolean isAuthored=false;
public Thesaurus(KeywordType type, String title, Date citationDate) {
super();
this.type = type;
this.title = title;
this.citationDate = citationDate;
}
public Thesaurus(KeywordType type, String title, Date citationDate,
String citationDescription, String citationUri,
String citationOrganization) {
super();
this.type = type;
this.title = title;
this.citationDate = citationDate;
this.citationDescription = citationDescription;
this.citationUri = citationUri;
this.citationOrganization = citationOrganization;
this.isAuthored=true;
}
/**
* @return the type
*/
public KeywordType getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(KeywordType type) {
this.type = type;
}
/**
* @return the title
*/
public String getTitle() {
return title;
}
/**
* @param title the title to set
*/
public void setTitle(String title) {
this.title = title;
}
/**
* @return the citationDate
*/
public Date getCitationDate() {
return citationDate;
}
/**
* @param citationDate the citationDate to set
*/
public void setCitationDate(Date citationDate) {
this.citationDate = citationDate;
}
/**
* @return the citationDescription
*/
public String getCitationDescription() {
return citationDescription;
}
/**
* @param citationDescription the citationDescription to set
*/
public void setCitationDescription(String citationDescription) {
this.citationDescription = citationDescription;
}
/**
* @return the citationUri
*/
public String getCitationUri() {
return citationUri;
}
/**
* @param citationUri the citationUri to set
*/
public void setCitationUri(String citationUri) {
this.citationUri = citationUri;
}
/**
* @return the citationOrganization
*/
public String getCitationOrganization() {
return citationOrganization;
}
/**
* @param citationOrganization the citationOrganization to set
*/
public void setCitationOrganization(String citationOrganization) {
this.citationOrganization = citationOrganization;
}
/**
* @return the isAuthored
*/
public boolean isAuthored() {
return isAuthored;
}
/**
* @param isAuthored the isAuthored to set
*/
public void setAuthored(boolean isAuthored) {
this.isAuthored = isAuthored;
}
/* (non-Javadoc)
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((title == null) ? 0 : title.hashCode());
result = prime * result + ((type == null) ? 0 : type.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Thesaurus other = (Thesaurus) obj;
if (title == null) {
if (other.title != null)
return false;
} else if (!title.equals(other.title))
return false;
if (type == null) {
if (other.type != null)
return false;
} else if (!type.equals(other.type))
return false;
return true;
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder builder = new StringBuilder();
builder.append("Thesaurus [type=");
builder.append(type);
builder.append(", title=");
builder.append(title);
builder.append(", citationDate=");
builder.append(citationDate);
builder.append(", citationDescription=");
builder.append(citationDescription);
builder.append(", citationUri=");
builder.append(citationUri);
builder.append(", citationOrganization=");
builder.append(citationOrganization);
builder.append(", isAuthored=");
builder.append(isAuthored);
builder.append("]");
return builder.toString();
}
}

View File

@ -15,9 +15,10 @@ import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.ScopeCode;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.TopicCategory;
import org.gcube.spatial.data.geonetwork.iso.tpl.constraints.ResourceConstraints;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.DistributionInfo;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.OnlineResource;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.DistributionInfo.DistributionInfoType;
import org.gcube.spatial.data.geonetwork.iso.tpl.distribution.OnlineResource;
import org.gcube.spatial.data.geonetwork.iso.tpl.extent.BoundingBox;
import org.gcube.spatial.data.geonetwork.iso.tpl.extent.Extent;
import org.gcube.spatial.data.geonetwork.iso.tpl.keys.KeywordSet;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.ResponsibleParty;
import org.gcube.spatial.data.geonetwork.iso.tpl.spatial.SpatialRepresentation;
@ -80,7 +81,7 @@ public class MetadataDescriptor {
private DistributionInfo distributionInfo;
@NonNull
private BoundingBox boundingBox;
private Extent extent=new Extent();
@NonNull
private Double spatialResolution;
@ -92,13 +93,11 @@ public class MetadataDescriptor {
private String lineageStatement;
public void setGeoServerDistributionInfo(String geoServerUrl,String layerName, String workspace, String style, String CRS) throws UriResolverMapException, IllegalArgumentException{
public void setGeoServerDistributionInfo(String geoServerUrl,String layerName, String workspace, String style, String CRS, BoundingBox toDeclareBB) throws UriResolverMapException, IllegalArgumentException{
List<OnlineResource> resources=new ArrayList<OnlineResource>();
String bbox=this.getBoundingBox().toString();
String wmsUrl=ISOMetadataFactory.getWmsUrl(geoServerUrl, layerName, workspace, style, bbox, CRS);
String wcsUrl=ISOMetadataFactory.getWcsUrl(geoServerUrl, layerName, workspace, bbox);
String wmsUrl=ISOMetadataFactory.getWmsUrl(geoServerUrl, layerName, workspace, style, toDeclareBB.toString(), CRS);
String wcsUrl=ISOMetadataFactory.getWcsUrl(geoServerUrl, layerName, workspace, toDeclareBB.toString());
String wfsUrl=ISOMetadataFactory.getWfsUrl(geoServerUrl, layerName, workspace);
String gisViewerUrl=ISOMetadataFactory.getGisLinkByUUID(UUIDIdentifier);
@ -108,4 +107,27 @@ public class MetadataDescriptor {
resources.add(new OnlineResource(gisViewerUrl, "GISViewer Link"));
distributionInfo=new DistributionInfo(DistributionInfoType.GeoServer, resources);
}
public void addCredits(String toAdd) {
getCredits().add(toAdd);
}
public void addResponsibleParty(ResponsibleParty toAdd) {
getResponsibleParties().add(toAdd);
}
public void addKeywordSet(KeywordSet toAdd) {
getKeywordSets().add(toAdd);
}
public void addTopicCategory(TopicCategory toAdd) {
getTopicCategories().add(toAdd);
}
}

View File

@ -18,4 +18,10 @@ public enum GeometricObjectType {
private String id;
private String label;
public static GeometricObjectType getById(String id) {
for(GeometricObjectType t:GeometricObjectType.values())
if(t.id.equals(id)) return t;
throw new IllegalArgumentException("No GeometricObjectType with id "+id);
}
}

View File

@ -16,5 +16,9 @@ public enum KeywordType {
private final String id;
public static KeywordType getById(String id) {
for(KeywordType t:KeywordType.values())
if(t.id.equals(id)) return t;
throw new IllegalArgumentException("No KeywordType with id "+id);
}
}

View File

@ -0,0 +1,34 @@
package org.gcube.spatial.data.geonetwork.iso.tpl.codelists;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ResponsiblePartyRole {
RESOURCE_PROVIDER("resourceProvider","Party that supplies the resource"),
CUSTODIAN("custodian","Party that accepts accountability and responsability for the data and ensures appropriate care and maintenance of the resource"),
OWNER("owner","Party that owns the resource"),
USER("user","Party who uses the resource"),
DISTRIBUTOR("distributor","Party who distributes the resource"),
ORIGINATOR("originator","Party who created the resource"),
POINT_OF_CONTACT("pointOfContact","Party who can be contacted for acquiring knowledge about or acquisition of the resource"),
PRINCIPAL_INVESTIGATOR("principalInvestigator","Key party responsible for gathering information and conducting research"),
PROCESSOR("processor","Party wha has processed the data in a manner such that the resource has been modified"),
PUBLISHER("publisher","Party who published the resource"),
AUTHOR("author","Party who authored the resource");
private String id;
private String description;
public static ResponsiblePartyRole getById(String id) {
for(ResponsiblePartyRole t:ResponsiblePartyRole.values())
if(t.id.equals(id)) return t;
throw new IllegalArgumentException("No ResponsiblePartyRole with id "+id);
}
}

View File

@ -30,5 +30,9 @@ public enum TopicCategory {
private String id;
private String label;
public static TopicCategory getById(String id) {
for(TopicCategory t:TopicCategory.values())
if(t.id.equals(id)) return t;
throw new IllegalArgumentException("No TopicCategory with id "+id);
}
}

View File

@ -20,4 +20,10 @@ public enum TopologyLevel {
private String id;
private String label;
public static TopologyLevel getById(String id) {
for(TopologyLevel t:TopologyLevel.values())
if(t.id.equals(id)) return t;
throw new IllegalArgumentException("No TopologyLevel with id "+id);
}
}

View File

@ -16,9 +16,20 @@ public class Extent {
private String description;
@NonNull
private HashSet<GeographicExtent> geographicExtent=new HashSet<>();
private HashSet<GeographicExtent> geographicExtents=new HashSet<>();
@NonNull
private HashSet<TemporalExtent> temporalExtent=new HashSet<>();
private HashSet<TemporalExtent> temporalExtents=new HashSet<>();
@NonNull
private HashSet<VerticalExtent> verticalExtent=new HashSet<>();
private HashSet<VerticalExtent> verticalExtents=new HashSet<>();
public void addGeographicExtent(GeographicExtent toAdd) {
getGeographicExtents().add(toAdd);
}
public void addTemporalExtent(TemporalExtent toAdd) {
getTemporalExtents().add(toAdd);
}
public void addVerticalExtent(VerticalExtent toAdd) {
getVerticalExtents().add(toAdd);
}
}

View File

@ -8,7 +8,6 @@ import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.KeywordType;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;
@Getter
@ -17,8 +16,9 @@ import lombok.RequiredArgsConstructor;
public class KeywordSet {
@NonNull
private KeywordType type;
private Set<String> values=new HashSet<>();
private Thesaurus thesaurus;
@ -37,4 +37,7 @@ public class KeywordSet {
this.thesaurus = thesaurus;
}
public void addKeyword(String toAdd) {
this.values.add(toAdd);
}
}

View File

@ -72,6 +72,7 @@ public class Thesaurus {
}
public boolean validate(String value) {
if(codelist.isEmpty()) return true;
return codelist.contains(value);
}
public Date getCreationDate() {

View File

@ -0,0 +1,14 @@
package org.gcube.spatial.data.geonetwork.iso.tpl.parties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
@Data
@AllArgsConstructor
public class Contact{
@NonNull
private String email;
@NonNull
private String site;
}

View File

@ -1,44 +1,30 @@
package org.gcube.spatial.data.geonetwork.iso.tpl.parties;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.ResponsiblePartyRole;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NonNull;
@Data
@AllArgsConstructor
public class ResponsibleParty {
public static class Roles{
public static final String RESOURCE_PROVIDER="resourceProvider";
public static final String CUSTODIAN="custodian";
public static final String OWNER="owner";
public static final String USER="user";
public static final String DISTRIBUTOR="distributor";
public static final String ORIGINATOR="originator";
public static final String POINT_OF_CONTACT="pointOfContact";
public static final String PRINCIPAL_INVESTIGATOR="principalInvestigator";
public static final String PROCESSOR="processor";
public static final String PUBLISHER="publisher";
public static final String AUTHOR="author";
}
@Data
@AllArgsConstructor
public static class Contact{
private String email;
private String site;
}
@NonNull
private String individualName;
@NonNull
private String organization;
private String role;
@NonNull
private ResponsiblePartyRole role;
private Contact contact;
public ResponsibleParty(String individualName, String organization, String role) {
public ResponsibleParty(String individualName, String organization, ResponsiblePartyRole role) {
super();
this.individualName = individualName;
this.organization = organization;
this.role = role;
this.contact=null;
this.role = role;
}

View File

@ -4,7 +4,7 @@ import java.util.Date;
import org.gcube.spatial.data.geonetwork.iso.EnvironmentConfiguration;
import org.gcube.spatial.data.geonetwork.iso.GcubeISOMetadata;
import org.gcube.spatial.data.geonetwork.iso.Thesaurus;
import org.gcube.spatial.data.geonetwork.iso.tpl.keys.Thesaurus;
import org.gcube.spatial.data.geonetwork.utils.ScopeUtils;
import org.geotoolkit.metadata.iso.extent.DefaultExtent;
import org.opengis.metadata.citation.PresentationForm;

View File

@ -10,16 +10,19 @@ import org.gcube.spatial.data.geonetwork.GeoNetworkPublisher;
import org.gcube.spatial.data.geonetwork.LoginLevel;
import org.gcube.spatial.data.geonetwork.iso.tpl.ISOMetadataByTemplate;
import org.gcube.spatial.data.geonetwork.iso.tpl.MetadataDescriptor;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.GeometricObjectType;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.KeywordType;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.ResponsiblePartyRole;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.RestrictionCode;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.TopicCategory;
import org.gcube.spatial.data.geonetwork.iso.tpl.codelists.TopologyLevel;
import org.gcube.spatial.data.geonetwork.iso.tpl.constraints.LegalConstraints;
import org.gcube.spatial.data.geonetwork.iso.tpl.constraints.ResourceConstraints;
import org.gcube.spatial.data.geonetwork.iso.tpl.extent.BoundingBox;
import org.gcube.spatial.data.geonetwork.iso.tpl.keys.KeywordSet;
import org.gcube.spatial.data.geonetwork.iso.tpl.keys.Thesaurus;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.Contact;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.ResponsibleParty;
import org.gcube.spatial.data.geonetwork.iso.tpl.parties.ResponsibleParty.Contact;
import org.gcube.spatial.data.geonetwork.iso.tpl.spatial.VectorRepresentation;
import it.geosolutions.geonetwork.util.GNInsertConfiguration;
@ -58,39 +61,9 @@ public class TrueMarbleMeta {
// VASSILIS
// GcubeISOMetadata gMeta=new GcubeISOMetadata();
// gMeta.setAbstractField("Layer from geopolis");
// gMeta.setCreationDate(new Date());
// gMeta.setExtent((DefaultExtent) DefaultExtent.WORLD);
// gMeta.setGeometricObjectType(GeometricObjectType.SURFACE);
// gMeta.setPresentationForm(PresentationForm.valueOf(PresentationForm.MAP_DIGITAL.name()));
// gMeta.setResolution(1.2);
// gMeta.setPurpose("Test library");
// gMeta.setTitle("Title");
// gMeta.setTopologyLevel(TopologyLevel.GEOMETRY_ONLY);
// gMeta.setUser("Some user");
//
// gMeta.addCredits("Team of geospatialists");
// gMeta.addGraphicOverview("http://localhost:8080/wms/something");
//
// Thesaurus generalThesaurus = gMeta.getConfig().getThesauri().get("General");
// gMeta.addKeyword("key1", generalThesaurus);
// gMeta.addKeyword("key2", generalThesaurus);
// gMeta.addTopicCategory(TopicCategory.ENVIRONMENT);
// gMeta.setGeoServerDistributionInfo("http://geoserver.d4science.org/geoserver", "ws","wmpa", "speciesProb", "EPSG:4326");
//
// gMeta.setLineageStatement("I made with my own hands");
//
// Metadata meta=gMeta.getMetadata();
GeoNetworkPublisher publisher=TestConfiguration.getClient();
publisher.login(LoginLevel.SCOPE);
GNInsertConfiguration config=publisher.getCurrentUserConfiguration("dataset", "_none_");
config.setValidate(true);
//Long id=publisher.insertMetadata(config,new File("/tmp/GEO_1069334659927122420.xml"));
// try{
// Long id=publisher.insertMetadata(config,meta);
@ -121,50 +94,55 @@ public class TrueMarbleMeta {
MetadataDescriptor desc=new MetadataDescriptor();
desc.setResponsibleParties(Arrays.asList(
new ResponsibleParty("The scope ","the infra",ResponsibleParty.Roles.DISTRIBUTOR,new Contact("my.mail@this.place.com","www.mipiacitu.com")),
new ResponsibleParty("Io","me stesso",ResponsibleParty.Roles.POINT_OF_CONTACT,new Contact("point.of.contact.maiol@place.com","www.mipiacitu.com")),
new ResponsibleParty("Io","me stesso",ResponsibleParty.Roles.AUTHOR,new Contact("point.of.contact.maiol@place.com","www.mipiacitu.com"))
new ResponsibleParty("The scope ","the infra",ResponsiblePartyRole.DISTRIBUTOR,new Contact("my.mail@this.place.com","www.mipiacitu.com")),
new ResponsibleParty("Io","me stesso",ResponsiblePartyRole.POINT_OF_CONTACT,new Contact("point.of.contact.maiol@place.com","www.mipiacitu.com")),
new ResponsibleParty("Io","me stesso",ResponsiblePartyRole.AUTHOR,new Contact("point.of.contact.maiol@place.com","www.mipiacitu.com"))
));
desc.setAbstractField("My Abstract Field");
desc.getCredits().add("Fatto io");
desc.setCreationTime(new GregorianCalendar().getTime());
((VectorRepresentation)desc.getSpatialRepresentation()).setGeometricObjectCount(1000);
desc.getKeywordSets().add(new KeywordSet(KeywordType.THEME,Collections.singleton("Species distribution"),Thesaurus.INSPIRE_THEMES));
VectorRepresentation representation=new VectorRepresentation(
TopologyLevel.GEOMETRY_ONLY, 1000, GeometricObjectType.POINT);
desc.setSpatialRepresentation(representation);
desc.addKeywordSet(new KeywordSet(
KeywordType.THEME,
Collections.singleton("Species distribution"),
Thesaurus.INSPIRE_THEMES));
desc.setPublicationTime(desc.getCreationTime());
desc.setPurpose("Just for fun");
desc.setTitle("Il mio bel titolone");
desc.setUUIDIdentifier(UUID.randomUUID().toString());
desc.setBoundingBox(BoundingBox.WORLD_EXTENT);
desc.getExtent().addGeographicExtent(BoundingBox.WORLD_EXTENT);
desc.setGeoServerDistributionInfo("http://geoserver.d4science.org/geoserver", "ws","wmpa", "speciesProb", "EPSG:4326");
desc.setGeoServerDistributionInfo("http://geoserver.d4science.org/geoserver", "ws","wmpa", "speciesProb", "EPSG:4326",BoundingBox.WORLD_EXTENT);
desc.setSpatialResolution(0.5d);
desc.setConstraints(new ResourceConstraints("I'll tell you when",
new LegalConstraints(RestrictionCode.COPYRIGHT),
new LegalConstraints(RestrictionCode.PATENT)));
new LegalConstraints(RestrictionCode.LICENSE,"CC-BY-SA"),
new LegalConstraints(RestrictionCode.LICENSE,"CC-BY-SA")));
desc.getTopicCategories().add(TopicCategory.ENVIRONMENT);
desc.addTopicCategory(TopicCategory.ENVIRONMENT);
desc.setLineageStatement("I made with my own hands");
System.out.println(desc.getBoundingBox());
File metaFile=ISOMetadataByTemplate.createXML(desc);
System.out.println("Going to Publish ----->> "+metaFile.getAbsolutePath());
// GeoNetworkPublisher publisher=TestConfiguration.getClient();
// publisher.login(LoginLevel.SCOPE);
// GNInsertConfiguration config=publisher.getCurrentUserConfiguration("dataset", "_none_");
//
// config.setValidate(true);
GeoNetworkPublisher publisher=TestConfiguration.getClient();
publisher.login(LoginLevel.SCOPE);
GNInsertConfiguration config=publisher.getCurrentUserConfiguration("dataset", "_none_");
config.setValidate(true);
System.out.println("Settings : "+publisher.getConfiguration().getScopeConfiguration());
System.out.println("Publishing Settings : validate = "+config.getValidate());
long id=publisher.insertMetadata(config, metaFile);

View File

@ -0,0 +1,64 @@
package org.gcube.spatial.data.geonetwork.test;
import java.io.File;
import java.util.Date;
import org.gcube.spatial.data.geonetwork.GeoNetworkPublisher;
import org.gcube.spatial.data.geonetwork.LoginLevel;
import org.gcube.spatial.data.geonetwork.iso.GcubeISOMetadata;
import org.gcube.spatial.data.geonetwork.iso.Thesaurus;
import org.geotoolkit.metadata.iso.extent.DefaultExtent;
import org.opengis.metadata.citation.PresentationForm;
import org.opengis.metadata.identification.TopicCategory;
import org.opengis.metadata.spatial.GeometricObjectType;
import org.opengis.metadata.spatial.TopologyLevel;
import it.geosolutions.geonetwork.util.GNInsertConfiguration;
public class VassilisTest {
public static void main(String[] args) throws Exception{
TokenSetter.set("/gcube/devNext");
GcubeISOMetadata gMeta=new GcubeISOMetadata();
gMeta.setAbstractField("Layer from geopolis");
gMeta.setCreationDate(new Date());
gMeta.setExtent((DefaultExtent) DefaultExtent.WORLD);
gMeta.setGeometricObjectType(GeometricObjectType.SURFACE);
gMeta.setPresentationForm(PresentationForm.valueOf(PresentationForm.MAP_DIGITAL.name()));
gMeta.setResolution(1.2);
gMeta.setPurpose("Test library");
gMeta.setTitle("Title");
gMeta.setTopologyLevel(TopologyLevel.GEOMETRY_ONLY);
gMeta.setUser("Some user");
gMeta.addCredits("Team of geospatialists");
gMeta.addGraphicOverview("http://localhost:8080/wms/something");
Thesaurus generalThesaurus = gMeta.getConfig().getThesauri().get("General");
gMeta.addKeyword("key1", generalThesaurus);
gMeta.addKeyword("key2", generalThesaurus);
gMeta.setInspireTheme("Habitats and biotopes");
gMeta.addTopicCategory(TopicCategory.ENVIRONMENT);
gMeta.setGeoServerDistributionInfo("http://geoserver.d4science.org/geoserver", "ws","wmpa", "speciesProb", "EPSG:4326");
gMeta.setLineageStatement("I made with my own hands");
File metaFile=gMeta.getMetadataFile();
System.out.println("Going to Publish ----->> "+metaFile.getAbsolutePath());
GeoNetworkPublisher publisher=TestConfiguration.getClient();
publisher.login(LoginLevel.SCOPE);
GNInsertConfiguration config=publisher.getCurrentUserConfiguration("dataset", "_none_");
config.setValidate(true);
System.out.println("Settings : "+publisher.getConfiguration().getScopeConfiguration());
System.out.println("Publishing Settings : validate = "+config.getValidate());
long id=publisher.insertMetadata(config, metaFile);
System.out.println("PUBLISHED WITH ID : "+id);
}
}

View File

@ -26,8 +26,12 @@
<!-- RESPONSIBLE PARTIES : contact-->
<#list responsibleParties as party>
<gmd:contact>
<@responsibleParty party.individualName party.organization party.contact.email party.contact.site party.role/>
<gmd:contact>
<#if party.contact??>
<@responsibleParty party.individualName party.organization party.contact.email party.contact.site party.role.id/>
<#else>
<@responsibleParty party.individualName party.organization 'support@d4science.org' 'www.d4science.org' party.role.id/>
</#if>
</gmd:contact>
</#list>
@ -115,9 +119,13 @@
<!-- RESPONSIBLE PARTIES -->
<#list responsibleParties as party>
<#if party.role == "pointOfContact">
<#if party.role.id == "pointOfContact">
<gmd:pointOfContact>
<@responsibleParty party.individualName party.organization party.contact.email party.contact.site party.role/>
<#if party.contact??>
<@responsibleParty party.individualName party.organization party.contact.email party.contact.site party.role.id/>
<#else>
<@responsibleParty party.individualName party.organization 'support@d4science.org' 'www.d4science.org' party.role.id/>
</#if>
</gmd:pointOfContact>
</#if>
</#list>
@ -180,31 +188,11 @@
<!-- EXTENT -->
<gmd:extent>
<gmd:EX_Extent>
<gmd:geographicElement>
<gmd:EX_GeographicBoundingBox>
<gmd:extentTypeCode>
<gco:Boolean>true</gco:Boolean>
</gmd:extentTypeCode>
<gmd:westBoundLongitude>
<gco:Decimal>${boundingBox.west}</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>${boundingBox.east}</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>${boundingBox.south}</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>${boundingBox.north}</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
</gmd:geographicElement>
</gmd:EX_Extent>
</gmd:extent>
<#include "Extent.ftlx">
</gmd:MD_DataIdentification>
</gmd:identificationInfo>
@ -311,26 +299,5 @@
<!--
<gmd:metadataConstraints>
<gmd:MD_LegalConstraints>
<gmd:useLimitation>
<gco:CharacterString>CC-BY-SA</gco:CharacterString>
</gmd:useLimitation>
<gmd:accessConstraints>
<gmd:MD_RestrictionCode codeListValue="license"
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode">License</gmd:MD_RestrictionCode>
</gmd:accessConstraints>
<gmd:useConstraints>
<gmd:MD_RestrictionCode codeListValue="license"
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode">License</gmd:MD_RestrictionCode>
</gmd:useConstraints>
<gmd:otherConstraints>
<gco:CharacterString>other restrictions</gco:CharacterString>
</gmd:otherConstraints>
</gmd:MD_LegalConstraints>
</gmd:metadataConstraints>
-->
</gmd:MD_Metadata>
</#compress>

View File

@ -1,24 +0,0 @@
<contact>
<CI_ResponsibleParty>
<individualName>
<gco:CharacterString>Miles Macmillan-Lawler</gco:CharacterString>
</individualName>
<organisationName>
<gco:CharacterString>GRID-Arendal</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact>
<address>
<CI_Address>
<electronicMailAddress>
<gco:CharacterString>Miles.Macmillan-Lawler@grida.no</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode" codeListValue="custodian" codeSpace="ISOTC211/19115">custodian</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</contact>

View File

@ -0,0 +1,41 @@
<gmd:extent>
<gmd:EX_Extent>
<#if extent.geographicExtents??>
<#list extent.geographicExtents as geo>
<gmd:geographicElement>
<#if geo.type="BOUNDING_BOX">
<#assign boundingBox = geo>
<gmd:EX_GeographicBoundingBox>
<gmd:extentTypeCode>
<gco:Boolean>true</gco:Boolean>
</gmd:extentTypeCode>
<gmd:westBoundLongitude>
<gco:Decimal>${boundingBox.west}</gco:Decimal>
</gmd:westBoundLongitude>
<gmd:eastBoundLongitude>
<gco:Decimal>${boundingBox.east}</gco:Decimal>
</gmd:eastBoundLongitude>
<gmd:southBoundLatitude>
<gco:Decimal>${boundingBox.south}</gco:Decimal>
</gmd:southBoundLatitude>
<gmd:northBoundLatitude>
<gco:Decimal>${boundingBox.north}</gco:Decimal>
</gmd:northBoundLatitude>
</gmd:EX_GeographicBoundingBox>
<#elseif geo.type="BOUNDING_POLYGON">
<#elseif geo.type="DESCRIPTION">
</#if>
</gmd:geographicElement>
</#list>
</#if>
<#if extent.temporalExtent??>
<#list extent.temporalExtent as temporal>
</#list>
</#if>
<#if extent.verticalExtent??>
<#list extent.verticalExtent as vertical>
</#list>
</#if>
</gmd:EX_Extent>
</gmd:extent>

View File

@ -1 +0,0 @@
<suca>Ciao cipollino</suca>

View File

@ -1,301 +0,0 @@
<identificationInfo>
<MD_DataIdentification>
<citation>
<CI_Citation>
<title>
<gco:CharacterString>Trough geomorphic feature layer</gco:CharacterString>
</title>
<date>
<CI_Date>
<date>
<gco:Date>2013-06-05</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"
codeListValue="creation" codeSpace="ISOTC211/19115">creation</CI_DateTypeCode>
</dateType>
</CI_Date>
</date>
<date>
<CI_Date>
<date>
<gco:Date>2014-02-14</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_DateTypeCode"
codeListValue="publication" codeSpace="ISOTC211/19115">publication
</CI_DateTypeCode>
</dateType>
</CI_Date>
</date>
<edition>
<gco:CharacterString>Version 1</gco:CharacterString>
</edition>
<identifier>
<MD_Identifier>
<code>
<gco:CharacterString>0d40e056-b491-4459-a691-1bb4924ef521</gco:CharacterString>
</code>
</MD_Identifier>
</identifier>
<citedResponsibleParty>
<CI_ResponsibleParty>
<individualName>
<gco:CharacterString>Miles Macmillan-Lawler
</gco:CharacterString>
</individualName>
<organisationName>
<gco:CharacterString>GRID-Arendal</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact>
<address>
<CI_Address>
<electronicMailAddress>
<gco:CharacterString>Miles.Macmillan-Lawler@grida.no
</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode"
codeListValue="custodian" codeSpace="ISOTC211/19115">custodian</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</citedResponsibleParty>
<presentationForm>
<CI_PresentationFormCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_PresentationFormCode"
codeListValue="mapDigital" codeSpace="ISOTC211/19115">mapDigital
</CI_PresentationFormCode>
</presentationForm>
</CI_Citation>
</citation>
<abstract>
<gco:CharacterString>The trough geomorphic feature layer represents
the spatial extent of the troughs of the worlds oceans based on
interpretation of the SRTM30 plus v7 global bathymetry model. The
layer is one of the 25 layers that make up the global seafloor
geomorphic features map (Harris et.al. 2014). The IHO (IHO, 2008)
definition of a trough is “a long depression of the sea floor
characteristically flat bottomed and steep sided and normally
shallower than a trench”. In this study we found that troughs are
also commonly open at one end (i.e. not defined by closed
bathymetric contours) and their broad, flat floors may exhibit a
continuous gradient along a thalweg. Troughs may originate from
glacial erosion processes or have formed through tectonic
processes. In this study, glacial troughs incised into the shelf
are a separate category; here we include all troughs not of a
glacial origin, typically superimposed on the slope and/or abyssal
base layers. Trenches that have been infilled with sediment may
evolve into troughs, as appears to have occurred in troughs
adjacent to North and South America, for example. Slumping on the
sides of some troughs has formed a bridge across the trough,
thereby dividing it into two separate sections (see “bridges”
below). In this study all troughs were digitised by hand based on
the interpretation of 100 m bathymetric contours.
</gco:CharacterString>
</abstract>
<purpose>
<gco:CharacterString>The trough geomorphic feature layer represents
the spatial extent of the troughs of the worlds oceans based on
interpretation of the SRTM30 plus v7 global bathymetry model. The
layer is one of the 25 layers that make up the global seafloor
geomorphic features map (Harris et.al. 2014). The global seafloor
geomorphic features map is intended to support ocean management
including feature inventories, spatial planning and biodiversity
conservation.</gco:CharacterString>
</purpose>
<credit>
<gco:CharacterString>The global seafloor geomorphic features map has
been produced through a collaboration between Geoscience Australia,
GRID-Arendal and Conservation International.
Reference: Harris et. al. (2014) Geomorphology of the oceans.Marine Geology
(in Press)
</gco:CharacterString>
</credit>
<pointOfContact>
<CI_ResponsibleParty>
<individualName>
<gco:CharacterString>Miles Macmillan-Lawler</gco:CharacterString>
</individualName>
<organisationName>
<gco:CharacterString>GRID-Arendal</gco:CharacterString>
</organisationName>
<contactInfo>
<CI_Contact>
<address>
<CI_Address>
<electronicMailAddress>
<gco:CharacterString>Miles.Macmillan-Lawler@grida.no
</gco:CharacterString>
</electronicMailAddress>
</CI_Address>
</address>
</CI_Contact>
</contactInfo>
<role>
<CI_RoleCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#CI_RoleCode"
codeListValue="custodian" codeSpace="ISOTC211/19115">custodian</CI_RoleCode>
</role>
</CI_ResponsibleParty>
</pointOfContact>
<resourceMaintenance>
<MD_MaintenanceInformation>
<maintenanceAndUpdateFrequency>
<MD_MaintenanceFrequencyCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_MaintenanceFrequencyCode"
codeListValue="irregular" codeSpace="ISOTC211/19115">irregular
</MD_MaintenanceFrequencyCode>
</maintenanceAndUpdateFrequency>
</MD_MaintenanceInformation>
</resourceMaintenance>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>Geology</gco:CharacterString>
</keyword>
<type>
<MD_KeywordTypeCode
codeList="http://www.isotc211.org/2005/resources/codeList.xml#MD_KeywordTypeCode"
codeListValue="theme" codeSpace="eng" />
</type>
<thesaurusName>
<CI_Citation>
<title>
<gco:CharacterString>GEMET - INSPIRE themes, version 1.0
</gco:CharacterString>
</title>
<date>
<CI_Date>
<date>
<gco:Date>2008-06-01</gco:Date>
</date>
<dateType>
<CI_DateTypeCode
codeList="http://www.isotc211.org/2005/resources/codeList.xml#CI_DateTypeCode"
codeListValue="publication" codeSpace="eng" />
</dateType>
</CI_Date>
</date>
</CI_Citation>
</thesaurusName>
</MD_Keywords>
</descriptiveKeywords>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>global</gco:CharacterString>
</keyword>
<type>
<MD_KeywordTypeCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode"
codeListValue="place" codeSpace="ISOTC211/19115">place</MD_KeywordTypeCode>
</type>
</MD_Keywords>
</descriptiveKeywords>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>seafloor, geomorphic features, habitats
</gco:CharacterString>
</keyword>
<type>
<MD_KeywordTypeCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_KeywordTypeCode"
codeListValue="theme" codeSpace="ISOTC211/19115">theme</MD_KeywordTypeCode>
</type>
</MD_Keywords>
</descriptiveKeywords>
<descriptiveKeywords>
<MD_Keywords>
<keyword>
<gco:CharacterString>Downloadable Data</gco:CharacterString>
</keyword>
<thesaurusName uuidref="723f6998-058e-11dc-8314-0800200c9a66" />
</MD_Keywords>
</descriptiveKeywords>
<resourceConstraints>
<MD_Constraints>
<useLimitation>
<gco:CharacterString>The global seafloor geomorphic feature map is
available for download from bluehabitats.org
</gco:CharacterString>
</useLimitation>
</MD_Constraints>
</resourceConstraints>
<resourceConstraints>
<MD_LegalConstraints>
<accessConstraints>
<MD_RestrictionCode
codeList="http://standards.iso.org/ittf/PubliclyAvailableStandards/ISO_19139_Schemas/resources/Codelist/gmxCodelists.xml#MD_RestrictionCode"
codeListValue="otherRestrictions">
otherRestrictions
</MD_RestrictionCode>
</accessConstraints>
<otherConstraints>
<gco:CharacterString>no limitations</gco:CharacterString>
</otherConstraints>
</MD_LegalConstraints>
</resourceConstraints>
<spatialRepresentationType>
<MD_SpatialRepresentationTypeCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_SpatialRepresentationTypeCode"
codeListValue="vector" codeSpace="ISOTC211/19115">vector
</MD_SpatialRepresentationTypeCode>
</spatialRepresentationType>
<language>
<LanguageCode
codeList="http://www.loc.gov/standards/iso639-2/php/code_list.php"
codeListValue="eng" codeSpace="ISO639-2">eng</LanguageCode>
</language>
<characterSet>
<MD_CharacterSetCode
codeList="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_CharacterSetCode"
codeListValue="utf8" codeSpace="ISOTC211/19115">utf8</MD_CharacterSetCode>
</characterSet>
<topicCategory>
<MD_TopicCategoryCode>oceans</MD_TopicCategoryCode>
</topicCategory>
<environmentDescription>
<gco:CharacterString>Microsoft Windows 7 Version 6.1 (Build 7601)
Service Pack 1; ESRI ArcGIS 10.0.4.4000</gco:CharacterString>
</environmentDescription>
<extent>
<EX_Extent>
<description>
<gco:CharacterString>Global Coverage</gco:CharacterString>
</description>
</EX_Extent>
</extent>
<extent>
<EX_Extent>
<geographicElement>
<EX_GeographicBoundingBox>
<extentTypeCode>
<gco:Boolean>true</gco:Boolean>
</extentTypeCode>
<westBoundLongitude>
<gco:Decimal>-180</gco:Decimal>
</westBoundLongitude>
<eastBoundLongitude>
<gco:Decimal>180</gco:Decimal>
</eastBoundLongitude>
<southBoundLatitude>
<gco:Decimal>-71.905139</gco:Decimal>
</southBoundLatitude>
<northBoundLatitude>
<gco:Decimal>89.049382</gco:Decimal>
</northBoundLatitude>
</EX_GeographicBoundingBox>
</geographicElement>
</EX_Extent>
</extent>
</MD_DataIdentification>
</identificationInfo>

View File

@ -1,11 +0,0 @@
<referenceSystemInfo xmlns="http://www.isotc211.org/2005/gmd" xmlns:gco="http://www.isotc211.org/2005/gco">
<MD_ReferenceSystem>
<referenceSystemIdentifier>
<RS_Identifier>
<code>
<gco:CharacterString>http://www.opengis.net/def/crs/EPSG/0/4326</gco:CharacterString>
</code>
</RS_Identifier>
</referenceSystemIdentifier>
</MD_ReferenceSystem>
</referenceSystemInfo>

View File

@ -1,39 +0,0 @@
<gmd:CI_ResponsibleParty>
<gmd:individualName>
<gco:CharacterString>${responsibleParty.individualName}</gco:CharacterString>
</gmd:individualName>
<gmd:organisationName>
<gco:CharacterString>${responsibleParty.organization}</gco:CharacterString>
</gmd:organisationName>
<#if responsibleParty.contact?has_content>
<gmd:contactInfo>
<gmd:CI_Contact>
<gmd:address>
<gmd:CI_Address>
<gmd:electronicMailAddress>
<gco:CharacterString>${responsibleParty.contact.email}</gco:CharacterString>
</gmd:electronicMailAddress>
</gmd:CI_Address>
</gmd:address>
<gmd:onlineResource>
<gmd:CI_OnlineResource>
<gmd:linkage>
<gmd:URL>${responsibleParty.contact.site}</gmd:URL>
</gmd:linkage>
<gmd:protocol>
<gco:CharacterString>WWW:LINK-1.0-http--link</gco:CharacterString>
</gmd:protocol>
<gmd:name>
<gco:CharacterString>${responsibleParty.individualName} site.</gco:CharacterString>
</gmd:name>
</gmd:CI_OnlineResource>
</gmd:onlineResource>
</gmd:CI_Contact>
</gmd:contactInfo>
</#if>
<gmd:role>
<gmd:CI_RoleCode codeListValue="${responsibleParty.role}"
codeList="http://schemas.opengis.net/iso/19139/20070417/resources/Codelist/gmxCodelists.xml#CI_RoleCode"/>
</gmd:role>
</gmd:CI_ResponsibleParty>