Examples of UnmarshallException


Examples of com.metaparadigm.jsonrpc.UnmarshallException

  }

  private Geometry createMultiPoint(Geometry geometry, JSONObject json) throws UnmarshallException {
    JSONArray points = json.getJSONArray("points");
    if (points == null) {
      throw new UnmarshallException("points are missing");
    }
    Geometry[] geometries = new Geometry[points.length()];
    for (int i = 0; i < points.length(); i++) {
      Geometry point = new Geometry(Geometry.POINT, geometry.getSrid(), geometry.getPrecision());
      geometries[i] = createPoint(point, points.getJSONObject(i));
View Full Code Here

Examples of com.metaparadigm.jsonrpc.UnmarshallException

  }

  private Geometry createMultiLineString(Geometry geometry, JSONObject json) throws UnmarshallException {
    JSONArray lineStrings = json.getJSONArray("lineStrings");
    if (lineStrings == null) {
      throw new UnmarshallException("lineStrings are missing");
    }
    Geometry[] geometries = new Geometry[lineStrings.length()];
    for (int i = 0; i < lineStrings.length(); i++) {
      Geometry lineString = new Geometry("LineString", geometry.getSrid(), geometry.getPrecision());
      geometries[i] = createLineString(lineString, lineStrings.getJSONObject(i));
View Full Code Here

Examples of com.metaparadigm.jsonrpc.UnmarshallException

  }

  private Geometry createMultiPolygon(Geometry geometry, JSONObject json) throws UnmarshallException {
    JSONArray polygons = json.getJSONArray("polygons");
    if (polygons == null) {
      throw new UnmarshallException("polygons are missing");
    }
    Geometry[] geometries = new Geometry[polygons.length()];
    for (int i = 0; i < polygons.length(); i++) {
      Geometry polygon = new Geometry("Polygon", geometry.getSrid(), geometry.getPrecision());
      geometries[i] = createPolygon(polygon, polygons.getJSONObject(i));
View Full Code Here

Examples of com.metaparadigm.jsonrpc.UnmarshallException

      throws UnmarshallException {
    return ObjectMatch.OKAY;
  }

  public Object unmarshall(SerializerState state, Class clazz, Object jso) throws UnmarshallException {
    throw new UnmarshallException("Cannot unmarshall Writable");
  }
View Full Code Here

Examples of org.jabsorb.serializer.UnmarshallException

      throws UnmarshallException {
    try {
      JSONObject jso = (JSONObject) o;
      String name = jso.getString("_name");
      if (name == null)
        throw new UnmarshallException("The specified JSONObject of type "
            + clazz.getName() + " didn't contain a _name attribute");
      return Enum.valueOf(clazz, name);
    } catch (JSONException e) {
      e.printStackTrace();
      throw new UnmarshallException(e.getMessage());
    }
  }
View Full Code Here

Examples of org.jabsorb.serializer.UnmarshallException

    try {
      JSONObject jso = (JSONObject) arg2;
      int value = jso.getInt("value");
      return BigInteger.valueOf(Integer.valueOf(value).longValue());
    } catch (Throwable t) {
      throw new UnmarshallException(t.getMessage());
    }
  }
View Full Code Here

Examples of org.purl.sword.base.UnmarshallException

         }
      }
      catch( Exception ex )
      {
         log.error("Unable to parse an element in Source: " + ex.getMessage());
         throw new UnmarshallException("Unable to parse an element in Source", ex);
      }

      SwordValidationInfo result = null;
      if( validationProperties != null )
      {
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.exceptions.impl.UnmarshallException

                }
            }
        } catch (JSONException e) {
            throw (NoSuchElementException) new NoSuchElementException(e.getMessage()).initCause(e);
        } catch (UnmarshallException e) {
            throw new UnmarshallException("arg " + (i + 1) + " " + e.getMessage(), e);
        }
        AccessibleObjectCandidate candidate = new AccessibleObjectCandidate(
                accessibleObject, parameterTypes, matches);

        return candidate;
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.exceptions.impl.UnmarshallException

                }
            }
        } catch (JSONException e) {
            throw (NoSuchElementException) new NoSuchElementException(e.getMessage()).initCause(e);
        } catch (UnmarshallException e) {
            throw new UnmarshallException("arg " + (i + 1) + " could not unmarshall", e);
        }

        return javaArgs;
    }
View Full Code Here

Examples of org.sf.bee.commons.remoting.jrpc.exceptions.impl.UnmarshallException

     * @param target target serialized representation of the object that the source object is being unmarshalled to.
     * @throws UnmarshallException if the source object is null, or is not already stored within a ProcessedObject.
     */
    public void setSerialized(Object source, Object target) throws UnmarshallException {
        if (source == null) {
            throw new UnmarshallException("source object may not be null");
        }
        ProcessedObject p = getProcessedObject(source);
        if (p == null) {
            // this should normally never happen- it's a sanity check.
            throw new UnmarshallException("source object must be already registered as a ProcessedObject " + source);
        }
        p.setSerialized(target);
    }
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.