use of com.atomgraph.core.io.UpdateRequestProvider in project Core by AtomGraph.
the class Application method getClient.
public static Client getClient(ClientConfig clientConfig) {
clientConfig.register(new ModelProvider());
clientConfig.register(new DatasetProvider());
clientConfig.register(new ResultSetProvider());
clientConfig.register(new QueryProvider());
// TO-DO: UpdateRequestProvider
clientConfig.register(new UpdateRequestProvider());
Client client = ClientBuilder.newClient(clientConfig);
return client;
}
use of com.atomgraph.core.io.UpdateRequestProvider in project Core by AtomGraph.
the class Application method init.
@PostConstruct
public void init() {
// handles all
register(QueriedResourceBase.class);
// handles /sparql queries
register(SPARQLEndpointImpl.class);
// handles /service requests
register(GraphStoreImpl.class);
register(new ModelProvider());
register(new DatasetProvider());
register(new ResultSetProvider());
register(QueryParamProvider.class);
register(new QueryProvider());
register(new UpdateRequestProvider());
register(new BadGatewayExceptionMapper());
register(new NoReaderForLangExceptionMapper());
register(new RiotExceptionMapper());
register(new AbstractBinder() {
@Override
protected void configure() {
bind(new MediaTypes()).to(MediaTypes.class);
}
});
register(new AbstractBinder() {
@Override
protected void configure() {
bind(service).to(Service.class);
}
});
}
use of com.atomgraph.core.io.UpdateRequestProvider in project Processor by AtomGraph.
the class Application method init.
/**
* Initializes JAX-RS resource classes and providers.
*/
@PostConstruct
@Override
public void init() {
// handles /
register(ResourceBase.class);
register(new AbstractBinder() {
@Override
protected void configure() {
bind(application).to(com.atomgraph.processor.model.Application.class);
}
});
register(new AbstractBinder() {
@Override
protected void configure() {
bindFactory(new OntologyFactory(ontology)).to(new TypeLiteral<Optional<Ontology>>() {
});
}
});
register(new AbstractBinder() {
@Override
protected void configure() {
bind(service).to(Service.class);
}
});
register(new AbstractBinder() {
@Override
protected void configure() {
bindFactory(TemplateCallFactory.class).to(new TypeLiteral<Optional<TemplateCall>>() {
}).in(RequestScoped.class);
}
});
register(new AbstractBinder() {
@Override
protected void configure() {
bind(new MediaTypes()).to(MediaTypes.class);
}
});
register(new SkolemizingModelProvider());
register(new ResultSetProvider());
register(new QueryParamProvider());
register(new QueryProvider());
register(new UpdateRequestProvider());
register(new DataManagerFactory(getDataManager()));
register(RiotExceptionMapper.class);
register(ModelExceptionMapper.class);
register(SPINConstraintViolationExceptionMapper.class);
register(SHACLConstraintViolationExceptionMapper.class);
register(DatatypeFormatExceptionMapper.class);
register(NotFoundExceptionMapper.class);
register(NoReaderForLangExceptionMapper.class);
register(NotSupportedExceptionMapper.class);
register(NotAcceptableExceptionMapper.class);
register(BadGatewayExceptionMapper.class);
register(ConfigurationExceptionMapper.class);
register(OntologyExceptionMapper.class);
register(ParameterExceptionMapper.class);
register(QueryParseExceptionMapper.class);
register(new ResponseHeaderFilter());
// if (log.isTraceEnabled()) log.trace("Application.init() with Classes: {} and Singletons: {}", classes, singletons);
}
Aggregations