Examples of Document


Examples of hu.jokeman.xparser.impl.document.nodes.Document

                    "Comments not allowed here.");
        }
    }
   
    public void createDocument () {
        _rootNode = new Document ();
        _currentNodes = new Stack<XMLNode> ();
        push (_rootNode);
    }
View Full Code Here

Examples of it.eng.spagobi.engines.documentcomposition.configuration.DocumentCompositionConfiguration.Document

    // Cycle on all documents in document composition
    Map docMap=dcConf.getDocumentsMap();
    for (Iterator iterator = docMap.keySet().iterator(); iterator.hasNext();) {
      Object key = (Object) iterator.next();
      Document doc=(Document)docMap.get(key);
      String label=doc.getSbiObjLabel();
      logger.debug("Document "+label);

      // get document container information
      DocumentContainer documentContainer=documentsMap.get(label);
View Full Code Here

Examples of it.unimi.di.big.mg4j.document.Document

          throws IOException {
        Long2LongRBTreeMap relFreq = new Long2LongRBTreeMap();
        relFreq.defaultReturnValue(0);

        for (int i = 0; i < min(k, results.size()); i++) {
          Document document = collection
              .document(results.get(i).document);
          Reader reader = (Reader) document.content(fieldIndex);
          WordReader wordReader = document.wordReader(fieldIndex);
          wordReader.setReader(reader);

          MutableString word = new MutableString();
          MutableString nonWord = new MutableString();
          final LongRBTreeSet set = new LongRBTreeSet();

          while (wordReader.next(word, nonWord)) {
            if (processor.processTerm(word)) {
              long termId = index.getTermId(word);
              if (termId >= 0)
                if (set.add(termId))
                  relFreq
                      .put(termId,
                          relFreq.get(termId) + 1);
            }
          }

          document.close();

        }
        return relFreq;
      }
View Full Code Here

Examples of it.unimi.dsi.mg4j.document.Document

        final int document = dsi.document;
       
        output.print( "Document #" + document );
        output.printf( " [%.6f]", dsi.score );
       
        Document d = null; // Filled lazily
       
        // We try to print a title, preferring the supplied title list if present
        if ( titleList != null ) output.println( " " + titleList.get( document ) );
        else if ( documentCollection != null ) {
          d = documentCollection.document( document );
          output.println( " " + d.title().toString().trim() );
          d.close();
        }
        else output.println();
       
        if ( ( displayMode == OutputType.LONG || displayMode == OutputType.SNIPPET ) && dsi.info != null && queryEngine.intervalSelector != null ) {
          final Index[] sortedIndex = dsi.info.keySet().toArray( new Index[ 0 ] );
          if ( documentCollection != null ) Arrays.sort( sortedIndex, new Comparator<Index>() {
            public int compare( final Index i0, final Index i1 ) {
              return documentCollection.factory().fieldIndex( i0.field ) - documentCollection.factory().fieldIndex( i1.field );
            }} );
          for( Index index: sortedIndex )
            if ( index.hasPositions ) {
              SelectedInterval[] interval = dsi.info.get( index );
              if ( interval == SelectedInterval.TRUE_ARRAY ) output.println( index.field + ": TRUE" );
              else if ( interval == SelectedInterval.FALSE_ARRAY ) output.println( index.field + ": FALSE" );
              else if ( displayMode == OutputType.LONG || documentCollection == null ) output.println( index.field + ": " + Arrays.toString( interval ) );
              else { // SNIPPET_MODE
                final MarkingMutableString s = new MarkingMutableString( marker );
                s.startField( interval );
                // TODO: this must be in increasing field order
                if ( d == null ) d = documentCollection.document( document );
                int fieldIndex = documentCollection.factory().fieldIndex( index.field );
                if ( fieldIndex == -1 || documentCollection.factory().fieldType( fieldIndex ) != DocumentFactory.FieldType.TEXT ) continue;
                final Reader reader = (Reader)d.content( fieldIndex );
                s.appendAndMark( d.wordReader( fieldIndex ).setReader( reader ) );
                s.endField();
                d.close();
                output.println( index.field + ": " + s.toString() );
              }
            }
            else if ( index.hasPayloads && dsi.info.get( index ) == SelectedInterval.TRUE_ARRAY ) {
              if ( d == null ) d = documentCollection.document( document );
              int fieldIndex = documentCollection.factory().fieldIndex( index.field );
              if ( fieldIndex == -1 ) continue;
              output.println( d.content( fieldIndex ) );
            }
          output.println();
        }
      }
    }
View Full Code Here

Examples of javax.swing.text.Document

        settings.setNrDays(-1);
        SearchHelper.search(mInfoEP, settings, null, true);
      }

      private String getLink(int pos, JEditorPane html) {
        Document doc = html.getDocument();
        if (doc instanceof HTMLDocument) {
          HTMLDocument hdoc = (HTMLDocument) doc;
          Element e = hdoc.getCharacterElement(pos);
          AttributeSet a = e.getAttributes();
          AttributeSet anchor = (AttributeSet) a.getAttribute(HTML.Tag.A);
View Full Code Here

Examples of jease.cms.domain.Document

    });
    getButtons().appendChild(showText);
  }
 
  private void showText() {
    Document currentNode = getNode();
    try {
      copyObject();
      saveEditorToObject();
      getNode().setParent(null);
      Textarea textarea = new Textarea();
View Full Code Here

Examples of jodd.lagarto.dom.Document

  /**
   * Sets the HTML contents of each element in the set of matched elements.
   */
  public Jerry html(String html) {
    final Document doc = builder.parse(html);

    for (Node node : nodes) {
      node.removeAllChilds();

      // clone to preserve for next iteration
      // as nodes will be detached from parent
      Document workingDoc = doc.clone();

      node.addChild(workingDoc.getChildNodes());
    }
    return this;
  }
View Full Code Here

Examples of kameleon.document.Document

   *       if there is an error while reading
   */
  private static Document readFromFile(InputStream is) throws IOException {
    ObjectInputStream in = new ObjectInputStream(is) ;
    try {
      Document doc = (Document) in.readObject() ;
      in.close() ;
      return doc ;
    } catch (ClassNotFoundException e) {
      //TODO Find better solution ?
      // Throw an IOException to trigger a throw of a FileReadingException
View Full Code Here

Examples of ketUI.Document

    if ( ! getDocument().getFrameManager().isStandAlone() ) {
      Ket.out.println("[Can't open "+filename+"]");
      return;
    }
    DocumentManager documentManager = getDocument().getDocumentManager();
    Document document = new Document(documentManager, null, filename);
    document.getKetPanel().toggleGridDisplay();
    if (documentManager!=null) {
      documentManager.addDocument(document);
    }
  }
View Full Code Here

Examples of list.Document

   }

   @Override
   public String call( )
   {
      Document doc = new Document( filename );
     
      return ( "Results for document \"" + filename + "\":\n\n"
               + ComparisonTable.getTable( doc.getExistingList( ),
                                           doc.getNewList( ) )
               + "\n"
               + doc.toString( ) );
   }
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.