Package org.qi4j.api.value

Examples of org.qi4j.api.value.ValueSerializationException


            input.nextTag();
            return null;
        }
        if( !nextTag.isStartElement() || !"array".equals( nextTag.asStartElement().getName().getLocalPart() ) )
        {
            throw new ValueSerializationException( "Expected an <array/> but got: " + nextTag );
        }
        XMLEvent currentTag = input.nextTag(); // <object>
        while( !currentTag.isEndElement() || !"array".equals( currentTag.asEndElement().getName().getLocalPart() ) )
        {
            if( !currentTag.isStartElement() || !"object".equals( currentTag.asStartElement().getName().getLocalPart() ) )
            {
                throw new ValueSerializationException( "Expected an <object/> but got: " + nextTag );
            }
            currentTag = input.nextTag(); // <field>
            K key = null;
            V value = null;
            while( !currentTag.isEndElement() || !"object".equals( currentTag.asEndElement().getName().getLocalPart() ) )
View Full Code Here


        {
            return null;
        }
        if( inputNode.getNodeType() != Node.TEXT_NODE && inputNode.getNodeType() != Node.CDATA_SECTION_NODE )
        {
            throw new ValueSerializationException( "Expected a TEXT or CDATA node but got " + inputNode );
        }
        String stringValue = inputNode.getNodeValue();
        return detectAndConvertStringValue( stringValue );
    }
View Full Code Here

        {
            return false;
        }
        if( !"object".equals( objectNode.getLocalName() ) )
        {
            throw new ValueSerializationException( "Expected an object value but got: " + objectNode );
        }
        return getObjectFieldNode( objectNode, key ) != null;
    }
View Full Code Here

        {
            return null;
        }
        if( !"object".equals( objectNode.getLocalName() ) )
        {
            throw new ValueSerializationException( "Expected an object value but got: " + objectNode );
        }
        Node fieldNode = getObjectFieldNode( objectNode, key );
        if( fieldNode == null )
        {
            return null;
View Full Code Here

        {
            return;
        }
        if( !( inputNode instanceof Element ) )
        {
            throw new ValueSerializationException( "Expected an Element but got " + inputNode );
        }
        NodeList arrayValues = inputNode.getChildNodes();
        for( int arrayValuesIndex = 0; arrayValuesIndex < arrayValues.getLength(); arrayValuesIndex++ )
        {
            Node arrayValue = arrayValues.item( arrayValuesIndex );
View Full Code Here

        {
            return;
        }
        if( !"array".equals( inputNode.getLocalName() ) )
        {
            throw new ValueSerializationException( "Expected an <array/> but got " + inputNode );
        }
        NodeList entriesNodes = inputNode.getChildNodes();
        for( int idx = 0; idx < entriesNodes.getLength(); idx++ )
        {
            Node entryNode = entriesNodes.item( idx );
View Full Code Here

        {
            return null;
        }
        if( !( inputNode instanceof Element ) )
        {
            throw new ValueSerializationException( "Excpected an Element but got " + inputNode );
        }
        NodeList fieldNodes = inputNode.getChildNodes();
        for( int idx = 0; idx < fieldNodes.getLength(); idx++ )
        {
            Node fieldNode = fieldNodes.item( idx );
View Full Code Here

            else
            {
                valuesModule = valuesModuleFinder.map( application );
                if( valuesModule == null )
                {
                    throw new ValueSerializationException( "Values Module provided by the finder Function was null." );
                }
                LOG.debug( "Will use a specific Module to build new ValueComposites instances: {}", valuesModule );
            }
        }
        return valuesModule;
View Full Code Here

        {
            throw ex;
        }
        catch( Exception ex )
        {
            throw new ValueSerializationException( "Could not deserialize value", ex );
        }
    }
View Full Code Here

        {
            throw ex;
        }
        catch( Exception ex )
        {
            throw new ValueSerializationException( "Could not deserialize value", ex );
        }
    }
View Full Code Here

TOP

Related Classes of org.qi4j.api.value.ValueSerializationException

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.