Java Code Examples for org.exolab.castor.xml.Unmarshaller#unmarshal()

The following examples show how to use org.exolab.castor.xml.Unmarshaller#unmarshal() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UncertaintyReader.java    From OpenDA with GNU Lesser General Public License v3.0 6 votes vote down vote up
public static Object unMarshallString(Reader reader, Class objectClass) throws IOException {
    Unmarshaller unmarshaller = new Unmarshaller(objectClass);
    Object castor;
    try {
        InputSource is = new InputSource(reader);
        is.setSystemId("stringBuffer");
        castor = unmarshaller.unmarshal(is);
        reader.close();
    } catch (MarshalException marshalException) {
        //TODO Juzer throw proper exception so that calling function can handle it
        throw new IOException(marshalException.getMessage());
    } catch (ValidationException validationException) {
        throw new IOException(validationException.getMessage());
    }
    return castor;
}
 
Example 2
Source File: IsNullExpr.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.IsNullExprType
 */
public static org.ralasafe.db.sql.xml.IsNullExprType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.IsNullExprType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.IsNullExpr.class, reader);
}
 
Example 3
Source File: IsNotNullExprType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.IsNotNullExprType
 */
public static org.ralasafe.db.sql.xml.IsNotNullExprType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.IsNotNullExprType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.IsNotNullExprType.class, reader);
}
 
Example 4
Source File: GroupBy.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.GroupByType
 */
public static org.ralasafe.db.sql.xml.GroupByType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.GroupByType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.GroupBy.class, reader);
}
 
Example 5
Source File: QueryRefType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.QueryRefType
 */
public static org.ralasafe.db.sql.xml.QueryRefType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.QueryRefType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.QueryRefType.class, reader);
}
 
Example 6
Source File: BinaryExpr.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.BinaryExprType
 */
public static org.ralasafe.db.sql.xml.BinaryExprType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.BinaryExprType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.BinaryExpr.class, reader);
}
 
Example 7
Source File: Column.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.ColumnType
 */
public static org.ralasafe.db.sql.xml.ColumnType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.ColumnType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.Column.class, reader);
}
 
Example 8
Source File: ParameterType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.ParameterType
 */
public static org.ralasafe.db.sql.xml.ParameterType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.ParameterType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.ParameterType.class, reader);
}
 
Example 9
Source File: IsNotNullExpressionType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled
 * org.ralasafe.db.sql.xml.IsNotNullExpressionType
 */
public static org.ralasafe.db.sql.xml.IsNotNullExpressionType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.IsNotNullExpressionType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.IsNotNullExpressionType.class, reader);
}
 
Example 10
Source File: HintValue.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.HintValueType
 */
public static org.ralasafe.db.sql.xml.HintValueType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.HintValueType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.HintValue.class, reader);
}
 
Example 11
Source File: Query.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.QueryType
 */
public static org.ralasafe.db.sql.xml.QueryType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.QueryType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.Query.class, reader);
}
 
Example 12
Source File: DefineVariable.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.DefineVariableTyp
 */
public static org.ralasafe.db.sql.xml.DefineVariableType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.DefineVariableType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.DefineVariable.class, reader);
}
 
Example 13
Source File: BusinessDataType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.BusinessDataType
 */
public static org.ralasafe.db.sql.xml.BusinessDataType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.BusinessDataType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.BusinessDataType.class, reader);
}
 
Example 14
Source File: BinaryExpression.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled
 * org.ralasafe.db.sql.xml.BinaryExpressionType
 */
public static org.ralasafe.db.sql.xml.BinaryExpressionType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.BinaryExpressionType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.BinaryExpression.class, reader);
}
 
Example 15
Source File: SelectType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.SelectType
 */
public static org.ralasafe.db.sql.xml.SelectType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.SelectType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.SelectType.class, reader);
}
 
Example 16
Source File: Formula.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.FormulaType
 */
public static org.ralasafe.db.sql.xml.FormulaType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.FormulaType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.Formula.class, reader);
}
 
Example 17
Source File: UserCategoryType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.UserCategoryType
 */
public static org.ralasafe.db.sql.xml.UserCategoryType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.UserCategoryType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.UserCategoryType.class, reader);
}
 
Example 18
Source File: UserValue.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.UserValueType
 */
public static org.ralasafe.db.sql.xml.UserValueType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.UserValueType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.UserValue.class, reader);
}
 
Example 19
Source File: InExprType.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled org.ralasafe.db.sql.xml.InExprType
 */
public static org.ralasafe.db.sql.xml.InExprType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.InExprType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.InExprType.class, reader);
}
 
Example 20
Source File: IsNullExpression.java    From ralasafe with MIT License 2 votes vote down vote up
/**
 * Method unmarshal.
 * 
 * @param reader
 * @throws org.exolab.castor.xml.MarshalException if object is
 * null or if any SAXException is thrown during marshaling
 * @throws org.exolab.castor.xml.ValidationException if this
 * object is an invalid instance according to the schema
 * @return the unmarshaled
 * org.ralasafe.db.sql.xml.IsNullExpressionType
 */
public static org.ralasafe.db.sql.xml.IsNullExpressionType unmarshal(
        final java.io.Reader reader)
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
    return (org.ralasafe.db.sql.xml.IsNullExpressionType) Unmarshaller.unmarshal(org.ralasafe.db.sql.xml.IsNullExpression.class, reader);
}