Package org.openntf.domino

Examples of org.openntf.domino.EmbeddedObject$Schema


            return doc;
        }

        private void addSchema(Document doc, String id, SimpleFeatureType featureType) {
            Schema schema = doc.createAndAddSchema();
            schema.setId(id);
            schema.setName(id);
            for (AttributeDescriptor ad : featureType.getAttributeDescriptors()) {
                // skip geometry attributes
                if (ad instanceof GeometryDescriptor) {
                    continue;
                }

                SimpleField field = schema.createAndAddSimpleField();
                field.setName(ad.getLocalName());
                field.setType(getKmlFieldType(ad));
            }
        }
View Full Code Here


  public Map<String, byte[]> getClassData() {
    // For this one, we'll need the note in the database
    Document doc = getDocument();
    if (doc != null) {
      try {
        EmbeddedObject obj = doc.getAttachment("%%object%%.jar");

        InputStream objInputStream = obj.getInputStream();
        JarInputStream jis = new JarInputStream(objInputStream);
        JarEntry entry = jis.getNextJarEntry();
        Map<String, byte[]> classData = new TreeMap<String, byte[]>();
        while (entry != null) {
          String name = entry.getName();
View Full Code Here

  public void addAttachments(final MIMEEntity parent) {
    try {
      Stream streamFile = null;
      for (IEmailAttachment attach : getAttachments()) {
        InputStream is = null;
        EmbeddedObject eo = null;

        String fileName = attach.getFileName();
        // Get content type
        String contentType = URLConnection.guessContentTypeFromName(fileName);
        if (null == contentType) {
          contentType = "application/octet-stream";
        }
        int idex = StringUtil.indexOfIgnoreCase(fileName, ".", fileName.length() - 6);
        if (idex > -1) {
          String extension = fileName.substring(idex);
          if (StringUtil.equals("gif", extension)) {
            contentType = "image/gif";
          } else if (StringUtil.equals("jpg", extension) || StringUtil.equals("jpeg", extension)) {
            contentType = "image/jpeg";
          } else if (StringUtil.equals("png", extension)) {
            contentType = "image/png";
          }
        }
        contentType += "; name=\"" + fileName + "\"";

        try {
          Type attachmentType = attach.getAttachmentType();
          if (attachmentType == Type.DOCUMENT) {
            //retrieve the document containing the attachment to send from the relevant
            Database dbFile = getSession().getDatabase(getSession().getServerName(), attach.getDbPath());
            Document docFile = dbFile.getDocumentByUNID(attach.getUnid());
            if (null != docFile) {
              eo = docFile.getAttachment(attach.getFileName());
              is = eo.getInputStream();
            }
          } else if (attachmentType == Type.FILE) {
            is = new FileInputStream(attach.getPath() + attach.getFileName());
          } else if (attachmentType == Type.STREAM) {
            is = attach.getInputStream();
View Full Code Here

TOP

Related Classes of org.openntf.domino.EmbeddedObject$Schema

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.