Package com.hp.hpl.jena.datatypes

Examples of com.hp.hpl.jena.datatypes.DatatypeFormatException


            ValidationContext context = new ValidationState();
            ValidatedInfo resultInfo = new ValidatedInfo();
            Object result = typeDeclaration.validate(lexicalForm, context, resultInfo);
            return convertValidatedDataValue(resultInfo);
        } catch (InvalidDatatypeValueException e) {
            throw new DatatypeFormatException(lexicalForm, this, "during parse -" + e);
        }
    }
View Full Code Here


                }
            }
            return names;
        } catch (Exception e) {
            e.printStackTrace();    // Temp
            throw new DatatypeFormatException(e.toString());
        }
    }
View Full Code Here

    @Override
    public String unparse(Object value) {
        if (value instanceof byte[]) {
            return HexBin.encode((byte[])value);
        } else {
            throw new DatatypeFormatException("hexBinary asked to encode a non-byte arrary");
        }
    }
View Full Code Here

    @Override
    public String unparse(Object value) {
        if (value instanceof byte[]) {
            return Base64.encode((byte[])value);
        } else {
            throw new DatatypeFormatException("base64 asked to encode an unwrapped byte array");
        }
    }
View Full Code Here

     * Turned off by default.
     */
    protected void checkWhitespace(String lexicalForm) {
        if (JenaParameters.enableWhitespaceCheckingOfTypedLiterals) {
            if ( ! lexicalForm.trim().equals(lexicalForm)) {
                throw new DatatypeFormatException(lexicalForm, this, "whitespace violation");
            }
        }
    }
View Full Code Here

     * Turned off by default.
     */
    protected void checkWhitespace(String lexicalForm) {
        if (JenaParameters.enableWhitespaceCheckingOfTypedLiterals) {
            if ( ! lexicalForm.trim().equals(lexicalForm)) {
                throw new DatatypeFormatException(lexicalForm, this, "whitespace violation");
            }
        }
    }
View Full Code Here

            ValidationContext context = new ValidationState();
            ValidatedInfo resultInfo = new ValidatedInfo();
            Object result = typeDeclaration.validate(lexicalForm, context, resultInfo);
            return convertValidatedDataValue(resultInfo);
        } catch (InvalidDatatypeValueException e) {
            throw new DatatypeFormatException(lexicalForm, this, "during parse -" + e);
        }
    }
View Full Code Here

                }
            }
            return names;
        } catch (Exception e) {
            e.printStackTrace();    // Temp
            throw new DatatypeFormatException(e.toString());
        }
    }
View Full Code Here

    @Override
    public String unparse(Object value) {
        if (value instanceof byte[]) {
            return HexBin.encode((byte[])value);
        } else {
            throw new DatatypeFormatException("hexBinary asked to encode a non-byte arrary");
        }
    }
View Full Code Here

    @Override
    public String unparse(Object value) {
        if (value instanceof byte[]) {
            return Base64.encode((byte[])value);
        } else {
            throw new DatatypeFormatException("base64 asked to encode an unwrapped byte array");
        }
    }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.datatypes.DatatypeFormatException

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.