Examples of UnsupportedTranslationException


Examples of com.codiform.moo.UnsupportedTranslationException

        updateCollectionWithMatcher( sourceCollection, destinationCollection, translationSource, property );
      } else {
        updateCollectionInOrder( sourceCollection, destinationCollection, translationSource, property );
      }
    } else {
      throw new UnsupportedTranslationException( "Cannot update Collection from " + source.getClass().getName() );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

  public void updateMap( Object source, Map<Object, Object> destinationMap, TranslationSource translationSource, MapProperty property ) {
    if ( source instanceof Map ) {
      Map<Object, Object> sourceMap = (Map<Object, Object>)source;
      updateMapByKey( sourceMap, destinationMap, translationSource, property );
    } else {
      throw new UnsupportedTranslationException( "Cannot update Map from " + source.getClass().getName() );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

        return translatorFactory.getArrayTranslator().copyTo( value, fieldType );
      } else {
        return translatorFactory.getArrayTranslator().translate( value, fieldType.getComponentType(), translationSource );
      }
    } else {
      throw new UnsupportedTranslationException( String.format( "Cannot translate from source array type %s[] to destination type %s",
          valueType.getComponentType(), fieldType.getName() ) );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

    }
  }

  private Map<?, ?> copyMap(Map<?, ?> values, CollectionProperty property) {
    if( property.shouldItemsBeTranslated() ) {
      throw new UnsupportedTranslationException(
          "Support for translated maps not yet built." );
    } else if( configuration.isPerformingDefensiveCopies() ) {
      return new HashMap<Object, Object>(
          values );
    } else {
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

        return defensivelyCopySortedMap( value );
      } else {
        return value;
      }
    } else {
      throw new UnsupportedTranslationException(
          "Support for translated sorted maps not yet built" );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

      Class<?> annotationValue = property.getItemTranslationType();
      if( Comparable.class.isAssignableFrom( annotationValue ) ) {
        return copyAndTranslateSortedSet( original, translationSource,
            annotationValue );
      } else {
        throw new UnsupportedTranslationException(
            "Naturally sorted set cannot be translated into another naturally-sorted set if the destination type is not comparable: "
                + annotationValue );
      }
    } else {
      throw new UnsupportedTranslationException(
          "Support for translated sorted sets with comparators not yet built" );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

    if( source instanceof Map ) {
      Map<Object, Object> sourceMap = (Map<Object, Object>) source;
      updateMapByKey( sourceMap, destinationMap,
          translationSource, property );
    } else {
      throw new UnsupportedTranslationException(
          "Cannot update Map from "
              + source.getClass().getName() );
    }
  }
View Full Code Here

Examples of com.codiform.moo.UnsupportedTranslationException

        updateCollectionInOrder( sourceCollection,
            destinationCollection,
            translationSource, property );
      }
    } else {
      throw new UnsupportedTranslationException(
          "Cannot update Collection from "
              + source.getClass().getName() );
    }
  }
View Full Code Here

Examples of org.fcrepo.server.errors.UnsupportedTranslationException

            StreamIOException, UnsupportedTranslationException, ServerException {
        try {
            logger.debug("Grabbing deserializer for: " + format);
            DODeserializer des = m_deserializers.get(format);
            if (des == null) {
                throw new UnsupportedTranslationException("No deserializer exists for format: "
                        + format);
            }
            DODeserializer newDes = des.getInstance();
            newDes.deserialize(in, obj, encoding, transContext);
        } catch (UnsupportedEncodingException uee) {
            throw new UnsupportedTranslationException("Deserializer for format: "
                    + format + " does not support encoding: " + encoding);
        }
    }
View Full Code Here

Examples of org.fcrepo.server.errors.UnsupportedTranslationException

            StreamIOException, UnsupportedTranslationException, ServerException {
        try {
            logger.debug("Grabbing serializer for: " + format);
            DOSerializer ser = m_serializers.get(format);
            if (ser == null) {
                throw new UnsupportedTranslationException("No serializer exists for format: "
                        + format);
            }
            DOSerializer newSer = ser.getInstance();
            newSer.serialize(obj, out, encoding, transContext);
        } catch (UnsupportedEncodingException uee) {
            throw new UnsupportedTranslationException("Serializer for format: "
                    + format + " does not support encoding: " + encoding);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.