Examples of Document


Examples of org.kapott.hbci.sepa.jaxb.pain_008_002_02.Document

     * @see org.kapott.hbci.GV.parsers.ISEPAParser#parse(java.io.InputStream, java.util.List)
     */
    public void parse(InputStream xml, List<Properties> sepaResults)
    {
       
        Document doc = JAXB.unmarshal(xml, Document.class);
        CustomerDirectDebitInitiationV02 pain = doc.getCstmrDrctDbtInitn();
               
        List<PaymentInstructionInformationSDD> pmtInfs = pain.getPmtInf();
       
        for (PaymentInstructionInformationSDD pmtInf:pmtInfs)
        {
View Full Code Here

Examples of org.kapott.hbci.sepa.jaxb.pain_008_003_02.Document

     * @see org.kapott.hbci.GV.parsers.ISEPAParser#parse(java.io.InputStream, java.util.List)
     */
    public void parse(InputStream xml, List<Properties> sepaResults)
    {
       
        Document doc = JAXB.unmarshal(xml, Document.class);
        CustomerDirectDebitInitiationV02 pain = doc.getCstmrDrctDbtInitn();
               
        List<PaymentInstructionInformationSDD> pmtInfs = pain.getPmtInf();
       
        for (PaymentInstructionInformationSDD pmtInf:pmtInfs)
        {
View Full Code Here

Examples of org.kuali.rice.krad.document.Document

   */
  public void testIdMgrPermissions_populateGroup() throws WorkflowException {
    Map<String, Boolean> authUsers = getTestUtils().getAuthUsers();
    GlobalVariables.setUserSession(new UserSession("admin"));
    //Document document = KRADServiceLocatorWeb.getDocumentService().getNewDocument(IdentityManagementPersonDocument.class);
    Document document = mock(IdentityManagementPersonDocument.class);
    DocumentHeader header = mock(DocumentHeader.class);
    WorkflowDocument wd = mock(WorkflowDocument.class);
    when(document.getDocumentHeader()).thenReturn(header);
    when(header.getWorkflowDocument()).thenReturn(wd);
    when(document.getDocumentNumber()).thenReturn("1001");
    when(wd.getDocumentTypeName()).thenReturn("IdentityManagementPersonDocument");
    when(wd.isInitiated()).thenReturn(true);
    when(wd.getStatus()).thenReturn(DocumentStatus.fromCode("I"));
    // assign users to groups
    // adapted from org.kuali.rice.kim.rules.ui.GroupDocumentMemberRule#validAssignGroup
View Full Code Here

Examples of org.kxml2.kdom.Document

        in = container.openInputStream();

        try {
            KXmlParser parser = null;
            Document doc = null;
            Element root;
            Element kid;
            try {
                parser = new KXmlParser();
                parser.setInput(new AlbiteStreamReader(
                        in, Encodings.DEFAULT));

                doc = new Document();
                doc.parse(parser);
                parser = null;

                root = doc.getRootElement();

                Element rfile = root
                        .getElement(KXmlParser.NO_NAMESPACE, "rootfiles")
                        .getElement(KXmlParser.NO_NAMESPACE, "rootfile");

                opfFileName = rfile.getAttributeValue(
                        KXmlParser.NO_NAMESPACE, "full-path");

                if (opfFileName == null) {
                    throw new BookException("Missing opf file");
                }

                opfFilePath = RandomReadingFile.getPathFromURL(opfFileName);

                //#debug
                AlbiteMIDlet.LOGGER.log(opfFilePath);

            } catch (XmlPullParserException xppe) {
                parser = null;
                doc = null;
                throw new BookException(
                    "container.xml is invalid");
            }
        } finally {
            in.close();
        }

        /*
         * now the opf file
         */
        ArchiveEntry opfFile = bookArchive.getEntry(opfFileName);

        if (opfFile == null) {
            throw new BookException("Missing opf");
        }

        in = opfFile.openInputStream();

        try {
            KXmlParser parser = null;
            Document doc = null;
            Element root;
            Element kid;

            try {
                parser = new KXmlParser();

                try {
                    parser.setFeature(
                            KXmlParser.FEATURE_PROCESS_NAMESPACES, true);
                } catch (XmlPullParserException e) {}

                parser.setInput(new AlbiteStreamReader(
                        in, Encodings.DEFAULT));

                doc = new Document();
                doc.parse(parser);
                parser = null;

                root = doc.getRootElement();

                try {
                    /*
                     * try to get the metadata
                     */
 
View Full Code Here

Examples of org.lilystudio.smarty4j.statement.Document

      // 初始化模板的相关信息
      this.path = path.replace('\\', '/');
      name = path.substring(engine.getTemplatePath().length());
    }
    TemplateReader in = new TemplateReader(reader);
    doc = new Document(this, in);
    in.checkStatus(name);
    if (parse) {
      this.parser = toParser(null);
    }
  }
View Full Code Here

Examples of org.mifosplatform.infrastructure.documentmanagement.domain.Document

            final ContentRepository contentRepository = this.contentRepositoryFactory.getRepository();

            final String fileLocation = contentRepository.saveFile(inputStream, documentCommand);

            final Document document = Document.createNew(documentCommand.getParentEntityType(), documentCommand.getParentEntityId(),
                    documentCommand.getName(), documentCommand.getFileName(), documentCommand.getSize(), documentCommand.getType(),
                    documentCommand.getDescription(), fileLocation, contentRepository.getStorageType());

            this.documentRepository.save(document);

            return document.getId();
        } catch (final DataIntegrityViolationException dve) {
            logger.error(dve.getMessage(), dve);
            throw new PlatformDataIntegrityException("error.msg.document.unknown.data.integrity.issue",
                    "Unknown data integrity issue with resource.");
        }
View Full Code Here

Examples of org.mongodb.Document

  }

  public CompletableFuture<T> insert(T elem) {
    CompletableFuture<T> future = new CompletableFuture<>();
    try {
      Document doc = Document.valueOf(mapper.writeValueAsString(elem));
      collection.insert(doc).register((result, e) -> {
        if (result != null && result.wasAcknowledged()) {
          elem.setId(doc.getObjectId("_id"));
          future.complete(elem);
        } else {
          logger.error("Error while creating a new document in insert() : " + doc.toString(), e);
          future.cancel(true);
        }
      });
    } catch (JsonProcessingException e) {
      logger.error("Error while creating element " + elem.toString() + " in insert()", e);
View Full Code Here

Examples of org.mybatis.generator.api.dom.xml.Document

  public List<GeneratedXmlFile> contextGenerateAdditionalXmlFiles(
      IntrospectedTable introspectedTable)
  {
    XmlElement parent = new XmlElement("struts"); //$NON-NLS-1$
    addPackageElement(parent, introspectedTable, parentModulName);
    Document document = new Document(STRUTS_PUBLIC_ID, STRUTS_SYSTEM_ID);
    document.setRootElement(parent);
    GeneratedXmlFile gxf = new GeneratedXmlFile(document, strutsXmlFileName
        + ".xml", strutsXmlFilePath, targetProject, isMergeable);
    List<GeneratedXmlFile> gxfs = new ArrayList<GeneratedXmlFile>();
    gxfs.add(gxf);
    return gxfs;
View Full Code Here

Examples of org.nexml.model.Document

   
    // this is the full study as it is stored by the database
    Study tbStudy = (Study)loadObject(Study.class, studyId);
   
    // this is an object representation of a NeXML document
    Document nexDoc = DocumentFactory.safeCreateDocument();
   
    // the converter populates the NeXML document with the contents of the treebase study
    NexmlDocumentWriter ndc = new NexmlDocumentWriter(tbStudy,getTaxonLabelHome(),nexDoc);
    ndc.fromTreeBaseToXml(tbStudy); // here is where the conversion happens   
   
    attachAnalysisMetadata(analyzedDataForData, tbStudy, nexDoc);   
   
    // attach analysis step metadata to matrices
    for ( Matrix<?> nexMatrix : nexDoc.getMatrices() ) {
      attachAnalyzedDataMetadata(analyzedDataForData, nexMatrix);
    }
   
    // attach analysis step metadata to trees
    for ( TreeBlock nexTrees : nexDoc.getTreeBlockList() ) {
      int count = nexTrees.getSegmentCount();     
      for ( int i = 0; i < count; i++ ) {
        Network<?> nexTree = nexTrees.getSegment(i);
        attachAnalyzedDataMetadata(analyzedDataForData, nexTree);       
      }
    }
   
    FileWriter fstream = new FileWriter("/Users/rvosa/Desktop/outfile.xml");
    BufferedWriter out = new BufferedWriter(fstream)
    out.write(nexDoc.getXmlString());
    out.close();
  }
View Full Code Here

Examples of org.objectweb.type_test.types1.Document

        assertEquals(msg, x.getValue(), y.getValue());
        assertEquals(msg, x.getID(), y.getID());
    }
   
    public void testDocument() throws Exception {
        Document x = new Document();
        x.setValue("content-x");
        x.setID("Hello There");
        Document yOrig = new Document();
        yOrig.setID("Cheerio");
        yOrig.setValue("content-y");

        Holder<Document> y = new Holder<Document>(yOrig);
        Holder<Document> z = new Holder<Document>();

        Document ret;
        if (testDocLiteral) {
            ret = docClient.testDocument(x, y, z);
        } else {
            ret = rpcClient.testDocument(x, y, z);
        }
        if (!perfTestOnly) {
            equals("testDocument(): Incorrect value for inout param", x, y.value);
            equals("testDocument(): Incorrect value for out param", yOrig, z.value);
            equals("testDocument(): Incorrect return value", x, ret);
        }

        x = new Document();
        yOrig = new Document();
        x.setValue("content-x");
        yOrig.setValue("content-y");
        x.setID(null);
        yOrig.setID(null);
        y = new Holder<Document>(yOrig);
        z = new Holder<Document>();

        if (testDocLiteral) {
            ret = docClient.testDocument(x, y, z);
        } else {
            ret = rpcClient.testDocument(x, y, z);
        }
        if (!perfTestOnly) {
            equals("testDocument(): Incorrect value for inout param", x, y.value);
            equals("testDocument(): Incorrect value for out param", yOrig, z.value);
            equals("testDocument(): Incorrect return value", x, ret);
            assertNull(y.value.getID());
            assertNull(ret.getID());
        }
    }
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.