Package org.culturegraph.resolver

Examples of org.culturegraph.resolver.ResolverException


      return null;
    JsonNode rootNode;
    try {
      rootNode = mapper.readValue(entityDesc.toString(), JsonNode.class);
    } catch (Exception e) {
      throw new ResolverException(this.getId(),
          ResolverExceptionCode.REMOTE_RESOLVER_ERROR, e);
    }
    return rootNode;
  }
View Full Code Here


        this.id = id;
    }

    public R getResponse(ResolverRequest request) throws ResolverException {
        R ret = null;
        ResolverException storedException = null;
        // resolve identifier
        for (DataProvider<R> resolver : dataProviders) {
            if (request.getIdentifier()
                    .matches(resolver.getIdentifierPattern())) {
                try {
                    ret = resolver.getResponse(request);
                    break;
                } catch (ResolverException e) {
                    storedException = e;
                }
            }
            if (storedException != null) {
                throw storedException;
            }
        }
        if (ret == null) {
            throw new ResolverException(this.id,
                    ResolverExceptionCode.UNSUPPORTED_IDENTIFIER_SCHEME);
        }
        return ret;
    }
View Full Code Here

TOP

Related Classes of org.culturegraph.resolver.ResolverException

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.