Package org.joggito.core.exceptions

Examples of org.joggito.core.exceptions.RequiredPropertyException


    if (ReflectUtils.isArrayOrCollection(pd.getType())) { // collection/array
      // TODO RDFList support here
      int pSize = rsc.listProperties(pd.getRDFObject()).toSet().size();
      int minCard = pd.getMinCardinality();
      if (pSize < minCard) { // not satisfy min cardinality.
        throw new RequiredPropertyException(format(
            "At least {0} \"{1}\" must be set.", minCard, pd
                .getRDFObject()));
      }
    } else { // single type
      if (pd.isRequired() // required but not...
          && !rsc.hasProperty(pd.getRDFObject())) {
        throw new RequiredPropertyException(format(
            "{0}({1}) is required.", pd.getPropertyField()
                .getName(), pd.getRDFObject()));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.joggito.core.exceptions.RequiredPropertyException

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.