Examples of ImageFormat


Examples of com.cloud.storage.Storage.ImageFormat

    public Answer copyVolumeFromPrimaryToSecondary(CopyCommand cmd) {
        DataTO srcData = cmd.getSrcTO();
        DataTO destData = cmd.getDestTO();
        VolumeObjectTO srcVol = (VolumeObjectTO) srcData;
        VolumeObjectTO destVol = (VolumeObjectTO) destData;
        ImageFormat srcFormat = srcVol.getFormat();
        ImageFormat destFormat = destVol.getFormat();
        DataStoreTO srcStore = srcData.getDataStore();
        DataStoreTO destStore = destData.getDataStore();
        PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) srcStore;
        if (!(destStore instanceof NfsTO)) {
            return new CopyCmdAnswer("can only handle nfs storage");
        }
        NfsTO nfsStore = (NfsTO)destStore;
        String srcVolumePath = srcData.getPath();
        String destVolumePath = destData.getPath();
        String secondaryStorageUrl = nfsStore.getUrl();
        KVMStoragePool secondaryStoragePool = null;

        try {
            String volumeName = UUID.randomUUID().toString();

            KVMPhysicalDisk volume = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), srcVolumePath);
            String destVolumeName = volumeName + "." + destFormat.getFileExtension();
            volume.setFormat(PhysicalDiskFormat.valueOf(srcFormat.toString()));
            secondaryStoragePool = storagePoolMgr.getStoragePoolByURI(
                    secondaryStorageUrl);
            secondaryStoragePool.createFolder(destVolumePath);
            storagePoolMgr.deleteStoragePool(secondaryStoragePool.getType(),secondaryStoragePool.getUuid());
View Full Code Here

Examples of com.cloud.storage.Storage.ImageFormat

        DataStore store = volume.getDataStore();
        VolumeInfo volInfo = (VolumeInfo)volume;
        RegisterVolumePayload payload = (RegisterVolumePayload)volInfo.getpayload();
        String url = payload.getUrl();
        String checkSum = payload.getChecksum();
        ImageFormat format = ImageFormat.valueOf(payload.getFormat());

        volumeHost = _volumeStoreDao.findByStoreVolume(store.getId(), volume.getId());
        if (volumeHost == null) {
            volumeHost = new VolumeDataStoreVO(store.getId(), volume.getId(), new Date(), 0, Status.NOT_DOWNLOADED,
                    null, null, "jobid0000", null, url, checkSum);
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

            + "/images/${image}";
      } else {
        // link to the resources of the page entity:
        imageSrc = fExternalImageBaseURL;
      }
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink,
          imageNamespace);

      String imageName = imageFormat.getFilename();
      imageName = Encoder.encodeUrl(imageName);
      imageSrc = imageSrc.replace("${image}", imageName);

      appendInternalImageLink(imageSrc, imageSrc, imageFormat);
    }
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

                        } else if (oAttributes != null
                                && oAttributes.get(WIKIOBJECT_ATTR_KEY) instanceof ImageFormat) {
                            // the caption of images often holds well formed
                            // sentences with links to entities
                            hasSpecialHandling = true;
                            ImageFormat iformat = (ImageFormat) oAttributes.get(WIKIOBJECT_ATTR_KEY);
                            imageNodeToText(tagNode, iformat, countingBuffer,
                                    model);
                        }
                        if (!hasSpecialHandling) {
                            nodesToText(tagNode.getChildren(), countingBuffer,
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    if (fExternalImageBaseURL != null) {
      String imageHref = fExternalWikiBaseURL;
      String imageSrc = fExternalImageBaseURL;
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    if (fExternalImageBaseURL != null) {
      String imageHref = fExternalWikiBaseURL;
      String imageSrc = fExternalImageBaseURL;
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    if (fExternalImageBaseURL != null) {
      String imageHref = fExternalWikiBaseURL;
      String imageSrc = fExternalImageBaseURL;
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  @Override
  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    String imageSrc = getImageBaseURL();
    if (imageSrc != null) {
      String imageHref = getWikiBaseURL();
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    if (fExternalImageBaseURL != null) {
      String imageHref = fExternalWikiBaseURL;
      String imageSrc = fExternalImageBaseURL;
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
View Full Code Here

Examples of info.bliki.wiki.model.ImageFormat

  @Override
  public void parseInternalImageLink(String imageNamespace, String rawImageLink) {
    String imageSrc = getImageBaseURL();
    if (imageSrc != null) {
      String imageHref = getWikiBaseURL();
      ImageFormat imageFormat = ImageFormat.getImageFormat(rawImageLink, imageNamespace);

      String imageName = imageFormat.getFilename();
      // String sizeStr = imageFormat.getSizeStr();
      // if (sizeStr != null) {
      // imageName = sizeStr + '-' + imageName;
      // }
      // if (imageName.endsWith(".svg")) {
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.