Projects >> queryExpander >>8c7bc881c57b533e8b60a5c3b1cf003e952c0744

Chunk
Conflicting content
    }

    @GET
<<<<<<< HEAD
=======
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
>>>>>>> fee02dcf4a13b5f1f667df5be2a42d174f998e98
    @Path("/expand") 
    public ExpanderBean expandXMLGet(@QueryParam("query") String query,
            @QueryParam("parameter") List parameters ,            
Solution content
    }

    @GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXML(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        //Call scrub so that we validate that the query is provided 
        if (query == null){
            throw new QueryExpanderException("query paramater is missing!");
        }
        ExpanderBean result = new ExpanderBean();
        result.setOrginalQuery(query);
        result.setExpandedQuery(queryExpander.expandWithStrategy(query, strategy));
        return result;
    }

    @GET
    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXMLGet(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        return expandXMLGet(query, strategy);
    }

    @POST
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/expandXML") 
    public ExpanderBean expandAsXML(@QueryParam("query") String query,
            @QueryParam("parameter") List parameters ,            
            @QueryParam("inputURI") String inputURI) throws QueryExpansionException{
        return expandXML(query, parameters, inputURI);
    }
        
    @GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/expandXML") 
    public ExpanderBean expandAsXMLGet(@QueryParam("query") String query,
            @QueryParam("parameter") List parameters ,            
            @QueryParam("inputURI") String inputURI) throws QueryExpansionException{
        return expandXML(query, parameters, inputURI);
    }
        
    @POST
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/URISpacesPerGraph") 
    public List URISpacesPerGraphAsXML() throws QueryExpansionException{
        for (String graph:URISpacesPerGraph.keySet()){
            return mapURIasHtml(inputURI, graph, httpServletRequest);
    }    
        ArrayList results = new ArrayList();
}
        Map> URISpacesPerGraph = queryExpander.getURISpacesPerGraph();
           results.add(new URISpacesInGraphBean(graph, URISpacesPerGraph.get(graph)));
        }
        return results;
    }
    
    @GET
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/URISpacesPerGraph") 
    public List URISpacesPerGraphAsXMLGet() throws QueryExpansionException{
        return URISpacesPerGraphAsXML();
    }

    @POST
    @Produces(MediaType.TEXT_HTML)
    @Path("/URISpacesPerGraph") 
    public Response URISpacesPerGraphAsHtml(@Context HttpServletRequest httpServletRequest) 
            throws QueryExpansionException, IDMapperException{
        Map> URISpacesPerGraph = queryExpander.getURISpacesPerGraph();
        
        StringBuilder sb = topAndSide("URI Spaces per Graph (Query Context)", httpServletRequest);
        sb.append("

URISpaces Per Graph

\n"); sb.append("

"); sb.append(""); sb.append(""); sb.append(""); sb.append(""); sb.append(""); for (String graph:URISpacesPerGraph.keySet()){ for (String URISpace:URISpacesPerGraph.get(graph)){ sb.append(""); sb.append(""); sb.append(""); sb.append(""); } sb.append(""); sb.append(""); } sb.append(END); return Response.ok(sb.toString(), MediaType.TEXT_HTML).build(); } @GET @Produces(MediaType.TEXT_HTML) @Path("/URISpacesPerGraph") public Response URISpacesPerGraphAsHtmlGet(@Context HttpServletRequest httpServletRequest) throws QueryExpansionException, IDMapperException { return URISpacesPerGraphAsHtml(httpServletRequest); } @POST @Produces(MediaType.TEXT_HTML) @Path("/mapURI") public Response mapURIasHtml(@QueryParam("inputURI") String inputURI, @QueryParam("graph") String graph, @Context HttpServletRequest httpServletRequest) throws QueryExpansionException, IDMapperException{ StringBuilder sb = topAndSide("URI Mappings available per Graph (Query Context)", httpServletRequest); if (inputURI != null && !inputURI.isEmpty()) { List mappings = queryExpander.mapURI(inputURI, graph); sb.append("

URI Mappings for "); sb.append(inputURI); sb.append("

\n"); if (graph != null && !graph.isEmpty()){ sb.append("

Limited to ones fro graph "); sb.append(graph); sb.append("

\n"); } sb.append("

"); sb.append("

    "); for (String mapping:mappings){ sb.append("
  • "); sb.append(mapping); sb.append("
  • "); } sb.append("
"); } sb.append(URI_MAPPING_FORM); sb.append(END); return Response.ok(sb.toString(), MediaType.TEXT_HTML).build(); } @GET @Produces(MediaType.TEXT_HTML) @Path("/mapURI") public Response mapURIasHtmlGet(@QueryParam("inputURI") String inputURI, @QueryParam("graph") String graph, @Context HttpServletRequest httpServletRequest) throws QueryExpansionException, IDMapperException{
GraphNameSpace
"); sb.append(graph); sb.append(""); sb.append(URISpace); sb.append("

File
QueryExpanderWsServer.java
Developer's decision
Manual
Kind of conflict
Annotation
Chunk
Conflicting content
    }
    
    @POST
<<<<<<< HEAD
    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXML(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        //Call scrub so that we validate that the query is provided 
        if (query == null){
            throw new QueryExpanderException("query paramater is missing!");
        }
        ExpanderBean result = new ExpanderBean();
        result.setOrginalQuery(query);
        result.setExpandedQuery(queryExpander.expandWithStrategy(query, strategy));
        return result;
    }

    @GET
    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXMLGet(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        return expandXMLGet(query, strategy);
    }

    @POST
    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
=======
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
>>>>>>> fee02dcf4a13b5f1f667df5be2a42d174f998e98
    @Path("/expandXML") 
    public ExpanderBean expandAsXML(@QueryParam("query") String query,
            @QueryParam("parameter") List parameters ,            
Solution content
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXML(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        //Call scrub so that we validate that the query is provided 
        if (query == null){
            throw new QueryExpanderException("query paramater is missing!");
        }
        ExpanderBean result = new ExpanderBean();
        result.setOrginalQuery(query);
        result.setExpandedQuery(queryExpander.expandWithStrategy(query, strategy));
        return result;
    }

    @GET
    @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML})
    @Path("/expandWithStrategy") 
    public ExpanderBean expandXMLGet(@QueryParam("query") String query,
            @QueryParam("strategy") String strategy) throws QueryExpansionException{
        return expandXMLGet(query, strategy);
    }

    @POST
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    @Path("/expandXML") 
    public ExpanderBean expandAsXML(@QueryParam("query") String query,
            @QueryParam("parameter") List parameters ,            
File
QueryExpanderWsServer.java
Developer's decision
Combination
Kind of conflict
Annotation
Method declaration