Package org.apache.stanbol.entityhub.servicesapi.query.ValueConstraint

Examples of org.apache.stanbol.entityhub.servicesapi.query.ValueConstraint.MODE


            message.append("Parsed ValueConstraint does not define the required field 'value'!\n");
            message.append("Parsed Constraint: \n");
            message.append(jConstraint.toString(4));
            throw new IllegalArgumentException(message.toString());
        }
        MODE mode = parseConstraintValueMode(jConstraint);
        return new ValueConstraint(valueList,dataTypes,mode);
    }
View Full Code Here


     * attribute is not present
     * @throws JSONException if the value of the 'mode' is not an element of the
     * {@link MODE} enumeration.
     */
    private static MODE parseConstraintValueMode(JSONObject jConstraint) throws JSONException {
        MODE mode;
        if(jConstraint.has("mode")){
            String jmode = jConstraint.getString("mode");
            try {
                mode = MODE.valueOf(jmode);
            } catch (IllegalArgumentException e) {
View Full Code Here

                message.append("This means values where only null, empty string or '{prefix}:{localname}' values with unknown {prefix}\n");
                message.append("Parsed Constraint: \n");
                message.append(jConstraint.toString(4));
                throw new IllegalArgumentException(message.toString());               
            }
            MODE mode = parseConstraintValueMode(jConstraint);
            return new ReferenceConstraint(refList,mode);
        } else {
            log.warn("Parsed ReferenceConstraint does not define the required field \"value\"!");
            StringBuilder message = new StringBuilder();
            message.append("Parsed ReferenceConstraint does not define the required field 'value'!\n");
View Full Code Here

            message.append("Parsed ValueConstraint does not define the required field 'value'!\n");
            message.append("Parsed Constraint: \n");
            message.append(jConstraint.toString(4));
            throw new IllegalArgumentException(message.toString());
        }
        MODE mode = parseConstraintValueMode(jConstraint);
        return new ValueConstraint(valueList,dataTypes,mode);
    }
View Full Code Here

     * attribute is not present
     * @throws JSONException if the value of the 'mode' is not an element of the
     * {@link MODE} enumeration.
     */
    private static MODE parseConstraintValueMode(JSONObject jConstraint) throws JSONException {
        MODE mode;
        if(jConstraint.has("mode")){
            String jmode = jConstraint.getString("mode");
            try {
                mode = MODE.valueOf(jmode);
            } catch (IllegalArgumentException e) {
View Full Code Here

                message.append("This means values where only null, empty string or '{prefix}:{localname}' values with unknown {prefix}\n");
                message.append("Parsed Constraint: \n");
                message.append(jConstraint.toString(4));
                throw new IllegalArgumentException(message.toString());               
            }
            MODE mode = parseConstraintValueMode(jConstraint);
            return new ReferenceConstraint(refList,mode);
        } else {
            log.warn("Parsed ReferenceConstraint does not define the required field \"value\"!");
            StringBuilder message = new StringBuilder();
            message.append("Parsed ReferenceConstraint does not define the required field 'value'!\n");
View Full Code Here

            message.append("Parsed ValueConstraint does not define the required field 'value'!\n");
            message.append("Parsed Constraint: \n");
            message.append(jConstraint.toString(4));
            throw new IllegalArgumentException(message.toString());
        }
        MODE mode = parseConstraintValueMode(jConstraint);
        return new ValueConstraint(valueList,dataTypes,mode);
    }
View Full Code Here

     * attribute is not present
     * @throws JSONException if the value of the 'mode' is not an element of the
     * {@link MODE} enumeration.
     */
    private static MODE parseConstraintValueMode(JSONObject jConstraint) throws JSONException {
        MODE mode;
        if(jConstraint.has("mode")){
            String jmode = jConstraint.getString("mode");
            try {
                mode = MODE.valueOf(jmode);
            } catch (IllegalArgumentException e) {
View Full Code Here

                message.append(jConstraint.toString(4));
                throw new IllegalArgumentException(message.toString());
            } else {
                refList = Collections.singletonList(NamespaceEnum.getFullName(jConstraint.getString("value")));
            }
            MODE mode = parseConstraintValueMode(jConstraint);
            return new ReferenceConstraint(refList,mode);
        } else {
            log.warn("Parsed ReferenceConstraint does not define the required field \"value\"!");
            StringBuilder message = new StringBuilder();
            message.append("Parsed ReferenceConstraint does not define the required field 'value'!\n");
View Full Code Here

TOP

Related Classes of org.apache.stanbol.entityhub.servicesapi.query.ValueConstraint.MODE

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.