NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

gov.nist.javax.sip.header
Class ContentLanguage

java.lang.Object
  extended by gov.nist.core.GenericObject
      extended by gov.nist.javax.sip.header.SIPObject
          extended by gov.nist.javax.sip.header.SIPHeader
              extended by gov.nist.javax.sip.header.ContentLanguage
All Implemented Interfaces:
HeaderExt, SIPHeaderNames, Serializable, Cloneable, ContentLanguageHeader, Header

public class ContentLanguage
extends SIPHeader
implements ContentLanguageHeader

ContentLanguage header

Fielding, et al.            Standards Track                   [Page 118]
RFC 2616                        HTTP/1.1                       June 1999

  14.12 Content-Language

   The Content-Language entity-header field describes the natural
   language(s) of the intended audience for the enclosed entity. Note
   that this might not be equivalent to all the languages used within
   the entity-body.

       Content-Language  = "Content-Language" ":" 1#language-tag

   Language tags are defined in section 3.10. The primary purpose of
   Content-Language is to allow a user to identify and differentiate
   entities according to the user's own preferred language. Thus, if the
   body content is intended only for a Danish-literate audience, the
   appropriate field is

       Content-Language: da

   If no Content-Language is specified, the default is that the content
   is intended for all language audiences. This might mean that the
   sender does not consider it to be specific to any natural language,
   or that the sender does not know for which language it is intended.

   Multiple languages MAY be listed for content that is intended for
   multiple audiences. For example, a rendition of the "Treaty of
   Waitangi," presented simultaneously in the original Maori and English
   versions, would call for

       Content-Language: mi, en

   However, just because multiple languages are present within an entity
   does not mean that it is intended for multiple linguistic audiences.
   An example would be a beginner's language primer, such as "A First
   Lesson in Latin," which is clearly intended to be used by an
   English-literate audience. In this case, the Content-Language would
   properly only include "en".

   Content-Language MAY be applied to any media type -- it is not
   limited to textual documents.

Since:
1.1
Version:
1.2 $Revision: 1.8 $ $Date: 2009/07/17 18:57:29 $
Author:
M. Ranganathan
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface javax.sip.header.ContentLanguageHeader
NAME
 
Fields inherited from interface gov.nist.javax.sip.header.SIPHeaderNames
ACCEPT, ACCEPT_ENCODING, ACCEPT_LANGUAGE, ALERT_INFO, ALLOW, ALLOW_EVENTS, AUTHENTICATION_INFO, AUTHORIZATION, CALL_ID, CALL_INFO, CONTACT, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_TYPE, CSEQ, DATE, ERROR_INFO, EVENT, EXPIRES, FROM, IN_REPLY_TO, JOIN, MAX_FORWARDS, MIME_VERSION, MIN_EXPIRES, MIN_SE, ORGANIZATION, PRIORITY, PROXY_AUTHENTICATE, PROXY_AUTHORIZATION, PROXY_REQUIRE, RACK, REASON, RECORD_ROUTE, REFERRED_BY, REPLACES, REPLY_TO, REQUIRE, RETRY_AFTER, ROUTE, RSEQ, SERVER, SESSION_EXPIRES, SIP_ETAG, SIP_IF_MATCH, SUBJECT, SUBSCRIPTION_STATE, SUPPORTED, TIMESTAMP, TO, UNSUPPORTED, USER_AGENT, VIA, WARNING, WWW_AUTHENTICATE
 
Constructor Summary
ContentLanguage()
           
ContentLanguage(String languageTag)
          Default constructor.
 
Method Summary
 Object clone()
          Clones this object.
 String encodeBody()
          Canonical encoding of the value of the header.
 Locale getContentLanguage()
          Gets the language value of the ContentLanguageHeader.
 String getLanguageTag()
          get the languageTag field.
 void setContentLanguage(Locale language)
          Sets the language parameter of this ContentLanguageHeader.
 void setLanguageTag(String languageTag)
          set the languageTag field
 
Methods inherited from class gov.nist.javax.sip.header.SIPHeader
encode, encode, getHeaderName, getHeaderValue, getName, getValue, hashCode, isHeaderList, setHeaderName, toString
 
Methods inherited from class gov.nist.javax.sip.header.SIPObject
dbgPrint, debugDump, debugDump, equals, match
 
Methods inherited from class gov.nist.core.GenericObject
getClassFromName, getMatcher, isMySubclass, makeClone, merge, setMatcher
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.sip.header.Header
equals, getName, hashCode, toString
 

Constructor Detail

ContentLanguage

public ContentLanguage()

ContentLanguage

public ContentLanguage(String languageTag)
Default constructor.

Parameters:
languageTag - String to set
Method Detail

encodeBody

public String encodeBody()
Canonical encoding of the value of the header.

Returns:
encoded body of header.

getLanguageTag

public String getLanguageTag()
get the languageTag field.

Returns:
String

setLanguageTag

public void setLanguageTag(String languageTag)
set the languageTag field

Parameters:
languageTag - -- language tag to set.

getContentLanguage

public Locale getContentLanguage()
Gets the language value of the ContentLanguageHeader.

Specified by:
getContentLanguage in interface ContentLanguageHeader
Returns:
the Locale value of this ContentLanguageHeader

setContentLanguage

public void setContentLanguage(Locale language)
Sets the language parameter of this ContentLanguageHeader.

Specified by:
setContentLanguage in interface ContentLanguageHeader
Parameters:
language - - the new Locale value of the language of ContentLanguageHeader

clone

public Object clone()
Description copied from class: gov.nist.core.GenericObject
Clones this object.

Specified by:
clone in interface Header
Overrides:
clone in class gov.nist.core.GenericObject
Returns:
a deep copy of Header

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.