Package buri.ddmsence.ddms

Examples of buri.ddmsence.ddms.InvalidDDMSException


  public static void requireDDMSQName(Element element, String localName) throws InvalidDDMSException {
    Util.requireValue("element", element);
    Util.requireValue("local name", localName);
    if (!localName.equals(element.getLocalName())
      || !DDMSVersion.isSupportedDDMSNamespace(element.getNamespaceURI())) {
      throw new InvalidDDMSException("Unexpected namespace URI and local name encountered: "
        + element.getQualifiedName());
    }
  }
View Full Code Here


    Util.requireValue("element", element);
    Util.requireValue("local name", localName);
    if (namespaceURI == null)
      namespaceURI = "";
    if (!localName.equals(element.getLocalName()) || !namespaceURI.equals(element.getNamespaceURI())) {
      throw new InvalidDDMSException("Unexpected namespace URI and local name encountered: "
        + element.getQualifiedName());
    }
  }
View Full Code Here

      }
      else {
        error.append("The number of ").append(childName).append(" elements must be between ").append(lowBound).append(
          " and ").append(highBound).append(".");
      }
      throw new InvalidDDMSException(error.toString());
    }
  }
View Full Code Here

    if (child instanceof ITspiAddress || child instanceof ITspiShape) {
      parentNamespace = DDMSVersion.getVersionForNamespace(parentNamespace).getTspiNamespace();
    }
    String childNamespace = child.getNamespace();
    if (!parentNamespace.equals(childNamespace)) {
      throw new InvalidDDMSException("A child component, " + child.getQualifiedName()
        + ", is using a different version of DDMS from its parent.");
    }
  }
View Full Code Here

   * @see AbstractBaseComponent#validate()
   */
  protected void validate() throws InvalidDDMSException {
    Util.requireQName(getXOMElement(), getNamespace(), Profile.getName(getDDMSVersion()));
    if (getProfileValues().isEmpty())
      throw new InvalidDDMSException("At least one profile value must exist.");
    super.validate();
  }
View Full Code Here

   * @param name the name to check
   * @throws InvalidDDMSException if the name is not an NCName.
   */
  public static void requireValidNCName(String name) throws InvalidDDMSException {
    if (!(new Name10Checker().isValidNCName(getNonNullString(name))))
      throw new InvalidDDMSException("\"" + name + "\" is not a valid NCName.");
  }
View Full Code Here

   * @param name the name to check
   * @throws InvalidDDMSException if the name is not an NMTOKEN.
   */
  public static void requireValidNMToken(String name) throws InvalidDDMSException {
    if (!(new Name10Checker().isValidNmtoken(getNonNullString(name))))
      throw new InvalidDDMSException("\"" + name + "\" is not a valid NMTOKEN.");
  }
View Full Code Here

    Util.requireValue("uri", uri);
    try {
      new URI(uri);
    }
    catch (URISyntaxException e) {
      throw new InvalidDDMSException(e);
    }
  }
View Full Code Here

   * @param value the value to test
   * @throws InvalidDDMSException
   */
  public static void requireValidLongitude(Double value) throws InvalidDDMSException {
    if (value == null || (new Double(-180)).compareTo(value) > 0 || (new Double(180)).compareTo(value) < 0)
      throw new InvalidDDMSException("A longitude value must be between -180 and 180 degrees: " + value);
  }
View Full Code Here

   * @param value the value to test
   * @throws InvalidDDMSException
   */
  public static void requireValidLatitude(Double value) throws InvalidDDMSException {
    if (value == null || (new Double(-90)).compareTo(value) > 0 || (new Double(90)).compareTo(value) < 0)
      throw new InvalidDDMSException("A latitude value must be between -90 and 90 degrees: " + value);
  }
View Full Code Here

TOP

Related Classes of buri.ddmsence.ddms.InvalidDDMSException

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.