Package org.locationtech.udig.catalog.document

Examples of org.locationtech.udig.catalog.document.IDocumentSource


                        items.add(folder);
                    }
                   
                }
               
                final IDocumentSource docSource = toSource(geoResource, IDocumentSource.class, monitor);
                isResourceEnabled = docSource != null && docSource.isEnabled();
               
                if (isResourceEnabled) {
                    final IDocumentFolder folder = ShpDocFactory.createFolder(null, geoResource.getTitle(), docSource);
                    // Set so that source's document list is same with folder's
                    folder.setDocuments(docSource.getDocuments(monitor));
                    items.add(folder);
                }
               
            }
        }
View Full Code Here


            @Override
            protected IStatus run(IProgressMonitor monitor) {

                IDocument doc = null;
                if (folder.getSource() instanceof IDocumentSource) {
                    final IDocumentSource resourceDocSource = (IDocumentSource) folder.getSource();
                    doc = resourceDocSource.add(info, monitor);
                } else if (folder.getSource() instanceof IAttachmentSource) {
                    final IAttachmentSource featureDocSource = (IAttachmentSource) folder.getSource();
                    doc = featureDocSource.add(feature, info, monitor);
                }               
               
View Full Code Here

                @Override
                protected IStatus run(IProgressMonitor monitor) {
                    boolean isUpdated = false;
                    final DocumentInfo info = docDialog.getDocInfo();
                    if (source instanceof IDocumentSource) {
                        final IDocumentSource resourceDocSource = (IDocumentSource) source;
                        isUpdated = resourceDocSource.update(doc, info, monitor);
                    } else if (source instanceof IAttachmentSource) {
                        final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                        isUpdated = featureDocSource.update(feature, doc, info, monitor);
                    }             
                    editDocumentCallback(isUpdated);
View Full Code Here

                if (doDelete) {
                    if (source instanceof IDocumentSource) {
                        final Job removeLayerDocJob = new Job(Messages.DocumentView_removeDocProgressMsg){
                            @Override
                            protected IStatus run(IProgressMonitor monitor) {
                                final IDocumentSource docSource = (IDocumentSource) source;
                                final boolean isRemoved = docSource.remove(doc, monitor);
                                removeDocumentCallback(isRemoved);
                                return Status.OK_STATUS;
                            }
                        };
                        removeLayerDocJob.schedule();
View Full Code Here

            throws IOException {

        if (resolve instanceof ShpGeoResourceImpl) {
            final ShpGeoResourceImpl shpGeoResource = (ShpGeoResourceImpl) resolve;
            if (adapter.isAssignableFrom(IDocumentSource.class)) {
                IDocumentSource documentSource = new ShpDocumentSource(shpGeoResource);
                if (documentSource != null) {
                    return adapter.cast(documentSource);
                }
            }
            if (adapter.isAssignableFrom(IHotlinkSource.class)) {
View Full Code Here

     * @return true if allows, otherwise false
     */
    public static boolean canAttach(IAbstractDocumentSource source) {
        if (isValidSource(source)) {
            if (source instanceof IDocumentSource) {
                final IDocumentSource layerDocSource = (IDocumentSource) source;
                return layerDocSource.canAttach();
            } else if (source instanceof IAttachmentSource) {
                final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                return featureDocSource.canAttach();
            }   
        }
View Full Code Here

     * @return true if allows, otherwise false
     */
    public static boolean canLinkFile(IAbstractDocumentSource source) {
        if (isValidSource(source)) {
            if (source instanceof IDocumentSource) {
                final IDocumentSource layerDocSource = (IDocumentSource) source;
                return layerDocSource.canLinkFile();
            } else if (source instanceof IAttachmentSource) {
                final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                return featureDocSource.canLinkFile();
            }   
        }
View Full Code Here

     * @return true if allows, otherwise false
     */
    public static boolean canLinkWeb(IAbstractDocumentSource source) {
        if (isValidSource(source)) {
            if (source instanceof IDocumentSource) {
                final IDocumentSource layerDocSource = (IDocumentSource) source;
                return layerDocSource.canLinkWeb();
            } else if (source instanceof IAttachmentSource) {
                final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                return featureDocSource.canLinkWeb();
            }   
        }
View Full Code Here

     * @return true if allows, otherwise false
     */
    public static boolean canUpdate(IAbstractDocumentSource source) {
        if (isValidSource(source)) {
            if (source instanceof IDocumentSource) {
                final IDocumentSource layerDocSource = (IDocumentSource) source;
                return layerDocSource.canUpdate();
            } else if (source instanceof IAttachmentSource) {
                final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                return featureDocSource.canUpdate();
            } else if (source instanceof IHotlinkSource) {
                final IHotlinkSource hotlinkSource = (IHotlinkSource) source;
View Full Code Here

     * @return true if allows, otherwise false
     */
    public static boolean canRemove(IAbstractDocumentSource source) {
        if (isValidSource(source)) {
            if (source instanceof IDocumentSource) {
                final IDocumentSource layerDocSource = (IDocumentSource) source;
                return layerDocSource.canRemove();
            } else if (source instanceof IAttachmentSource) {
                final IAttachmentSource featureDocSource = (IAttachmentSource) source;
                return featureDocSource.canRemove();
            } else if (source instanceof IHotlinkSource) {
                final IHotlinkSource hotlinkSource = (IHotlinkSource) source;
View Full Code Here

TOP

Related Classes of org.locationtech.udig.catalog.document.IDocumentSource

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.