Examples of DIFWriter


Examples of thredds.catalog.dl.DIFWriter

      for (InvMetadata md : mds) {
        log.info("Found metadata "+md.toString());
      }

      //--- check and see whether this dataset is DIF writeable
      DIFWriter difWriter = new DIFWriter();
      StringBuffer sBuff = new StringBuffer();
      Element dif = null;

      if (difWriter.isDatasetUseable(ds, sBuff)) {
        log.info("Yay! Dataset has DIF compatible metadata "+sBuff.toString());

        dif = difWriter.writeOneEntry(ds, sBuff);

      } else {
        log.info("Dataset does not have DIF compatible metadata so we will write a relaxed DIF entry\n"+sBuff.toString());

        dif = difWriter.writeOneRelaxedEntry(ds, sBuff);
        addCoordSys = true;
      }

      //--- get the UUID assigned to the DIF record
      String uuid = dif.getChild("Entry_ID", difNS).getText();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.