Tabnine Logo
MediaType.equals
Code IndexAdd Tabnine to your IDE (free)

How to use
equals
method
in
org.apache.jena.atlas.web.MediaType

Best Java code snippets using org.apache.jena.atlas.web.MediaType.equals (Showing top 4 results out of 315)

origin: org.apache.clerezza.ext/org.apache.jena.jena-arq

@Override
public boolean equals(Object obj)
{
  if (this == obj) return true ;
  if (obj == null) return false ;
  if (getClass() != obj.getClass()) return false ;
  ContentType other = (ContentType)obj ;
  if (mediaType == null)
  {
    if (other.mediaType != null) return false ;
  } else
    if (!mediaType.equals(other.mediaType)) return false ;
  return true ;
}

origin: apache/jena

@Override
public boolean equals(Object obj) {
  if ( this == obj )
    return true ;
  if ( obj == null )
    return false ;
  if ( getClass() != obj.getClass() )
    return false ;
  ContentType other = (ContentType)obj ;
  if ( mediaType == null ) {
    if ( other.mediaType != null )
      return false ;
  } else if ( !mediaType.equals(other.mediaType) )
    return false ;
  return true ;
}
origin: apache/jena

protected void execute(HttpServletRequest request, HttpServletResponse response) {
  MediaType mt = ConNeg.chooseContentType(request, jsonOrTextOffer, null) ;
  //MediaType mt = ConNeg.chooseContentType(request, jsonOrTextOffer, DEF.acceptJSON) ;
  
  if ( mt != null && mt.equals(DEF.acceptJSON) ) {
    executeJSON(request, response);
  } else {
    executeHTML(request, response);
  }
}

origin: org.apache.jena/jena-fuseki-core

protected void execute(HttpServletRequest request, HttpServletResponse response) {
  MediaType mt = ConNeg.chooseContentType(request, jsonOrTextOffer, null) ;
  //MediaType mt = ConNeg.chooseContentType(request, jsonOrTextOffer, DEF.acceptJSON) ;
  
  if ( mt != null && mt.equals(DEF.acceptJSON) ) {
    executeJSON(request, response);
  } else {
    executeHTML(request, response);
  }
}

org.apache.jena.atlas.webMediaTypeequals

Popular methods of MediaType

  • getContentType
  • toHeaderString
    Format for use in HTTP header
  • create
  • getCharset
  • <init>
  • getParameter
  • getSubType
  • getType
  • hashCode
  • parse
  • setParameter
  • toString
    Format to show structure - intentionally different from header form so you can tell parsing happened
  • setParameter,
  • toString,
  • createFromContentType

Popular in Java

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now