Package org.apache.padaf.xmpbox.schema

Examples of org.apache.padaf.xmpbox.schema.DublinCoreSchema


    if (AbstractFontValidator.isSubSet(fontName)) {
      noSubSetName = fontName.split(AbstractFontValidator
          .getSubSetPatternDelimiter())[1];
    }

    DublinCoreSchema dc = metadata.getDublinCoreSchema();
    if (dc != null) {
      if (dc.getTitle() != null) {
        String defaultTitle = dc.getTitleValue("x-default");
        if (defaultTitle != null) {

          if (!defaultTitle.equals(fontName)
              && (noSubSetName != null && !defaultTitle.equals(noSubSetName))) {
            StringBuilder sb = new StringBuilder(80);
            sb
            .append("FontName")
            .append(
            " present in the FontDescriptor dictionary doesn't match with XMP information dc:title of the Font File Stream.");
            ve.add(new ValidationError(
                ValidationConstants.ERROR_METADATA_MISMATCH, sb.toString()));
            return false;
          }

          // --- default value is the right one
          return true;
        } else {
          Iterator<AbstractField> it = dc.getTitle().getContainer()
          .getAllProperties().iterator();
          boolean empty = true;
          while (it.hasNext()) {
            empty = false;
            AbstractField tmp = it.next();
View Full Code Here


   * @throws ValidationException
   */
  public boolean analyseRights(XMPMetadata metadata, PDFontDescriptor fontDesc, List<ValidationError> ve)
  throws ValidationException {

    DublinCoreSchema dc = metadata.getDublinCoreSchema();
    if (dc != null) {
      ComplexProperty copyrights = dc.getRights();
      if (copyrights == null || copyrights.getContainer() == null
          || copyrights.getContainer().getAllProperties().isEmpty()) {
        ve
        .add(new ValidationError(
            ValidationConstants.ERROR_METADATA_PROPERTY_MISSING,
View Full Code Here

    } else {
      PDDocumentInformation dico = document.getDocumentInformation();
      if (metadata == null) {
        throw new ValidationException("Metadata provided are null");
      } else {
        DublinCoreSchema dc = metadata.getDublinCoreSchema();

        // TITLE
        analyzeTitleProperty(dico, dc, ve);
        // AUTHOR
        analyzeAuthorProperty(dico, dc, ve);
View Full Code Here

TOP

Related Classes of org.apache.padaf.xmpbox.schema.DublinCoreSchema

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.