Codota Logo
Representation.setLanguages
Code IndexAdd Codota to your IDE (free)

How to use
setLanguages
method
in
org.restlet.representation.Representation

Best Java code snippets using org.restlet.representation.Representation.setLanguages (Showing top 5 results out of 315)

  • Common ways to obtain Representation
private void myMethod () {
Representation r =
  • Codota Iconnew EmptyRepresentation()
  • Codota IconClientResource clientResource;clientResource.get()
  • Codota IconResponse response;response.getEntity()
  • Smart code suggestions by Codota
}
origin: org.restlet.osgi/org.restlet

@Override
public void setLanguages(List<Language> languages) {
  getWrappedRepresentation().setLanguages(languages);
}
origin: apache/attic-polygene-java

private Representation entityHeaders( Representation representation, EntityState entityState )
{
  representation.setModificationDate( java.util.Date.from( entityState.lastModified() ) );
  representation.setTag( new Tag( "" + entityState.version() ) );
  representation.setCharacterSet( CharacterSet.UTF_8 );
  representation.setLanguages( Collections.singletonList( Language.ENGLISH ) );
  return representation;
}
origin: org.restlet/org.restlet.ext.xml

    .setEncodings(representation.getEncodings());
resultRepresentation
    .setLanguages(representation.getLanguages());
origin: org.restlet/org.restlet.ext.xml

  @Override
  public Representation toRepresentation(Object object,
      Variant targetVariant, UniformResource resource) throws IOException {
    Representation result = null;

    if (object instanceof Document) {
      result = new DomRepresentation(targetVariant == null ? null
          : targetVariant.getMediaType(), (Document) object);
    }

    if ((result != null) && (targetVariant != null)) {
      // Copy the variant metadata
      result.setCharacterSet(targetVariant.getCharacterSet());
      result.setMediaType(targetVariant.getMediaType());
      result.setEncodings(targetVariant.getEncodings());
      result.setLanguages(targetVariant.getLanguages());
    }

    return result;
  }
}
origin: org.restlet.osgi/org.restlet

/**
 * Constructor from a variant.
 * 
 * @param variant
 *            The variant to copy.
 * @param modificationDate
 *            The modification date.
 * @param tag
 *            The tag.
 */
public Representation(Variant variant, Date modificationDate, Tag tag) {
  setCharacterSet(variant.getCharacterSet());
  setEncodings(variant.getEncodings());
  setLocationRef(variant.getLocationRef());
  setLanguages(variant.getLanguages());
  setMediaType(variant.getMediaType());
  setModificationDate(modificationDate);
  setTag(tag);
}
org.restlet.representationRepresentationsetLanguages

Popular methods of Representation

  • getMediaType
  • getStream
    Returns a stream with the representation's content. This method is ensured to return a fresh stream
  • getText
    Converts the representation to a string value. Be careful when using this method as the conversion o
  • isAvailable
    Indicates if some fresh content is potentially available, without having to actually call one of the
  • write
    Writes the representation to a byte channel. This method is ensured to write the full content for ea
  • setMediaType
  • getCharacterSet
  • getReader
    Returns a characters reader with the representation's content. This method is ensured to return a fr
  • getSize
    Returns the total size in bytes if known, UNKNOWN_SIZE (-1) otherwise. When ranges are used, this mi
  • setCharacterSet
  • getModificationDate
  • release
    Releases the representation and all associated objects like streams, channels or files which are use
  • getModificationDate,
  • release,
  • getLanguages,
  • setModificationDate,
  • getEncodings,
  • getLocationRef,
  • setTag,
  • exhaust,
  • getDisposition,
  • getTag

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now