Codota Logo
StyleDefinitionsPart.getJaxbElement
Code IndexAdd Codota to your IDE (free)

How to use
getJaxbElement
method
in
org.docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart

Best Java code snippets using org.docx4j.openpackaging.parts.WordprocessingML.StyleDefinitionsPart.getJaxbElement (Showing top 20 results out of 315)

  • Common ways to obtain StyleDefinitionsPart
private void myMethod () {
StyleDefinitionsPart s =
  • Codota IconWordprocessingMLPackage wordprocessingMLPackage;wordprocessingMLPackage.getMainDocumentPart().getStyleDefinitionsPart()
  • Smart code suggestions by Codota
}
origin: plutext/docx4j

@Override
public String getMceIgnorable() {
  return this.getJaxbElement().getIgnorable();
}
 
origin: plutext/docx4j

/**
 * @param id
 * @return
 * @since 3.0.0
 */
public Style getStyleById(String id) {
  
  return getStyleById( this.getJaxbElement().getStyle(), id ); 				
}
origin: plutext/docx4j

@Override
protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper) {
  // NB if you add ignorable content, it is up to you to jaxbElement.setIgnorable correctly; see further McIgnorableNamespaceDeclarator
  // You don't need to worry about this if you are merely loading an existing part.
  namespacePrefixMapper.setMcIgnorable(
      this.getJaxbElement().getIgnorable() );
}
origin: plutext/docx4j

/**
 * Refresh the style name - ID bimaps, based on styles currently defined in this part.
 * @since 3.3.0
 */
public void refreshNameIdBiMaps() {
  
  styleIdToName= HashBiMap.create();
  for (Style s : this.getJaxbElement().getStyle()) {
    if (s.getName()==null
        || s.getName().getVal()==null) {
      log.info("style has no name!");
    } else if (s.getStyleId()==null
        || s.getStyleId().trim().length()==0) {
      log.info("style has no id!");				
    } else {
      styleIdToName.put(s.getStyleId(), s.getName().getVal());
    }
  }
  styleNameToId = styleIdToName.inverse();
}
 
origin: plutext/docx4j

public Style getDefaultCharacterStyle() {
  
  if (defaultCharacterStyle==null) {
    defaultCharacterStyle = getDefaultStyle("character");
  }
  // OpenOffice conversion to docx
  // doesn't necessarily contain a default character style
  // so manufacture one
  if (defaultCharacterStyle==null) {
    try {
      defaultCharacterStyle = (Style)XmlUtils.unmarshalString(DEFAULT_CHARACTER_STYLE_DEFAULT);
      this.getJaxbElement().getStyle().add(defaultCharacterStyle);
    } catch (JAXBException e) {
      e.printStackTrace();
    }
  }
  return defaultCharacterStyle;
}
 
origin: plutext/docx4j

private Style getDefaultStyle(String type) {
  
  for ( org.docx4j.wml.Style s : this.getJaxbElement().getStyle() ) {				
    if( s.isDefault() && s.getType().equals(type)) {
      log.debug("Style with name " + s.getName().getVal() + ", id '" + s.getStyleId() + "' is default " + s.getType() + " style");
      return s;
    }
  }
  return null;
}
 
origin: plutext/docx4j

Styles styles = wmlPackage.getMainDocumentPart().getStyleDefinitionsPart(false).getJaxbElement();		
for ( org.docx4j.wml.Style s : styles.getStyle() ) {				
  allStyles.put(s.getStyleId(), s);    
origin: plutext/docx4j

Styles styles = getStyleDefinitionsPart().getJaxbElement();		
for ( org.docx4j.wml.Style s : styles.getStyle() ) {				
  allStyles.put(s.getStyleId(), s);    
    getStyleDefinitionsPart().getJaxbElement().getDocDefaults(), 
    getStyleDefinitionsPart().getDefaultParagraphStyle());
origin: plutext/docx4j

  private TocStyles getTocStyles(MainDocumentPart documentPart) throws TocException {
//      Styles styles = null;
   if (documentPart.getStyleDefinitionsPart()==null
       || documentPart.getStyleDefinitionsPart().getJaxbElement()==null) {
     throw new TocException("No StyleDefinitions present in package");
   }
   return new TocStyles(documentPart.getStyleDefinitionsPart());
    
  }

origin: plutext/docx4j

if (this.getJaxbElement()==null) 
  throw new Docx4JException("StyleDefinitionsPart null content");
if (this.getJaxbElement().getLatentStyles()==null) 
  throw new Docx4JException("StyleDefinitionsPart content missing latentStyles");
this.getJaxbElement().getLatentStyles().setDefLockedState(Boolean.TRUE);
for (LsdException lsdException : this.getJaxbElement().getLatentStyles().getLsdException()) {
for (Style s : this.getJaxbElement().getStyle()) {
this.getJaxbElement().getStyle().removeAll(deletions);
origin: plutext/docx4j

for ( org.docx4j.wml.Style s : this.getJaxbElement().getStyle() ) {				
  if( s.getType().equals("paragraph")
      && s.getName()!=null
for ( org.docx4j.wml.Style s : this.getJaxbElement().getStyle() ) {				
  if( s.getType().equals("paragraph")
      && s.getStyleId().equals("style0") ) {
origin: plutext/docx4j

protected TocStyles(StyleDefinitionsPart sdp) {
  this.stylesPartStyles = sdp.getJaxbElement();
origin: plutext/docx4j

styles = (org.docx4j.wml.Styles)styleDefinitionsPart.getJaxbElement();	
initialiseLiveStyles();        
DocDefaults docDefaults = styleDefinitionsPart.getJaxbElement().getDocDefaults();
if(log.isDebugEnabled()) {
  log.debug(XmlUtils.marshaltoString(docDefaults, true, true));
origin: plutext/docx4j

Styles styles = wmlPackage.getMainDocumentPart().getStyleDefinitionsPart().getJaxbElement();
origin: org.docx4j/docx4j

@Override
public String getMceIgnorable() {
  return this.getJaxbElement().getIgnorable();
}
 
origin: plutext/docx4j-ImportXHTML

private void initStyleMap(StyleDefinitionsPart sdp) {
  
  if (sdp==null) return;
  org.docx4j.wml.Styles styles = sdp.getJaxbElement();
  
  for ( org.docx4j.wml.Style s : styles.getStyle() ) {				
    stylesByID.put(s.getStyleId(), s);                
  }
}
 
origin: org.docx4j/docx4j

/**
 * @param id
 * @return
 * @since 3.0.0
 */
public Style getStyleById(String id) {
  
  return getStyleById( this.getJaxbElement().getStyle(), id ); 				
}
origin: org.docx4j/docx4j

@Override
protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper) {
  // NB if you add ignorable content, it is up to you to jaxbElement.setIgnorable correctly; see further McIgnorableNamespaceDeclarator
  // You don't need to worry about this if you are merely loading an existing part.
  namespacePrefixMapper.setMcIgnorable(
      this.getJaxbElement().getIgnorable() );
}
origin: org.docx4j/docx4j

private Style getDefaultStyle(String type) {
  
  for ( org.docx4j.wml.Style s : this.getJaxbElement().getStyle() ) {				
    if( s.isDefault() && s.getType().equals(type)) {
      log.debug("Style with name " + s.getName().getVal() + ", id '" + s.getStyleId() + "' is default " + s.getType() + " style");
      return s;
    }
  }
  return null;
}
 
origin: org.docx4j/docx4j

  private TocStyles getTocStyles(MainDocumentPart documentPart) throws TocException {
//      Styles styles = null;
   if (documentPart.getStyleDefinitionsPart()==null
       || documentPart.getStyleDefinitionsPart().getJaxbElement()==null) {
     throw new TocException("No StyleDefinitions present in package");
   }
   return new TocStyles(documentPart.getStyleDefinitionsPart());
    
  }

org.docx4j.openpackaging.parts.WordprocessingMLStyleDefinitionsPartgetJaxbElement

Popular methods of StyleDefinitionsPart

    Popular in Java

    • Updating database using SQL prepared statement
    • putExtra (Intent)
    • getApplicationContext (Context)
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • BufferedImage (java.awt.image)
      The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
    • URI (java.net)
      Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
    • MessageFormat (java.text)
      MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
    • Queue (java.util)
      A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
    • Set (java.util)
      A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1
    • LoggerFactory (org.slf4j)
      The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
    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