Package org.apache.padaf.xmpbox.type

Examples of org.apache.padaf.xmpbox.type.BadFieldValueException


    public void setAbout(Attribute about) throws BadFieldValueException {
        if (about.getQualifiedName().equals(RDFABOUT)
                || about.getQualifiedName().equals("about")) {
            content.setAttribute(about);
        } else {
            throw new BadFieldValueException(
            "Attribute 'about' must be named 'rdf:about' or 'about'");
        }
    }
View Full Code Here


            if (tmp.getQualifiedName().equals(qualifiedName)) {
                if (tmp instanceof ComplexProperty) {
                    array = (ComplexProperty) tmp;
                    break;
                } else {
                    throw new BadFieldValueException(
                    "Property asked not seems to be an array");
                }

            }
        }
View Full Code Here

      List<ThumbnailType> thumbs = new ArrayList<ThumbnailType>();
      for (AbstractField abstractField : tmp) {
        if (abstractField instanceof ThumbnailType) {
          thumbs.add((ThumbnailType) abstractField);
        } else {
          throw new BadFieldValueException("Thumbnail expected and "
              + abstractField.getClass().getName() + " found.");
        }
      }
      return thumbs;
    }
View Full Code Here

            List<JobType> layers = new ArrayList<JobType>();
            for (AbstractField abstractField : tmp) {
                if (abstractField instanceof JobType) {
                    layers.add((JobType) abstractField);
                } else {
                    throw new BadFieldValueException("Job expected and "
                            + abstractField.getClass().getName() + " found.");
                }
            }
            return layers;
        }
View Full Code Here

    if (value.equals("A") || value.equals("B")) {
      TextType conf = new TextType(metadata, IDPREFIX, CONFORMANCE, value);
      addProperty(conf);

    } else {
      throw new BadFieldValueException(
          "The property given not seems to be a PDF/A conformance level (must be A or B)");
    }
  }
View Full Code Here

  public void setConformance(TextType conf) throws BadFieldValueException {
    String value = conf.getStringValue();
    if (value.equals("A") || value.equals("B")) {
      addProperty(conf);
    } else {
      throw new BadFieldValueException(
          "The property given not seems to be a PDF/A conformance level (must be A or B)");
    }
  }
View Full Code Here

  public void setCategoryValue(String category) throws BadFieldValueException {
    if (category.equals("external") || category.equals("internal")) {
      content.addProperty(new TextType(metadata, PDFAPROPPREFIX,
          CATEGORY, category));
    } else {
      throw new BadFieldValueException(
          "Unexpected value '"
              + category
              + "' for property category (only values 'internal' or 'external' are allowed)");
    }
  }
View Full Code Here

      List<LayerType> layers = new ArrayList<LayerType>();
      for (AbstractField abstractField : tmp) {
        if (abstractField instanceof LayerType) {
          layers.add((LayerType) abstractField);
        } else {
          throw new BadFieldValueException("Layer expected and "
              + abstractField.getClass().getName() + " found.");
        }
      }
      return layers;
    }
View Full Code Here

TOP

Related Classes of org.apache.padaf.xmpbox.type.BadFieldValueException

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.