Class FusekiNetLib


  • public class FusekiNetLib
    extends java.lang.Object
    Library of HTTP/network related functions.
    • Constructor Summary

      Constructors 
      Constructor Description
      FusekiNetLib()  
    • Method Summary

      All Methods Static Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static void addDataInto​(Graph data, DatasetGraph dsg, Node graphName)  
      static void addDataInto​(DatasetGraph src, DatasetGraph dest)  
      static int choosePort()
      Deprecated.
      static java.lang.String fmtRequest​(javax.servlet.http.HttpServletRequest request)
      Helper function for displaying an HttpServletRequest
      static java.lang.String getAccept​(javax.servlet.http.HttpServletRequest httpRequest)  
      static ContentType getContentType​(javax.servlet.http.HttpServletRequest request)
      Get the content type of an action or return the default.
      static Lang getLangFromAction​(HttpAction action, Lang dft)
      Get the incoming Lang based on Content-Type of an action.
      static org.apache.jena.ext.com.google.common.collect.Multimap<java.lang.String,​java.lang.String> parseQueryString​(javax.servlet.http.HttpServletRequest req)
      Parse the query string - do not process the body even for a form
      static java.lang.String safeParameter​(javax.servlet.http.HttpServletRequest request, java.lang.String pName)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FusekiNetLib

        public FusekiNetLib()
    • Method Detail

      • getContentType

        public static ContentType getContentType​(javax.servlet.http.HttpServletRequest request)
        Get the content type of an action or return the default.
        Parameters:
        request -
        Returns:
        ContentType
      • getLangFromAction

        public static Lang getLangFromAction​(HttpAction action,
                                             Lang dft)
        Get the incoming Lang based on Content-Type of an action.
        Parameters:
        action -
        dft - Default if no "Content-Type:" found.
        Returns:
        ContentType
      • getAccept

        public static java.lang.String getAccept​(javax.servlet.http.HttpServletRequest httpRequest)
      • fmtRequest

        public static java.lang.String fmtRequest​(javax.servlet.http.HttpServletRequest request)
        Helper function for displaying an HttpServletRequest
      • parseQueryString

        public static org.apache.jena.ext.com.google.common.collect.Multimap<java.lang.String,​java.lang.String> parseQueryString​(javax.servlet.http.HttpServletRequest req)
        Parse the query string - do not process the body even for a form
      • safeParameter

        public static java.lang.String safeParameter​(javax.servlet.http.HttpServletRequest request,
                                                     java.lang.String pName)
      • choosePort

        @Deprecated
        public static int choosePort()
        Deprecated.
        Use WebLib.choosePort() or start servers with port 0 and then ask which port was allocated.