@Override
  protected void doLoad(InputStream inputStream, Map<?, ?> options) throws IOException {
    if (options == null) {
      options = Collections.<String, Object>emptyMap();
    }

    if (inputStream instanceof URIConverter.Loadable) {

      ((URIConverter.Loadable) inputStream).loadResource(this);

    } else {

      final ObjectMapper mapper = new ObjectMapper();
      final JacksonOptions jacksonOptions = getOptions(options);
      mapper.setDateFormat(jacksonOptions.dateFormat);
      mapper.registerModule(new EMFModule(this.getResourceSet(), jacksonOptions));

      ContextAttributes attributes =
          ContextAttributes.getEmpty().withSharedAttribute("resource", this);

      mapper.reader().with(attributes).forType(Resource.class).readValue(inputStream);
    }
  }
 @Override
 public SerializerProvider setAttribute(Object key, Object value) {
   _attributes = _attributes.withPerCallAttribute(key, value);
   return this;
 }
 @Override
 public Object getAttribute(Object key) {
   return _attributes.getAttribute(key);
 }