Examples of Pic


Examples of com.github.jmkgreen.morphia.TestQuery.Pic

    assertEquals(13D, cLoaded.getRadius(), 0D);
  }
 
  @Test @Ignore("waiting on SERVER-1470 bug; dbref is not included from query on upsert")
    public void testInsertWithRef() throws Exception {
    Pic pic = new Pic();
    pic.name = "fist";
    Key<Pic> picKey = ds.save(pic);

    //test with Key<Pic>
    UpdateResults<ContainsPic> res = ds.updateFirst(
View Full Code Here

Examples of com.github.jmkgreen.morphia.TestQuery.Pic

    ContainsPic cp = new ContainsPic();
    cp.name = "cp one";

    Key<ContainsPic> cpKey = ds.save(cp);
   
    Pic pic = new Pic();
    pic.name = "fist";
    Key<Pic> picKey = ds.save(pic);


    //test with Key<Pic>
View Full Code Here

Examples of com.github.jmkgreen.morphia.TestQuery.Pic

    ContainsPicKey cpk = new ContainsPicKey();
    cpk.name = "cpk one";

    Key<ContainsPicKey> cpKey = ds.save(cpk);
   
    Pic pic = new Pic();
    pic.name = "fist again";
    Key<Pic> picKey = ds.save(pic);
//    picKey = ds.getKey(pic);

View Full Code Here

Examples of org.docx4j.dml.picture.Pic

      || wmlPkg.getMainDocumentPart() == null
      || wmlPkg.getMainDocumentPart().getRelationshipsPart() == null) {
      return null;
    }
   
    Pic pic = graphic.getGraphicData().getPic();
    String rId = pic.getBlipFill().getBlip().getEmbed();
    if (rId.equals("")) {
      rId = pic.getBlipFill().getBlip().getLink();
    }
    log.debug("Image rel id: " + rId);
    org.docx4j.relationships.Relationship rel =
      wmlPkg.getMainDocumentPart().getRelationshipsPart().getRelationshipByID(rId);
    if (rel != null) {
View Full Code Here

Examples of org.docx4j.dml.picture.Pic

     
      converter.readDimensions();
      converter.readHyperlink();
     
     
      Pic pic = converter.getPic();
      if (pic==null) {
        log.error("pic missing!!");
        debug(converter);
        return null;       
      }
     
      if (pic.getBlipFill()==null
          || pic.getBlipFill().getBlip()==null) {
        log.error("blip missing!!");
        return null;               
      }
     
      CTBlip blip = pic.getBlipFill().getBlip();
     
      String imgRelId = blip.getEmbed();
      if ((imgRelId == null) || (imgRelId.length() == 0)) {
        imgRelId = blip.getLink();
      }
View Full Code Here

Examples of org.mongodb.morphia.TestQuery.Pic

        assertEquals(13D, cLoaded.getRadius(), 0D);
    }

    @Test
    public void testInsertWithRef() throws Exception {
        final Pic pic = new Pic();
        pic.setName("fist");
        final Key<Pic> picKey = getDs().save(pic);

        //test with Key<Pic>
        UpdateResults res = getDs().updateFirst(getDs().find(ContainsPic.class, "name", "first").filter("pic", picKey),
                                                getDs().createUpdateOperations(ContainsPic.class).set("name", "A"), true);
View Full Code Here

Examples of org.mongodb.morphia.TestQuery.Pic

        final ContainsPic cp = new ContainsPic();
        cp.setName("cp one");

        getDs().save(cp);

        final Pic pic = new Pic();
        pic.setName("fist");
        final Key<Pic> picKey = getDs().save(pic);


        //test with Key<Pic>
        final UpdateResults res = getDs().updateFirst(getDs().find(ContainsPic.class, "name", cp.getName()),
                                                      getDs().createUpdateOperations(ContainsPic.class).set("pic", pic));

        assertEquals(1, res.getUpdatedCount());

        //test reading the object.
        final ContainsPic cp2 = getDs().find(ContainsPic.class).get();
        assertNotNull(cp2);
        assertEquals(cp2.getName(), cp.getName());
        assertNotNull(cp2.getPic());
        assertNotNull(cp2.getPic().getName());
        assertEquals(cp2.getPic().getName(), pic.getName());

        getDs().updateFirst(getDs().find(ContainsPic.class, "name", cp.getName()),
                            getDs().createUpdateOperations(ContainsPic.class).set("pic", picKey));

        //test reading the object.
        final ContainsPic cp3 = getDs().find(ContainsPic.class).get();
        assertNotNull(cp3);
        assertEquals(cp3.getName(), cp.getName());
        assertNotNull(cp3.getPic());
        assertNotNull(cp3.getPic().getName());
        assertEquals(cp3.getPic().getName(), pic.getName());
    }
View Full Code Here

Examples of org.mongodb.morphia.TestQuery.Pic

        final ContainsPicKey cpk = new ContainsPicKey();
        cpk.name = "cpk one";

        getDs().save(cpk);

        final Pic pic = new Pic();
        pic.setName("fist again");
        final Key<Pic> picKey = getDs().save(pic);
        // picKey = getDs().getKey(pic);


        //test with Key<Pic>
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.