// Path: src/main/java/com/atomgraph/processor/model/TemplateCall.java
// public interface TemplateCall
// {
//     
//     Template getTemplate();
// 
//     TemplateCall applyArguments(MultivaluedMap<String, String> queryParams);
// 
//     TemplateCall applyDefaults();
//     
//     StmtIterator listArguments();
//     
//     boolean hasArgument(Property predicate);
//     
//     Resource getArgument(Property predicate);
//     
//     boolean hasArgument(String varName, RDFNode object);
//     
//     Resource getArgument(String varName, RDFNode object);
//     
//     Statement getArgumentProperty(Property predicate);
//     
//     TemplateCall arg(Parameter param, RDFNode value);
//     
//     TemplateCall arg(Resource arg);
//     
//     TemplateCall validateOptionals();
//     
//     QuerySolutionMap getQuerySolutionMap();
//     
//     Resource build();
//     
// }


import com.atomgraph.core.util.Link;
import com.atomgraph.processor.model.TemplateCall;
import com.atomgraph.processor.vocabulary.LDT;
import java.io.IOException;
import java.net.URI;
import java.util.Optional;
import javax.inject.Inject;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.UriInfo;
import org.apache.jena.ontology.Ontology;
/*
 * Copyright 2021 Martynas Jusevičius <martynas@atomgraph.com>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.atomgraph.server.filter.response;


/**
 *
 * @author {@literal Martynas Jusevičius <martynas@atomgraph.com>}
 */
public class ResponseHeaderFilter implements ContainerResponseFilter
{
    
    @Inject javax.inject.Provider<Optional<Ontology>> ontology;
    @Inject javax.inject.Provider<Optional<TemplateCall>> templateCall;
    
    @Context UriInfo uriInfo;
    
// Path: src/main/java/com/atomgraph/processor/model/TemplateCall.java
// public interface TemplateCall
// {
//     
//     Template getTemplate();
// 
//     TemplateCall applyArguments(MultivaluedMap<String, String> queryParams);
// 
//     TemplateCall applyDefaults();
//     
//     StmtIterator listArguments();
//     
//     boolean hasArgument(Property predicate);
//     
//     Resource getArgument(Property predicate);
//     
//     boolean hasArgument(String varName, RDFNode object);
//     
//     Resource getArgument(String varName, RDFNode object);
//     
//     Statement getArgumentProperty(Property predicate);
//     
//     TemplateCall arg(Parameter param, RDFNode value);
//     
//     TemplateCall arg(Resource arg);
//     
//     TemplateCall validateOptionals();
//     
//     QuerySolutionMap getQuerySolutionMap();
//     
//     Resource build();
//     
// }


// Path: src/main/java/com/atomgraph/server/filter/response/ResponseHeaderFilter.java
import com.atomgraph.core.util.Link;
import com.atomgraph.processor.model.TemplateCall;
import com.atomgraph.processor.vocabulary.LDT;
import java.io.IOException;
import java.net.URI;
import java.util.Optional;
import javax.inject.Inject;
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.ContainerResponseContext;
import javax.ws.rs.container.ContainerResponseFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.UriInfo;
import org.apache.jena.ontology.Ontology;

/*
 * Copyright 2021 Martynas Jusevičius <martynas@atomgraph.com>.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.atomgraph.server.filter.response;


/**
 *
 * @author {@literal Martynas Jusevičius <martynas@atomgraph.com>}
 */
public class ResponseHeaderFilter implements ContainerResponseFilter
{
    
    @Inject javax.inject.Provider<Optional<Ontology>> ontology;
    @Inject javax.inject.Provider<Optional<TemplateCall>> templateCall;
    
    @Context UriInfo uriInfo;
    
    @Override