Package org.docx4j.wml

Examples of org.docx4j.wml.SdtPr$Group


   
    Option charsetOpt = obuilder.withLongName("charset").withRequired(true).withArgument(
        abuilder.withName("charset").withMinimum(1).withMaximum(1).create()).withDescription(
        "The name of the character encoding of the input files").withShortName("c").create();
   
    Group group = gbuilder.withName("Options").withOption(inputDirOpt).withOption(trainingOutputDirOpt)
         .withOption(testOutputDirOpt).withOption(testSplitSizeOpt).withOption(testSplitPctOpt)
         .withOption(splitLocationOpt).withOption(randomSelectionSizeOpt).withOption(randomSelectionPctOpt)
         .withOption(charsetOpt).create();
   
    try {
View Full Code Here


    Option bodySeparatorOpt = obuilder.withLongName("bodySeparator").withRequired(false).withArgument(
            abuilder.withName("bodySeparator").withMinimum(1).withMaximum(1).create()).
            withDescription("The separator to use between lines in the body.  Default is \\n.  Useful to change if you wish to have the message be on one line").withShortName("bodySep").create();
    Option helpOpt = DefaultOptionCreator.helpOption();

    Group group = gbuilder.withName("Options").withOption(keyPrefixOpt).withOption(chunkSizeOpt).withOption(
            charsetOpt).withOption(outputDirOpt).withOption(helpOpt).withOption(inputOpt).withOption(subjectOpt).withOption(toOpt)
            .withOption(fromOpt).withOption(bodyOpt).withOption(quotedOpt).withOption(refsOpt).withOption(bodySeparatorOpt)
            .withOption(quotedRegexOpt)
            .withOption(separatorOpt).create();
View Full Code Here

      abuilder.withName("v").withMinimum(1).withMaximum(1).create()).withDescription(
      "The vector implementation to use.").withShortName("v").create();
   
    Option helpOpt = DefaultOptionCreator.helpOption();
   
    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(outputOpt).withOption(
      vectorOpt).withOption(helpOpt).create();

    try {
      Parser parser = new Parser();
      parser.setGroup(group);
View Full Code Here

    Option overwriteOutput = obuilder.withLongName("overwrite").withRequired(false).withDescription(
      "If set, overwrite the output directory").withShortName("ow").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
        .create();
   
    Group group = gbuilder.withName("Options").withOption(minSupportOpt).withOption(analyzerNameOpt)
        .withOption(chunkSizeOpt).withOption(outputDirOpt).withOption(inputDirOpt).withOption(minDFOpt)
        .withOption(maxDFSigmaOpt).withOption(maxDFPercentOpt).withOption(weightOpt).withOption(powerOpt).withOption(minLLROpt)
        .withOption(numReduceTasksOpt).withOption(maxNGramSizeOpt).withOption(overwriteOutput)
        .withOption(helpOpt).withOption(sequentialAccessVectorOpt).withOption(namedVectorOpt)
        .withOption(logNormalizeOpt)
View Full Code Here

        .withDescription("Output path, will contain the Decision Forest").create();

    Option helpOpt = obuilder.withLongName("help").withShortName("h")
        .withDescription("Print out help").create();
   
    Group group = gbuilder.withName("Options").withOption(dataOpt).withOption(datasetOpt)
        .withOption(selectionOpt).withOption(noCompleteOpt).withOption(minSplitOpt)
        .withOption(minPropOpt).withOption(seedOpt).withOption(partialOpt).withOption(nbtreesOpt)
        .withOption(outputOpt).withOption(helpOpt).create();
   
    try {
View Full Code Here

            withDescription("Only dump out those vectors whose name matches the filter." +
            "  Multiple items may be specified by repeating the argument.").withShortName("fi").create();
    Option helpOpt = obuilder.withLongName("help").withDescription("Print out help").withShortName("h")
            .create();

    Group group = gbuilder.withName("Options").withOption(seqOpt).withOption(outputOpt)
                          .withOption(dictTypeOpt).withOption(dictOpt).withOption(csvOpt)
                          .withOption(vectorAsKeyOpt).withOption(printKeyOpt).withOption(sortVectorsOpt)
                          .withOption(filtersOpt).withOption(helpOpt).withOption(numItemsOpt)
                          .withOption(sizeOpt).withOption(numIndexesPerVectorOpt).create();
View Full Code Here

        abuilder.withName("count").withMinimum(1).withMaximum(1).create())
        .withDescription("Generations count.").create();

    Option helpOpt = DefaultOptionCreator.helpOption();

    Group group = gbuilder.withName("Options").withOption(inputOpt).withOption(helpOpt).withOption(labelOpt)
        .withOption(thresholdOpt).withOption(crosspntsOpt).withOption(mutrateOpt).withOption(mutrangeOpt)
        .withOption(mutprecOpt).withOption(popsizeOpt).withOption(gencntOpt).create();

    Parser parser = new Parser();
    parser.setGroup(group);
View Full Code Here

        // but since a tc can contain w:p or nested table,
        // we still need to recurse
       
      } else if (o instanceof SdtElement ) {
       
        SdtPr sdtPr = ((SdtElement)o).getSdtPr();
        if (sdtPr!=null) {
          Object o2 = sdtPr.getByClass(RPr.class);
          if (o2!=null) {
            RPr rPr = (RPr)o2;
            RStyle rStyle = rPr.getRStyle();
            if (rStyle!=null) {
              // Add it
View Full Code Here

            }
          }
        }
       
      } else if ( o instanceof SdtElement) {
        SdtPr sdtPr = ((SdtElement)o).getSdtPr();
        if (sdtPr!=null) {
          if (contains(sdtPr.getRPrOrAliasOrLock(), "http://schemas.microsoft.com/office/word/2010/wordml", w14SdtPrNames)) {
            needW14 = true;
          }
          if (contains(sdtPr.getRPrOrAliasOrLock(), "http://schemas.microsoft.com/office/word/2012/wordml", w15SdtPrNames)) {
            needW15 = true;
          }
        }
      } else if ( o instanceof Tr) {  // TODO does this need to be unwrapped?
        if ( ((Tr)o).getParaId()!=null) {
View Full Code Here

      // If the SDT was made to contain a w:hyperlink, we had to remove:
      //   <w:dataBinding w:storeItemID="{5448916C-134B-45E6-B8FE-88CC1FFC17C3}" w:xpath="/myxml[1]/element2[1]" w:prefixMappings=""/>
      //   <w:text w:multiLine="true"/>
      // Now we need to add those back in
      SdtElement sdt = (SdtElement)entry;
      SdtPr sdtPr = sdt.getSdtPr();
     
      if (sdtPr.getDataBinding()==null ) {
       
        // Identify xpathId
        Tag tag = sdtPr.getTag();
        HashMap<String, String> map = QueryString.parseQueryString(tag.getVal(), true);
        String xpathId= map.get(OpenDoPEHandler.BINDING_ROLE_XPATH);
       
        // Look up - throws InputIntegrityException if not found
        Xpath xp = xPathsPart.getXPathById(xpathId);
         
          // Create object for dataBinding
          CTDataBinding databinding = Context.getWmlObjectFactory().createCTDataBinding();
          sdtPr.setDataBinding(databinding);
              databinding.setXpath( xp.getDataBinding().getXpath());
              databinding.setPrefixMappings( xp.getDataBinding().getPrefixMappings());
              databinding.setStoreItemID( xp.getDataBinding().getStoreItemID() );   
             
          // Create object for text (wrapped in JAXBElement)
          CTSdtText sdttext = Context.getWmlObjectFactory().createCTSdtText();
          sdttext.setMultiLine(true);
          JAXBElement<org.docx4j.wml.CTSdtText> sdttextWrapped = Context.getWmlObjectFactory().createSdtPrText(sdttext);
          sdtPr.getRPrOrAliasOrLock().add( sdttextWrapped);
     
          // Empty the content
          sdt.getSdtContent().getContent().clear();
            // TODO resolve the binding sans hyperlink?
            // TODO eventuallyEmptyList stuff
View Full Code Here

TOP

Related Classes of org.docx4j.wml.SdtPr$Group

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.