protected Element writeSource(ThreddsMetadata.Source p, String role) { Element contributor = new Element("contributor", defNS); contributor.setAttribute("role", role); Element organization = new Element("organization", defNS); contributor.addContent( organization); String name = p.getNameVocab().getText(); int pos = name.indexOf('/'); if (pos > 0) { organization.addContent( new Element("instName", defNS).addContent(name.substring(0,pos))); organization.addContent( new Element("instDept", defNS).addContent(name.substring(pos+1))); } else organization.addContent( new Element("instName", defNS).addContent(name)); if ((p.getUrl() != null) && p.getUrl().length() > 0) organization.addContent( new Element("instUrl", defNS).addContent(p.getUrl())); if (emailOK(p)) organization.addContent( new Element("instEmail", defNS).addContent(p.getEmail())); return contributor; }
protected Element writeSource(ThreddsMetadata.Source p, String role) { Element contributor = new Element("contributor", defNS); contributor.setAttribute("role", role); Element organization = new Element("organization", defNS); contributor.addContent( organization); String name = p.getNameVocab().getText(); int pos = name.indexOf('/'); if (pos > 0) { organization.addContent( new Element("instName", defNS).addContent(name.substring(0,pos))); organization.addContent( new Element("instDept", defNS).addContent(name.substring(pos+1))); } else organization.addContent( new Element("instName", defNS).addContent(name)); if ((p.getUrl() != null) && p.getUrl().length() > 0) organization.addContent( new Element("instUrl", defNS).addContent(p.getUrl())); if (emailOK(p)) organization.addContent( new Element("instEmail", defNS).addContent(p.getEmail())); return contributor; }
protected Element writeSource(ThreddsMetadata.Source p, String role) { Element contributor = new Element("contributor", defNS); contributor.setAttribute("role", role); Element organization = new Element("organization", defNS); contributor.addContent( organization); String name = p.getNameVocab().getText(); int pos = name.indexOf('/'); if (pos > 0) { organization.addContent( new Element("instName", defNS).addContent(name.substring(0,pos))); organization.addContent( new Element("instDept", defNS).addContent(name.substring(pos+1))); } else organization.addContent( new Element("instName", defNS).addContent(name)); if ((p.getUrl() != null) && p.getUrl().length() > 0) organization.addContent( new Element("instUrl", defNS).addContent(p.getUrl())); if (emailOK(p)) organization.addContent( new Element("instEmail", defNS).addContent(p.getEmail())); return contributor; }
if (plist.size() > 0) { for (ThreddsMetadata.Source p : plist) { if (p.getNameVocab().getVocabulary().equalsIgnoreCase("DIF")) { Element dataCenter = new Element("Data_Center", defNS); rootElem.addContent(dataCenter);
for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Publisher")); break; for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Author")); break;
for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("DIF")) { Element dataCenter = new Element("Data_Center", defNS); rootElem.addContent( dataCenter);
for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Publisher")); break; for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Author")); break;
for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Publisher")); break; for (int i=0; i<list.size(); i++) { ThreddsMetadata.Source p = (ThreddsMetadata.Source) list.get(i); if (p.getNameVocab().getVocabulary().equalsIgnoreCase("ADN")) { contributors.addContent( writeSource(p, "Author")); break;
if (plist.size() > 0) { for (ThreddsMetadata.Source p : plist) { if (p.getNameVocab().getVocabulary().equalsIgnoreCase("DIF")) { Element dataCenter = new Element("Data_Center", defNS); rootElem.addContent(dataCenter);
protected Element writeSource(String elementName, ThreddsMetadata.Source p) { Element elem = new Element(elementName, defNS); elem.addContent(writeControlledVocabulary(p.getNameVocab(), "name")); Element contact = new Element("contact", defNS); if (p.getUrl() != null) contact.setAttribute("url", p.getUrl()); if (p.getEmail() != null) contact.setAttribute("email", p.getEmail()); elem.addContent(contact); return elem; }
protected Element writeSource(String elementName, ThreddsMetadata.Source p) { Element elem = new Element(elementName, defNS); elem.addContent(writeControlledVocabulary(p.getNameVocab(), "name")); Element contact = new Element("contact", defNS); if (p.getUrl() != null) contact.setAttribute("url", p.getUrl()); if (p.getEmail() != null) contact.setAttribute("email", p.getEmail()); elem.addContent(contact); return elem; }
protected Element writeSource( String elementName, ThreddsMetadata.Source p) { Element elem = new Element(elementName, defNS); elem.addContent( writeControlledVocabulary( p.getNameVocab() , "name")); Element contact = new Element("contact", defNS); if (p.getUrl() != null) contact.setAttribute("url", p.getUrl()); if (p.getEmail() != null) contact.setAttribute("email", p.getEmail()); elem.addContent( contact); return elem; }