Package org.locationtech.udig.catalog.document

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


    @Test
    public void testSetAndClearFile() {

        source.setFile(feature, FILE_ATTR, file1, monitor);

        IDocument doc = source.getDocument(feature, FILE_ATTR, monitor);
        File docFile = (File) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertEquals("File is not expected.", file1.getAbsolutePath(), docFile.getAbsolutePath());

        source.clear(feature, FILE_ATTR, monitor);

        doc = source.getDocument(feature, FILE_ATTR, monitor);
        docFile = (File) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertNull("File is not null.", docFile);

    }
View Full Code Here


        } catch (MalformedURLException e) {
            e.printStackTrace();
        }
        source.setLink(feature, LINK_ATTR, url, monitor);

        IDocument doc = source.getDocument(feature, LINK_ATTR, monitor);
        URL docUrl = (URL) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertEquals("File is not expected.", url.toString(), docUrl.toString());

        source.clear(feature, LINK_ATTR, monitor);

        doc = source.getDocument(feature, LINK_ATTR, monitor);
        docUrl = (URL) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertNull("File is not null.", docUrl);

    }
View Full Code Here

        final String action = "ACTION";

        source.setAction(feature, STATE_ATTR, action, monitor);

        IDocument doc = source.getDocument(feature, STATE_ATTR, monitor);
        String docAction = (String) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertEquals("File is not expected.", action, docAction);

        source.clear(feature, STATE_ATTR, monitor);

        doc = source.getDocument(feature, STATE_ATTR, monitor);
        docAction = (String) doc.getContent();
        assertNotNull("Doc is null.", doc);
        assertNull("File is not null.", docAction);

    }
View Full Code Here

TOP

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

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.