Codota Logo
Tag
Code IndexAdd Codota to your IDE (free)

How to use
Tag
in
org.docx4j.wml

Best Java code snippets using org.docx4j.wml.Tag (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: plutext/docx4j

private void setTag(SdtBlock sdtList, BigInteger numId, BigInteger ilvl) {
  Tag tag = new Tag();
  sdtPr.setTag(tag);
    tag.setVal("HTML_ELEMENT=OL");
    return;
    tag.setVal("HTML_ELEMENT=OL");
    return;
    tag.setVal("HTML_ELEMENT=OL");
    return;			
    tag.setVal("HTML_ELEMENT=UL");			
  } else {
    tag.setVal("HTML_ELEMENT=OL");						
origin: plutext/docx4j

  private void emptyRepeatTagValue(final Tag tag) {
    
    if (tag==null) {
      // TODO: this is ok for a w15 repeat
      log.warn("No tag");
      return;
    }

    final String tagVal = tag.getVal();
    final Pattern stripRepeatArgPattern = Pattern
        .compile("(.*od:repeat=)([^&]*)(.*)");
    final Matcher stripPatternMatcher = stripRepeatArgPattern
        .matcher(tagVal);
    if (!stripPatternMatcher.matches()) {
      log.error("Cannot find repeat tag in sdtPr/tag while processing repeat; something is wrong with " + tagVal);
      return;
    }
//        final String emptyRepeatValue = stripPatternMatcher.group(1)
//                + stripPatternMatcher.group(3);
    final String emptyRepeatValue = BINDING_RESULT_RPTD + "=" + stripPatternMatcher.group(2) + stripPatternMatcher.group(3);
    tag.setVal(emptyRepeatValue);
  }
 
origin: plutext/docx4j

/**
 * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
 * 
 * @param parent
 *     The parent object in the object tree.
 * @param unmarshaller
 *     The unmarshaller that generated the instance.
 */
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  setParent(parent);
}
origin: plutext/docx4j

/**
 * Sets the value of the tag property.
 * 
 * @param value
 *     allowed object is
 *     {@link SdtPr.Tag }
 *     
 */
public void setTag(Tag value) {
  
  Tag existingTag = getTag(); 
  
  if (existingTag!=null) {
    if (!existingTag.equals(value)) {
      rPrOrAliasOrLock.remove(existingTag);
      if (value==null) {
        log.debug("Changing SDT tag from " + existingTag.getVal() + " to null");
      } else {
        log.debug("Changing SDT tag from " + existingTag.getVal() + " to " + value.getVal() );
        rPrOrAliasOrLock.add(value);
      }
    }
    // else - they are the same, so do nothing
  } else if (value!=null) {
    //ObjectFactory factory = new ObjectFactory();
    //JAXBElement idWrapper = factory.createSdtPrId(value);
    rPrOrAliasOrLock.add(value);
  }
}
 
origin: plutext/docx4j

  tag.setVal("od:repeat=" + key);
} else {
  tag.setVal("od:xpath=" + key);			
origin: plutext/docx4j

/**
 * Create an instance of {@link Tag }
 * 
 */
public Tag createTag() {
  return new Tag();
}
origin: plutext/docx4j

log.debug(tag.getVal());
HashMap<String, String> map = QueryString.parseQueryString(tag.getVal(), true);
} else if (tag.getVal().contains("od:")){
  log.info("Ignoring (!) tag: " + tag.getVal());
} else {
  log.debug("Ignoring tag: " + tag.getVal());
origin: plutext/docx4j

private static SdtBlock createSdt(String tagVal, RPr rPr) {
  
  // .. so create content control!
  SdtBlock sdtBlock = Context.getWmlObjectFactory().createSdtBlock();
  SdtPr sdtPr = Context.getWmlObjectFactory().createSdtPr();
  sdtBlock.setSdtPr(sdtPr);
  SdtContentBlock sdtContent = Context.getWmlObjectFactory().createSdtContentBlock();
  sdtBlock.setSdtContent(sdtContent);
  // For borders/shading, we'll use the values in this first paragraph.
  // We'll use a tag, so the XSLT can detect that its supposed to do something special.
  Tag tag = Context.getWmlObjectFactory().createTag();
  tag.setVal(tagVal);
  
  sdtPr.setTag(tag);
  if (rPr != null) {
    sdtPr.getRPrOrAliasOrLock().add((RPr)XmlUtils.deepCopy(rPr));
    /* 
     * ECMA-376 says "specifies the set of run properties which shall be applied to
     *  the text entered into the parent structured document tag in replacement of 
     *  placeholder text. When placeholder text is present in a structured document 
     *  tag, its formatting is often different than the desired underlying formatting, 
     *  and this element specifies the formatting which shall be used for non-placeholder 
     *  text contents when they are initially added to the control. "
     * 
     * Note that docx2fo.xslt is co-opting this to do something else. 
     */
  }
  return sdtBlock;
  
}
origin: org.docx4j/docx4j

/**
 * Create an instance of {@link Tag }
 * 
 */
public Tag createTag() {
  return new Tag();
}
origin: plutext/docx4j

private void processDescendantCondition(Object sdt, String xpathBase,
    int index, Tag tag ) {
  Condition c = null;
  HashMap<String, String> map = QueryString.parseQueryString(
      tag.getVal(), true);
  String conditionId = map.get(BINDING_ROLE_CONDITIONAL);
  if (conditionId != null) {
    //c = ConditionsPart.getConditionById(conditions, conditionId);
    c = conditionsMap.get(conditionId);
    
    if (c == null) {
      log.error("Missing condition " + conditionId);
      throw new InputIntegrityException("Required condition '" + conditionId + "' is missing");
    }
    // TODO: this code assumes the condition contains
    // a simple xpath
    if(log.isDebugEnabled()) {
      log.debug("Using condition"
          + XmlUtils.marshaltoString(c, true, true));
    }
    Condition newCondition = c.repeat(xpathBase, index, conditionsMap, xpathsMap);
    // set sdt to use it
    map.put(BINDING_ROLE_CONDITIONAL, newCondition.getId() );
    tag.setVal(QueryString.create(map));
  }
}
origin: plutext/docx4j

log.info(tag.getVal());
HashMap<String, String> map = QueryString.parseQueryString(tag.getVal(), true);
  log.debug("Encountered Conditional: " + tag.getVal());
  log.info("Processing OpenDoPE Repeat: " + tag.getVal());
origin: plutext/docx4j

Tag tag = new Tag();
tag.setVal(BINDING_RESULT_RPTD_ZERO_W15 + "=true");
sdtPr.setTag(tag);
origin: org.docx4j/docx4j

  tag.setVal("od:repeat=" + key);
} else {
  tag.setVal("od:xpath=" + key);			
origin: org.docx4j/docx4j

/**
 * This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
 * 
 * @param parent
 *     The parent object in the object tree.
 * @param unmarshaller
 *     The unmarshaller that generated the instance.
 */
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
  setParent(parent);
}
origin: plutext/docx4j

map = QueryString.parseQueryString(tag.getVal(), true);
  tag.setVal(QueryString.create(map));
  tag.setVal(QueryString.create(map));
  tag.setVal(QueryString.create(map));
origin: plutext/docx4j

log.info(tag.getVal());
HashMap<String, String> map = QueryString.parseQueryString(tag.getVal(), true);
  log.info("Processing Conditional: " + tag.getVal());
  log.info("Processing OpenDoPE Repeat: " + tag.getVal());
origin: org.docx4j/docx4j

private void setTag(SdtBlock sdtList, BigInteger numId, BigInteger ilvl) {
  Tag tag = new Tag();
  sdtPr.setTag(tag);
    tag.setVal("HTML_ELEMENT=OL");
    return;
    tag.setVal("HTML_ELEMENT=OL");
    return;
    tag.setVal("HTML_ELEMENT=OL");
    return;			
    tag.setVal("HTML_ELEMENT=UL");			
  } else {
    tag.setVal("HTML_ELEMENT=OL");						
origin: org.docx4j/docx4j

private static SdtBlock createSdt(String tagVal, RPr rPr) {
  
  // .. so create content control!
  SdtBlock sdtBlock = Context.getWmlObjectFactory().createSdtBlock();
  SdtPr sdtPr = Context.getWmlObjectFactory().createSdtPr();
  sdtBlock.setSdtPr(sdtPr);
  SdtContentBlock sdtContent = Context.getWmlObjectFactory().createSdtContentBlock();
  sdtBlock.setSdtContent(sdtContent);
  // For borders/shading, we'll use the values in this first paragraph.
  // We'll use a tag, so the XSLT can detect that its supposed to do something special.
  Tag tag = Context.getWmlObjectFactory().createTag();
  tag.setVal(tagVal);
  
  sdtPr.setTag(tag);
  if (rPr != null) {
    sdtPr.getRPrOrAliasOrLock().add((RPr)XmlUtils.deepCopy(rPr));
    /* 
     * ECMA-376 says "specifies the set of run properties which shall be applied to
     *  the text entered into the parent structured document tag in replacement of 
     *  placeholder text. When placeholder text is present in a structured document 
     *  tag, its formatting is often different than the desired underlying formatting, 
     *  and this element specifies the formatting which shall be used for non-placeholder 
     *  text contents when they are initially added to the control. "
     * 
     * Note that docx2fo.xslt is co-opting this to do something else. 
     */
  }
  return sdtBlock;
  
}
origin: plutext/docx4j

final String tagVal = tag.getVal();
final Pattern stripConditionArgPattern = Pattern
    .compile("(.*od:condition=)([^&]*)(.*)");
tag.setVal(emptyConditionValue);	
origin: plutext/docx4j

if (replacement==null) {
  log.error( OpenDoPEHandler.getSdtPr(entry).getTag().getVal() + " - No replacement SDT with ID " + key.toString() );
org.docx4j.wmlTag

Javadoc

Java class for anonymous complex type.

The following schema fragment specifies the expected content contained within this class.

 
<complexType> 
<complexContent> 
<restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 
<attribute name="val" type="{http://www.w3.org/2001/XMLSchema}string" /> 
</restriction> 
</complexContent> 
</complexType> 

Most used methods

  • <init>
  • getVal
    Gets the value of the val property.
  • setVal
    Sets the value of the val property.
  • setParent

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • getSystemService (Context)
  • getContentResolver (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Path (java.nio.file)
  • KeyStore (java.security)
    This class represents an in-memory collection of keys and certificates. It manages two types of entr
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now