Package org.locationtech.udig.catalog.ui

Examples of org.locationtech.udig.catalog.ui.FileConnectionFactory$FileType


        // all the disk files should be marked with "snapshot + OVF_BUNDLE_PATH_IDENTIFIER" + hRef
        // (packagePath relative)
        for (String diskFileId : diskFileIds)
        {
            FileType file;
            try
            {
                file = OVFReferenceUtils.getReferencedFile(envelope, diskFileId);
            }
            catch (IdNotFoundException e)
            {
                throw new AMException(AMError.PROMOTE_MASTER_OVF, String.format(
                    "The promote [%s] can not be created because the "
                        + "referenced file Id [%s] is not found on the Envelope", relativeDiskPath,
                    diskFileId), e);
            }

            file.setSize(diskSizeInBytes);
            file.setHref(relativeDiskPath);
        }

        return envelope;
    }
View Full Code Here


                {
                    String msg = "File Id [" + fileId + "] not found on the ReferencesSection";
                    throw new IdNotFoundException(msg);
                }

                FileType file = fileIdToFileType.get(fileId);
                final String filePath = file.getHref();
                final Long fileSize = file.getSize().longValue();

                String format = diskDescType.getFormat(); // XXX using the same format on the OVF
                // disk

                if (!diskIdToVSs.containsKey(diskId))
View Full Code Here

                        dropHandler.performDrop(url, null);
                    }
                }
                private boolean recognizedFile( String url ) {
                    if (url.toLowerCase().indexOf("file://") != -1 ){ //$NON-NLS-1$
                        return new FileConnectionFactory().canProcess(url);
                    }
                    final Pattern PATTERN = Pattern.compile("[^:/]+://?.+"); //$NON-NLS-1$
                    if( PATTERN.matcher(url).matches()){
                       return new FileConnectionFactory().canProcess(url);
                    }
                    return false;
                }
                public void changed(LocationEvent event) {
                    //
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.ui.FileConnectionFactory$FileType

Copyright © 2018 www.massapicom. 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.