Examples of DocumentInfo


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

    @Test
    public void testFromString() {

        String infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(),
                LABEL, DESCRIPTION, Boolean.toString(IS_TEMPLATE));
        DocumentInfo info = new DocumentInfo(infoString);
        assertEquals("Info is not expected.", INFO, info.getInfo());
        assertEquals("Type is not expected.", TYPE, info.getType());
        assertEquals("Content type is not expected.", CONTENT_TYPE, info.getContentType());
        assertEquals("Label is not expected.", LABEL, info.getLabel());
        assertEquals("Description is not expected.", DESCRIPTION, info.getDescription());
        assertEquals("Is template flag is not expected.", IS_TEMPLATE, info.isTemplate());

        infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(), "",
                DESCRIPTION, Boolean.toString(IS_TEMPLATE));
        info = new DocumentInfo(infoString);
        assertEquals("Info is not expected.", INFO, info.getInfo());
        assertEquals("Type is not expected.", TYPE, info.getType());
        assertEquals("Content type is not expected.", CONTENT_TYPE, info.getContentType());
        assertEquals("Label is not expected.", null, info.getLabel());
        assertEquals("Description is not expected.", DESCRIPTION, info.getDescription());
        assertEquals("Is template flag is not expected.", IS_TEMPLATE, info.isTemplate());

        infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(), "", "",
                Boolean.toString(IS_TEMPLATE));
        info = new DocumentInfo(infoString);
        assertEquals("Info is not expected.", INFO, info.getInfo());
        assertEquals("Type is not expected.", TYPE, info.getType());
        assertEquals("Content type is not expected.", CONTENT_TYPE, info.getContentType());
        assertEquals("Label is not expected.", null, info.getLabel());
        assertEquals("Description is not expected.", null, info.getDescription());
        assertEquals("Is template flag is not expected.", IS_TEMPLATE, info.isTemplate());
       
    }
View Full Code Here

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

    @Test
    public void testToString() {
       
        String infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(),
                LABEL, DESCRIPTION, Boolean.toString(IS_TEMPLATE));
        DocumentInfo hotlinkDesc = new DocumentInfo(LABEL, DESCRIPTION, INFO, CONTENT_TYPE,
                IS_TEMPLATE, TYPE);
        assertEquals("Description string is not expected.", infoString, hotlinkDesc.toString());

        infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(), "",
                DESCRIPTION, Boolean.toString(IS_TEMPLATE));
        hotlinkDesc = new DocumentInfo(null, DESCRIPTION, INFO, CONTENT_TYPE, IS_TEMPLATE, TYPE);
        assertEquals("Description string is not expected.", infoString, hotlinkDesc.toString());

        hotlinkDesc = new DocumentInfo("", DESCRIPTION, INFO, CONTENT_TYPE, IS_TEMPLATE, TYPE);
        assertEquals("Description string is not expected.", infoString, hotlinkDesc.toString());

        infoString = String.format(FORMAT, INFO, TYPE.toString(), CONTENT_TYPE.toString(), "", "",
                Boolean.toString(IS_TEMPLATE));
        hotlinkDesc = new DocumentInfo(null, null, INFO, CONTENT_TYPE, IS_TEMPLATE, TYPE);
        assertEquals("Description string is not expected.", infoString, hotlinkDesc.toString());

        hotlinkDesc = new DocumentInfo("", "", INFO, CONTENT_TYPE, IS_TEMPLATE, TYPE);
        assertEquals("Description string is not expected.", infoString, hotlinkDesc.toString());
       
    }
View Full Code Here

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

       
        file = new File(directory, SHAPEFILE);
        url = file.toURI().toURL();

        file1 = new File(directory, FILE1);
        fileDocInfo1 = new DocumentInfo("fileDoc1", "fileDocDesc1", file1.getAbsolutePath(), ContentType.FILE, false, Type.ATTACHMENT);
        file2 = new File(directory, FILE2);
        fileDocInfo2 = new DocumentInfo("fileDoc2", "fileDocDesc2", file2.getAbsolutePath(), ContentType.FILE, true, Type.ATTACHMENT);
       
        webDocInfo1 = new DocumentInfo("webDoc1", "webDocDesc1", WEB1, ContentType.WEB, false, Type.LINKED);
        webDocInfo2 = new DocumentInfo("webDoc2", "webDocDesc2", WEB2, ContentType.WEB, false, Type.LINKED);
       
        descriptor1 = new HotlinkDescriptor("fileLabel", "description", FILE_ATTR, ContentType.FILE, "config");
        descriptor2 = new HotlinkDescriptor("webLabel", "description", LINK_ATTR, ContentType.WEB, "config");
        descriptor3 = new HotlinkDescriptor("actionLabel", "description", STATE_ATTR, ContentType.ACTION, "config");
       
View Full Code Here

Examples of org.pdf4j.saxon.om.DocumentInfo

        Item current = context.getContextItem();
        if (current==null) {
            dynamicError("Finding root of tree: the context item is undefined", "XPDY0002", context);
        }
        if (current instanceof NodeInfo) {
            DocumentInfo doc = ((NodeInfo)current).getDocumentRoot();
            if (doc==null) {
                dynamicError("The root of the tree containing the context item is not a document node", "XPDY0050", context);
            }
            return doc;
        }
View Full Code Here

Examples of org.pdfsam.guiclient.dto.DocumentInfo

    setCurrentId(id);
    initThumbnailsCreation();
    if(openInputDocument()){
      panel.setSelectedPdfDocument(inputFile);               
      panel.setSelectedPdfDocumentPassword(getProvidedPassword());
      DocumentInfo documentInfo = getDocumentInfo();
      if(documentInfo!=null){
        panel.setDocumentProperties(documentInfo);                   
            panel.setDocumentPropertiesVisible(true);
      }
      Vector<VisualPageListItem> modelList = getDocumentModel(template);
View Full Code Here

Examples of org.tuba.documentmanager.DocumentInfo

    String integrationID = integratorInstance.integrate(artefactPosition,
        representation, integrator.getConfiguration());
    if (integrationID == null)
      return null;

    DocumentInfo documentInfo = DocumentManager.getInstance()
        .getDocumentInfo(artefactPosition.getTutorialDocument());

    if (documentInfo == null)
      return null;

    documentInfo.addIntegrationID(integratorInstance, integrationID);
    return integrationID;
  }
View Full Code Here

Examples of org.zanata.webtrans.shared.model.DocumentInfo

                                        hDoc.getPath(), hDoc.getName());
                downloadExtensions.put(extension,
                        "baked?docId=" + hDoc.getDocId());
            }

            DocumentInfo doc =
                    new DocumentInfo(
                            new DocumentId(hDoc.getId(), hDoc.getDocId()),
                            hDoc.getName(),
                            hDoc.getPath(),
                            hDoc.getLocale().getLocaleId(),
                            null,
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.