Examples of ModelParser


Examples of com.volantis.mps.bms.impl.ser.ModelParser

                          HttpServletResponse response)
            throws ServletException, IOException {

        setSession(request.getSession());

        ModelParser parser =
                ModelParserFactory.getDefaultInstance().createModelParser();

        SendRequest sendRequest = parser.readSendRequest(
                request.getInputStream());

        IOUtils.closeQuietly(request.getInputStream());

        // Create an internal message service to process the request.
        InternalMessageService service =
                (InternalMessageService)MessageServiceFactory.
                        getDefaultInstance().createMessageService("internal:");

        Failures failures;
        try {
            failures = service.process(sendRequest, session);
        } catch (MessageServiceException e) {
            throw new ServletException(e.getMessage(), e);
        }

        response.setStatus(HttpServletResponse.SC_OK);
        parser.write(failures, response.getOutputStream());
        IOUtils.closeQuietly(response.getOutputStream());
    }
View Full Code Here

Examples of com.volantis.mps.bms.impl.ser.ModelParser

        if (sendRequest == null) {
            throw new IllegalArgumentException(EXCEPTION_LOCALIZER.format(
                    "argument-is-null", "SendRequest"));
        }

        ModelParser parser =
                ModelParserFactory.getDefaultInstance().createModelParser();
        InputStream inputXML = getObjectsAsXMLInputStream(parser, sendRequest);

        // InputStream gets closed in the doPOST method.
        return doRequest(inputXML, parser);
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case002-Repositories.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getRepositories());
    assertEquals(gedcom.getRepositories().size(), 7);
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case004-SourceRecords.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getPeople());
    assertNotNull(gedcom.getSources());
    assertNotNull(gedcom.getRepositories());
    assertEquals(gedcom.getSources().size(), 20);
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case009-Family.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    gedcom.createIndexes();
    assertNotNull(gedcom);
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case006-PersonsFacts.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getPeople());
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case008-SubmitterRecord.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getSubmitter());
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case005-PersonsGender.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getPeople());
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case003-PersonsName.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getPeople());
  }
View Full Code Here

Examples of org.folg.gedcom.parser.ModelParser

  @BeforeClass
  public void setUp() throws Exception {
    SequentialIdentifierGenerator.reset();
    URL gedcomUrl = this.getClass().getClassLoader().getResource("Case007-SourceCitations.ged");
    File gedcomFile = new File(gedcomUrl.toURI());
    ModelParser modelParser = new ModelParser();

    gedcom = modelParser.parseGedcom(gedcomFile);
    assertNotNull(gedcom);
    assertNotNull(gedcom.getPeople());
    assertEquals(gedcom.getPeople().size(), 5);
    assertNotNull(gedcom.getFamilies());
    assertEquals(gedcom.getFamilies().size(), 2);
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.