Package com.adobe.epubcheck.messages

Examples of com.adobe.epubcheck.messages.MessageLocation


    else if (name.equals("a"))
    {
      if (anchorNeedsText)
      {
        report.message(MessageId.ACC_004,
            new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber(), "a"));
        anchorNeedsText = false;
      }
    }
    else if (name.equals("math"))
    {
      inMathML = false;
      if (!hasAltorAnnotation)
      {
        report.message(MessageId.ACC_009,
            new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber(), "math"));
      }
    }
  }
View Full Code Here


      hasValidFallback = false;
    }
    else
    {
      report.message(MessageId.MED_002,
          new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber()), elementType);
    }
  }
View Full Code Here

    }
    // TODO shouldn't have to reparse the properties here.
    // this.properties should be a Set<Property>
    Set<ITEM_PROPERTIES> itemProps = Sets.newEnumSet(Property.filter(VocabUtil.parsePropertyList(
        properties, ITEM_VOCABS, QuietReport.INSTANCE,
        new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber())),
        ITEM_PROPERTIES.class), ITEM_PROPERTIES.class);

    itemProps.remove(ITEM_PROPERTIES.NAV);
    itemProps.remove(ITEM_PROPERTIES.COVER_IMAGE);

    for (ITEM_PROPERTIES propSet : propertiesSet)
    {
      if (itemProps.contains(propSet))
      {
        itemProps.remove(propSet);
      }
      else
      {
        report.message(MessageId.OPF_014, new MessageLocation(path, 0, 0),
            EnumVocab.ENUM_TO_NAME.apply(propSet));
      }
    }

    if (itemProps.contains(ITEM_PROPERTIES.REMOTE_RESOURCES))
    {
      itemProps.remove(ITEM_PROPERTIES.REMOTE_RESOURCES);
      report.message(MessageId.OPF_018,
          new MessageLocation(path, parser.getLineNumber(), parser.getColumnNumber()));
    }

    if (!itemProps.isEmpty())
    {
      report.message(MessageId.OPF_015, new MessageLocation(path, 0, 0),
          Joiner.on(", ").join(Collections2.transform(itemProps, EnumVocab.ENUM_TO_NAME)));
    }
  }
View Full Code Here

    }
   
    if ("application/xhtml+xml".equals(mimeType) && !"xhtml".equals(Files.getFileExtension(item.getPath())))
    {
      report.message(MessageId.HTM_014a,
          new MessageLocation(path, item.getLineNumber(), item.getColumnNumber()), item.getPath());
    }
   
    if (fallback != null)
    {
      OPFItem fallbackItem = opfHandler.getItemById(fallback);
      if (fallbackItem == null)
      {
        report.message(MessageId.OPF_040,
            new MessageLocation(path, item.getLineNumber(), item.getColumnNumber()));
      }
    }
  }
View Full Code Here

    }

    if (item.getFallback() == null)
    {
      report.message(MessageId.OPF_043,
          new MessageLocation(path, item.getLineNumber(), item.getColumnNumber()),
          mimeType);
    }

    else if (!new FallbackChecker().checkItemFallbacks(item, opfHandler, false))
    {
      report.message(MessageId.OPF_044,
          new MessageLocation(path, item.getLineNumber(), item.getColumnNumber()),
          mimeType);
    }
  }
View Full Code Here

      String handlerSrc = xrefChecker.getBindingHandlerSrc(mimeType);
      OPFItem handler = opfHandler.getItemByPath(handlerSrc);
      if (!handler.isScripted())
      {
        report.message(MessageId.OPF_046,
            new MessageLocation(handlerSrc, handler.lineNumber, handler.columnNumber));
      }
    }
  }
View Full Code Here

  public void runChecks()
  {
    if (!ocf.hasEntry(path))
    {
      report.message(MessageId.RSC_001, new MessageLocation(this.ocf.getName(), -1, -1), path);
    }
    else if (!ocf.canDecrypt(path))
    {
      report.message(MessageId.RSC_004, new MessageLocation(this.ocf.getName(), 0, 0), path);
    }
    else
    {
      validate();
    }
View Full Code Here

    {
      validate(validators);
    }
    catch (IOException e)
    {
      report.message(MessageId.PKG_008, new MessageLocation(path, 0, 0), path);
    }
    return fatalErrorsSoFar == report.getFatalErrorCount()
        && errorsSoFar == report.getErrorCount()
        && warningsSoFar == report.getWarningCount();
  }
View Full Code Here

      {
        String fileToParse = epack.getManifestItemFileName(itemEntry);
        ZipEntry entry = epack.getZip().getEntry(fileToParse);
        if (entry == null)
        {
          report.message(MessageId.RSC_001, new MessageLocation(epack.getFileName(), -1, -1), fileToParse);
          continue;
        }

        XMLContentDocParser parser = new XMLContentDocParser(epack.getZip(), report);
        AnchorTagHandler h = new AnchorTagHandler();
View Full Code Here

    {
      String fileName = url.substring(0, frag);
      fileName = new File(fileName).getName();
      if (entry.getValue().contains(".epub") && fileName.compareTo(file) != 0)
      {
        report.message(MessageId.HTM_012, new MessageLocation(file, entry.getLine(), entry.getColumn(), entry.getValue()));
      }
      else
      {
        report.message(MessageId.HTM_013, new MessageLocation(file, entry.getLine(), entry.getColumn(), entry.getValue()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.adobe.epubcheck.messages.MessageLocation

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.