Examples of Document


Examples of lotus.domino.Document

        Vector v = new Vector();
        v.add(FORM);
        v.add(id);
        ViewEntry e = database.getView("AllSnippetsById").getEntryByKey(v);
        if(e!=null) {
          Document doc = e.getDocument();
          Properties p = new Properties();
          String props = doc.getItemValueString("Properties");
          if(StringUtil.isNotEmpty(props)) {
            p.load(new StringReader(props));
          }
          String endpoint = p.getProperty("endpoint");
          if(StringUtil.isNotEmpty(endpoint)) {
            o.put("endpoint", FBSString.get(endpoint));
          }
          String baseDocUrl = doc.getItemValueString("basedocurl");
          if(StringUtil.isNotEmpty(baseDocUrl)) {
            o.put("doc_url", FBSString.get(baseDocUrl));
          }
          String json = doc.getItemValueString("Json");
          if(StringUtil.isNotEmpty(json)) {
            FBSValue value = (FBSValue)JsonParser.fromJson(new JsonJavaScriptFactory(jsContext), json);
            o.put("items", value);
          }
          fixAPIObject(o,baseDocUrl,unid);
View Full Code Here

Examples of lupos.rif.model.Document

   * Prefix -> Namespace
   */
  public Map<String, String> prefixMap = null;

  public Object visit(final CompilationUnit n, final IRuleNode argu) {
    final Document resultDoc = (Document) n.f0.accept(this, null);
    return resultDoc;
  }
View Full Code Here

Examples of mf.org.w3c.dom.Document

      builder = factory.newDocumentBuilder();
    } catch (ParserConfigurationException pce) {
      throw new CatalogException(CatalogException.UNPARSEABLE);
    }

    Document doc = null;

    try {
      //MF
      doc = (Document) builder.parse(is);
    } catch (SAXException se) {
      throw new CatalogException(CatalogException.UNKNOWN_FORMAT);
    }

    Element root = doc.getDocumentElement();

    String namespaceURI = Namespaces.getNamespaceURI(root);
    String localName    = Namespaces.getLocalName(root);

    String domParserClass = getCatalogParser(namespaceURI,
View Full Code Here

Examples of name.pehl.totoe.xml.client.Document

        {
            namespacesValue = null;
        }
        try
        {
            Document document = new XmlParser().parse(xmlValue, namespacesValue);
            if (contextValue != null && contextValue.trim().length() != 0)
            {
                contextNode = document.selectNode(contextValue);
            }
            else
            {
                contextNode = document;
            }
View Full Code Here

Examples of net.csdn.mongo.Document

* Date: 12-11-6
* Time: 下午2:34
*/
public class Insert {
    public static boolean execute(Document doc, boolean validate) {
        Document parent = doc._parent;
        if (parent != null) {
            Insert.execute(parent, validate);
        } else {
            doc.runCallbacks(Callbacks.Callback.before_save);
            //we cannot call doc.collection().remove() directly,because of the dam inheritance of static methods in java
View Full Code Here

Examples of net.fortytwo.twitlogic.persistence.beans.Document

                && TweetSyntax.URL_PATTERN.matcher(tweetUser.getUrl()).matches()) {
            // Note: we can't easily delete an existing homepage (removing its
            // rdf:type statement), as it might be the homepage of another
            // agent.  Therefore, "orphaned" Document resources are possible.

            Document homepage = designate(tweetUser.getUrl(), Document.class);
            agent.setHomepage(homepage);
        }

        if (null != tweetUser.getProfileImageUrl()
                && TweetSyntax.URL_PATTERN.matcher(tweetUser.getProfileImageUrl()).matches()) {
View Full Code Here

Examples of net.sf.clairv.index.document.Document

      for (int i = 1; i <= count; i++) {
        String colName = rsm.getColumnName(i);
        fieldNames.add(colName);
      }
      while (rs.next()) {
        Document doc = docFactory.createDocument();
        for (Iterator itr = fieldNames.iterator(); itr.hasNext(); ) {
          String name = (String)itr.next();
          // XXX could do some tweak by eliminating the lookup
          Object obj = rs.getObject(name);
          String content = null;
          if (obj instanceof Date) {
            content = format.format((Date) obj);
          } else {
            content = rs.getObject(name).toString();
          }
          Pair type = (Pair) fieldTypeMappings.get(name);
          log.debug("Adding a field of name \"" + name
              + "\" with content: " + content);
          if (type != null) {
            doc.addField(name, content, (StoreOption)(type.t), (IndexOption)(type.v));
          } else {
            log.warn("Type of filed " + name + " is not mapped; "
                + "regarding as stored and untokenized");
            doc.addField(name, content, StoreOption.YES, IndexOption.UN_TOKENIZED);
          }
        }
        holder.addDocument(doc);
        docCount++;
      }
View Full Code Here

Examples of net.sf.jhylafax.fax.Document

    int row = getSelectedRow();
    if (row == -1) {
      return null;
    }
    else {
      Document doc = docTableModel.getDocument(row);
      return new FileStat(doc.getFilename(), doc.getFilesize());
    }
  }
View Full Code Here

Examples of net.sf.jpluck.jxl.Document

        }
    }

    public static void editDefault(JFrame owner) throws SAXException, IOException {
        owner.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
        Document document = ClientConfiguration.getDefault().getDefaultDocument();
        DocumentDialog dlg = new DocumentDialog(owner);
        dlg.editingDefault = true;
        dlg.initComponents(false);
        dlg.banner.showSheet("editDefault");
        if (document == null) {
            JXL jxl = new JXL();
            Element site = jxl.createSiteElement();
            org.w3c.dom.Document dom = site.getOwnerDocument();
            Element name = dom.createElement("name");
            name.appendChild(dom.createTextNode("default"));
            site.appendChild(dom.createElement("uri"));
            document = jxl.add(site);
            jxl.save(new File(ClientConfiguration.getDefault().getDefaultJXLPath()));
        } else {
            dlg.initValues(document);
        }
        owner.setCursor(Cursor.getDefaultCursor());
        dlg.setLocationRelativeTo(owner);
        dlg.nameText.setText("");
        dlg.setTitle("Default Settings");
        dlg.show();
        if (!dlg.isCancelled()) {
            dlg.update(document);
            document.getJXL().save();
        }
    }
View Full Code Here

Examples of net.sf.jpluck.plucker.Document

        String name = jxlDocument.getName();
        if (jxlDocument.isRemoveAccents()) {
          name = Database.convertToDatabaseName(name);
        }
        Document document = new Document(name, ClientConfiguration.getDefault().getCompression());

        Date date = jxlDocument.getDate();
        if (date != null) {
          document.setCreationDate(date);
          document.setModificationDate(date);
        }
        spider = new Spider(document, jxlDocument, httpCache, cookieStore, maxConnections,
                  Spider.DEFAULT_MAX_PARSE_THREADS, httpTimeout);
        try {
          for (Iterator iterator = spiderListenerList.iterator(); iterator.hasNext();) {
            SpiderListener spiderListener = (SpiderListener) iterator.next();
            spider.addSpiderListener(spiderListener);
          }
          if (!running) {
            break;
          }
          spider.run();
        } finally {
          for (Iterator iterator = spiderListenerList.iterator(); iterator.hasNext();) {
            SpiderListener spiderListener = (SpiderListener) iterator.next();
            spider.removeSpiderListener(spiderListener);
          }
        }

        boolean success = false;
        if (!running) {
          break;
        }

        String uri = jxlDocument.getStartingURI().toString();
        if (document.contains(uri)) {
          try {
            document.setHome(uri);
            document.setOutputEncoding(jxlDocument.getOutputEncoding());
            document.setIncludeImageAltText(jxlDocument.isIncludeAltText());
            document.setCategories(jxlDocument.getCategories());
            document.setDefaultLinkColor(jxlDocument.getLinkColor());
            document.setUnresolvedLinkColor(jxlDocument.getUnresolvedLinkColor());
            document.setRemoveUnresolvedLinks(jxlDocument.isRemoveUnresolvedLinks());
            document.setIncludeURIInfo(jxlDocument.isIncludeURIInfo());
            document.setBackup(jxlDocument.isSetBackupBit());
            document.setEncoding(jxlDocument.getOutputEncoding());
            // Sort bookmarks for sites
            if (jxlDocument instanceof Site) {
              Site site = (Site) jxlDocument;
              if (site.isSortBookmarks()) {
                document.sortBookmarks();
              }
            }

            fireGenerationStarted(jxlDocument);
            for (Iterator it = recordListenerList.iterator(); it.hasNext();) {
              document.addRecordListener((RecordListener) it.next());
            }
            document.setFilename(jxlDocument.getFilename());
            long size = destination.write(document);
            jxlDocument.converted(size);
            fireGenerationCompleted(jxlDocument);
            logger.info("Completed conversion: " + jxlDocument.getName());
            success = true;
          } catch (Exception e) {
            logger.severe("Could not generate document: " + e.getClass() + " " + e.getMessage());
            e.printStackTrace();
          } finally {
            for (Iterator it = recordListenerList.iterator(); it.hasNext();) {
              document.removeRecordListener((RecordListener) it.next());
            }
          }
        } else {
          logger.severe(jxlDocument.getName() + ": could not load starting URI " + jxlDocument.getUri() +
                  ". Document cannot be generated.");
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.