Package org.docx4j.openpackaging.parts

Examples of org.docx4j.openpackaging.parts.PartName


   * @param contentTypeManager
   *            The content type manager to use
   */
  public OpcPackage(ContentTypeManager contentTypeManager) {
    try {
      this.setPartName(new PartName("/", false));
     
      this.contentTypeManager = contentTypeManager;
    } catch (Exception e) {
      log.error(e.getMessage());
      // TODO: handle exception
View Full Code Here


    init();
   
  }

  public DiagramDataPart() throws InvalidFormatException {
    super(new PartName("/word/diagrams/data1.xml"));
    init();   
  }   
View Full Code Here

    super(partName);
    init();
  }

  public PresentationPropertiesPart() throws InvalidFormatException {
    super(new PartName("/ppt/presProps.xml"));
    init();
  }
View Full Code Here

    super(partName);
    init();
  }

  public ChartShapePart() throws InvalidFormatException {
    super(new PartName("/xl/drawings/drawing2.xml"));
    init();
  }
View Full Code Here

    init();
   
  }

  public DiagramLayoutHeaderPart() throws InvalidFormatException {
    super(new PartName("/diagrams/layoutheader1.xml"));
    init();   
  }   
View Full Code Here

   *             If the specified URI is not valid.
   */
  public RelationshipsPart(Base sourceP)
      throws InvalidFormatException {
   
    super(new PartName(PartName.getRelationshipsPartName(
        sourceP.getPartName().getName() )) ); // though we won't be using that, since it is dynamic
   
    this.sourceP = sourceP;
    init();
       
View Full Code Here

  /**
   * You probably don't want this one (though it is useful for reflection). If you do use it, you need to setPartName
   * @throws InvalidFormatException
   */
  public RelationshipsPart() throws InvalidFormatException {
    super(new PartName("/blagh")); //
    init();
  }
View Full Code Here

   * @return
   * @throws InvalidFormatException
   * @since 3.2.0, at which time related constructor was made private
   */
  public static RelationshipsPart createPackageRels() throws InvalidFormatException {
    RelationshipsPart rp = new RelationshipsPart(new PartName("/_rels/.rels"));
    return rp;
  }
View Full Code Here

    // if its source part's name changes
    // (eg AddPartBehaviour.RENAME_IF_NAME_EXISTS)
    if (this.getSourceP()!=null
        && (!(this.getSourceP() instanceof OpcPackage))) {
      try {
        return new PartName(PartName.getRelationshipsPartName(
            sourceP.getPartName().getName() ));
      } catch (InvalidFormatException e) {
        log.error(e.getMessage(), e);
        throw new RuntimeException(e);
      }
View Full Code Here

        log.error("Cannot convert " + r.getTarget()
            + " in a valid relationship URI-> ignored", e);
      }   
               
        try {
        return getPackage().getParts().get( new PartName(uri, true ));
      } catch (InvalidFormatException e) {
        log.error("Couldn't get part using PartName: " + uri, e);
        return null;
      }
     
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.parts.PartName

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.