Examples of Variant


Examples of com.android.builder.model.Variant

        if (androidUnitTest != null) {
            LOGGER.warn("Using version <= 1.4.0 of the unit-test-plugin may not be supported in the future.");
        }

        if (androidProject != null) {
            Variant selectedVariant = getVariantToSelect(androidProject);
            IdeaAndroidUnitTest ideaAndroidUnitTest =  new IdeaAndroidUnitTest(gradleModule.getName(), moduleRootDirPath, androidProject, androidUnitTest, selectedVariant.getName());
            ideModule.createChild(AndroidUnitTestKeys.IDEA_ANDROID_UNIT_TEST, ideaAndroidUnitTest);
        }
    }
View Full Code Here

Examples of com.dbxml.labrador.types.Variant

      if ( res != null )
         res = Context.toString(res);
      Context.exit();

    if ( res != null )
      return new Variant(res);
    else
      return null;
   }
View Full Code Here

Examples of com.google.api.services.genomics.model.Variant

        .setCallSetIds(Lists.newArrayList("id1"))
        .setPageSize(10)))
        .thenReturn(variantSearch);
    Mockito.when(variantSearch.execute()).thenReturn(
        new SearchVariantsResponse().setVariants(
            Lists.newArrayList(new Variant().setReferenceName("contig"))));

    command.handleRequest(genomics);

    String output = outContent.toString();
    assertTrue(output, output.contains("No call sets found with the name c2"));
View Full Code Here

Examples of com.jacob.com.Variant

      mLog.info("Starting MS Word");
      mWordApplication = new Application();

      // Word unsichtbar machen
      // mWordApplication.setVisible(false);
      Dispatch.put(mWordApplication, "Visible", new Variant(false));
    }

    try {
      // Dokument �ffnen (Bei Konvertierung nicht fragen und Read only)
      // Workaround: Wenn das Dokument von einer anderen Person bearbeitet wird,
      //             dann erscheint ein Popup. Um das zu verhindern, wird in
      //             jedem Fall (auch bei file-Dokumenten) anstatt der
      //             Originaldatei eine tempor�re Kopie genutzt, da diese
      //             unm�glich von jemandem bearbeitet werden kann.
      String fileName = rawDocument.getContentAsFile(true).getAbsolutePath();
      Documents docs = mWordApplication.getDocuments();
      Document doc = docs.open(new Variant(fileName),
                               new Variant(false),    // confirmConversions
                               new Variant(true));    // readOnly

      // iterate through the sections
      StringBuffer content = new StringBuffer(DEFAULT_BUFFER_SIZE);
      Sections sections = doc.getSections();
      for (int i = 1; i <= sections.getCount(); i++) {
        Section sec = sections.item(i);

        // Get the header of the first section as title
        if (i == 1) {
          int headerFirstPage = WdHeaderFooterIndex.wdHeaderFooterFirstPage;
          HeaderFooter firstHeader = sec.getHeaders().item(headerFirstPage);
          String title = firstHeader.getRange().getText();
          setTitle(title);
        }

        // Get the text
        sec.getRange().select();
        content.append(getSelection(mWordApplication) + "\n");
      }

      // iterate through the shapes
      Shapes shapes = doc.getShapes();
      for (int i = 1; i <= shapes.getCount(); i++) {
        Shape shape = shapes.item(new Variant(i));
        appendShape(shape, content);
      }
     
      // iterate through the paragraphs and extract the headlines
      StringBuffer headlines = null;
      if ((mHeadlineStyleNameSet != null) && (! mHeadlineStyleNameSet.isEmpty())) {
        Paragraphs paragraphs = doc.getParagraphs();
        for (int i = 1; i <= paragraphs.getCount(); i++) {
          Paragraph paragraph = paragraphs.item(i);
         
          // Get the name of the style for this paragraph
          // NOTE: See the Style class for getting other values from the style
          Object styleDispatch = paragraph.getFormat().getStyle().getDispatch();
          String formatName = Dispatch.get(styleDispatch, "NameLocal").toString();
         
          if (mHeadlineStyleNameSet.contains(formatName)) {
            // This paragraph is a headline -> add it to the headlines StringBuffer
           
            // Extract the text
            paragraph.getRange().select();
            String text = getSelection(mWordApplication);
            text = removeBinaryStuff(text);
           
            // Add it to the headlines
            if (headlines == null) {
              headlines = new StringBuffer();
            }
            headlines.append(text + "\n");
           
            if (mLog.isDebugEnabled()) {
              mLog.debug("Extracted headline: '" + text + "'");
            }
          }
        }
      }
     
      // Read the document properties
      readProperties(doc);
     
      // Set the extracted text and the headlines
      setCleanedContent(content.toString());
      if (headlines != null) {
        setHeadlines(headlines.toString());
      }

      // Dokument schlie�en (ohne Speichern)
      doc.close(new Variant(false));
    }
    catch (ComFailException exc) {
      throw new RegainException("Using COM failed.", exc);
    }
  }
View Full Code Here

Examples of com.jacob.com.Variant

      buffer.append(getSelection(mWordApplication) + "\n");
    }
    else if (shapeName.startsWith("Group ")) {
      GroupShapes group = shape.getGroupItems();
      for (int i = 1; i <= group.getCount(); i++) {
        Shape child = group.item(new Variant(i));
        appendShape(child, buffer);
      }
    }
  }
View Full Code Here

Examples of com.jacob.com.Variant

   * @param row an input-parameter of type int
   * @param col an input-parameter of type int
   * @return the result is of type Range
   */
  public Range getCells(Worksheet sheet, int row, int col) {
    return new Range(Dispatch.call(sheet, "Cells", new Variant(row),
        new Variant(col)).toDispatch());
  }
View Full Code Here

Examples of com.jacob.com.Variant

    }
    //Dispatch.put(mExcelApplication, "Visible", new Variant(true));

    try {
      // Some constants needed later on
      Variant what = new Variant("*");
      Variant lookIn = new Variant(-4163);
      Variant lookAt = new Variant(XlLookAt.xlWhole);
      Variant searchOrderByRows = new Variant(XlSearchOrder.xlByRows);
      Variant searchOrderByCols = new Variant(XlSearchOrder.xlByColumns);
      int searchDirectionUp = XlSearchDirection.xlNext;
      int searchDirectionDown = XlSearchDirection.xlPrevious;
      Variant xlFalse = new Variant(false);   

      // Get all workbooks
      Workbooks wbs = mExcelApplication.getWorkbooks();

      // Open the file
      java.io.File file = rawDocument.getContentAsFile();
      // RB 20051106: Need to add second argument to open call, otherwise Excel
      // can hang here waiting for an answer to the dialogue box asking to
      // update external links
      Workbook wb = wbs.open(file.getAbsolutePath(), new Variant(0));

      // Collect the content of all sheets
      Sheets sheets = wb.getWorksheets();
      int sheetCount = sheets.getCount();

      //System.out.println("Sheetcount = "+sheetCount);
      StringBuffer contentBuf = new StringBuffer(DEFAULT_BUFFER_SIZE);
      for (int sheetIdx = 1; sheetIdx <= sheetCount; sheetIdx++) {
        Variant sheetVariant = (Variant) sheets.getItem(new Variant(sheetIdx));
        Worksheet sheet = new Worksheet(sheetVariant.toDispatch());
        Variant after = new Variant(sheet.getRange(new Variant("IV65536")));
        Range extractRange;
        // Find the top left and bottom right corner enclosing the data in the sheet
        try {
          // The following calls may fail because the find operation returns
          // a null pointer. This exception is caught by reverting to the
          // UsedRange call which also returns the used area in a spreadsheet,
          // even though it is often bigger than necessary.
          int firstRow = sheet.getCells().find(what, after, lookIn, lookAt, searchOrderByRows,
                  searchDirectionUp, xlFalse, xlFalse).getRow();
          int firstCol = sheet.getCells().find(what, after, lookIn, lookAt, searchOrderByCols,
              searchDirectionUp, xlFalse, xlFalse).getColumn();
          int lastRow = sheet.getCells().find(what, after, lookIn, lookAt, searchOrderByRows,
                  searchDirectionDown, xlFalse, xlFalse).getRow();
          int lastCol = sheet.getCells().find(what, after, lookIn, lookAt, searchOrderByCols,
                  searchDirectionDown, xlFalse, xlFalse).getColumn();
          extractRange = sheet.getRange(new Variant(getCells(sheet, firstRow, firstCol)),
                                        new Variant(getCells(sheet, lastRow, lastCol)));
          //System.out.println("Sheet "+sheetIdx+"   ProperUsedRange="+extractRange.getAddress());       
        } catch(NullPointerException e) {
          extractRange = sheet.getUsedRange();
          //System.out.println("Sheet "+sheetIdx+"   UsedRange="+extractRange.getAddress());       
        }
        //RB 20051106: If the sheet is empty, getUsedRange returns $A$1 and
        // toSafeArray fails. Therefore we have to check that there is some text
        // to extract by comparing the address of the range to the string "$A$1".
        if (!extractRange.getAddress().equals("$A$1")) {
          SafeArray cellArray = extractRange.getValue().toSafeArray();

          int startRow = cellArray.getLBound(1);
          int startCol = cellArray.getLBound(2);
          int endRow   = cellArray.getUBound(1);
          int endCol   = cellArray.getUBound(2);
 
          for (int row = startRow; row <= endRow; row++) {
            for (int col = startCol; col <= endCol; col++) {
              String cellValue = cellArray.getString(row, col);
              if ((cellValue != null) && (cellValue.length() != 0)) {
                contentBuf.append(cellValue);
                contentBuf.append(" ");
              }
            }
            contentBuf.append("\n");
          }
        }
      }
     
      // Read the document properties
      readProperties(wb);
     
      // Set the content
      setCleanedContent(contentBuf.toString());

      // Close the workbook without saving
      wb.close(new Variant(false));
    }
    catch (ComFailException exc) {
      throw new RegainException("Using COM failed.", exc);
    }
  }
View Full Code Here

Examples of com.jacob.com.Variant

  {
    super(extentionArr);
   
    // NOTE: See: http://mypage.bluewin.ch/reprobst/WordFAQ/DokEigen.htm#DokEigen04
    mPropertyMap = new HashMap();
    mPropertyMap.put("propTitle",       new Variant(1))// german: Titel
    mPropertyMap.put("subject",         new Variant(2))// german: Thema
    mPropertyMap.put("author",          new Variant(3))// german: Autor
    mPropertyMap.put("keywords",        new Variant(4))// german: Stichwoerter
    mPropertyMap.put("comments",        new Variant(5))// german: Kommentar
    mPropertyMap.put("template",        new Variant(6))// german: Vorlage
    mPropertyMap.put("lastAuthor",      new Variant(7))// german: Zuletzt gespeichert von
    mPropertyMap.put("revision",        new Variant(8))// german: Version
    // mPropertyMap.put("appName",      new Variant(9));  // N/A
    mPropertyMap.put("timeLastPrinted", new Variant(10)); // german: Gedruckt am
    mPropertyMap.put("timeCreated",     new Variant(11)); // german: Erstellt am
    mPropertyMap.put("timeLastSaved",   new Variant(12)); // german: Geaendert am
    mPropertyMap.put("totalEditTime",   new Variant(13)); // german: Gesamtbearbeitungszeit
    mPropertyMap.put("pages",           new Variant(14)); // german: Seiten
    mPropertyMap.put("words",           new Variant(15)); // german: Woerter
    mPropertyMap.put("characters",      new Variant(16)); // german: Zeichen (ohne Leerzeichen)
    mPropertyMap.put("security",        new Variant(17)); // german: Dokumentenschutz
    mPropertyMap.put("category",        new Variant(18)); // german: Kategorie
    // mPropertyMap.put("format",       new Variant(19)); // N/A
    mPropertyMap.put("manager",         new Variant(20)); // german: Manager
    mPropertyMap.put("company",         new Variant(21)); // german: Firma
    mPropertyMap.put("bytes",           new Variant(22)); // german: Bytes
    mPropertyMap.put("lines",           new Variant(23)); // german: Zeilen
    mPropertyMap.put("paras",           new Variant(24)); // german: Absätze
    mPropertyMap.put("slides",          new Variant(25)); // N/A (MS PowerPoint)
    mPropertyMap.put("notes",           new Variant(26)); // N/A (MS PowerPoint)
    mPropertyMap.put("hiddenSlides",    new Variant(27)); // N/A (MS PowerPoint)
    mPropertyMap.put("mmClips",         new Variant(28)); // N/A (MS PowerPoint)
    mPropertyMap.put("hyperlinkBase",   new Variant(29)); // german: Hyperlinkbasis
    mPropertyMap.put("charsWSpaces",    new Variant(30)); // german: Buchstaben (mit Leerzeichen)
  }
View Full Code Here

Examples of com.jacob.com.Variant

    if (mWantedPropertiesArr != null) {
      for (int i = 0; i < mWantedPropertiesArr.length; i++) {
        // NOTE: We should always get a propertyConstant here since we checked
        //       it in the readConfig method.
        String propertyName = mWantedPropertiesArr[i];
        Variant propertyConstant = (Variant) mPropertyMap.get(propertyName);
        Object property = Dispatch.call(document, "BuiltInDocumentProperties", propertyConstant).getDispatch();
        String value = Dispatch.get(property, "Value").toString();
       
        addAdditionalField(propertyName, value);
      }
View Full Code Here

Examples of com.jclark.xsl.expr.Variant

    }

    public void invoke(ProcessContext context, Node sourceNode,
                       Result result) throws XSLException
    {
        Variant value = context.getParam(name);

        // was it passed in the context?
        if (value == null) {
            // no, use the default value
            value = expr.eval(sourceNode, context);
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.