Package org.formulacompiler.spreadsheet.internal.excel.xlsx.loader

Examples of org.formulacompiler.spreadsheet.internal.excel.xlsx.loader.RelationshipParser


      InputStream input;

      final String workbook;
      input = loader.getRelationship( "" );
      try {
        RelationshipParser parser = new RelationshipParser( input, "" );
        workbook = parser.findByType( XMLConstants.WORKBOOK_RELATIONSHIP_TYPE );
        if (workbook == null)
          throw new SpreadsheetException.LoadError( "officeDocument relationship was not found in the root relationshp list" );
      }
      finally {
        input.close();
View Full Code Here


    this.entryPath = _entryPath;
  }

  void parse() throws XMLStreamException, IOException
  {
    final RelationshipParser relationships = parseRelationships();

    final String stylesheetEntryPath = relationships.findByType( XMLConstants.STYLESHEET_RELATIONSHIP_TYPE );
    this.stylesheet = parseStylesheet( stylesheetEntryPath );

    StartElement se = find( XMLConstants.WORKBOOK_SHEETS_PATH );
    if (se != null) {
      final int sheetsContext = getContext();
      while ((se = find( XMLConstants.Main.SHEET, sheetsContext )) != null) {
        final Attribute sheetRelationshipId = se.getAttributeByName( XMLConstants.DocumentRelationships.ID );

        final WorksheetParser parser = new WorksheetParser( this.loader,
            relationships.findById( sheetRelationshipId.getValue() ), this.stylesheet );
        try {
          parser.parse();
        }
        finally {
          parser.close();
View Full Code Here

  private RelationshipParser parseRelationships() throws XMLStreamException, IOException
  {
    final InputStream input = this.loader.getRelationship( this.entryPath );
    try {
      return new RelationshipParser( input, this.entryPath );
    }
    finally {
      input.close();
    }
  }
View Full Code Here

TOP

Related Classes of org.formulacompiler.spreadsheet.internal.excel.xlsx.loader.RelationshipParser

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.