com.hp.hpl.jena.rdf.arp.lang
Class LanguageTag

java.lang.Object
  |
  +--com.hp.hpl.jena.rdf.arp.lang.LanguageTag
All Implemented Interfaces:
LanguageTagCodes
Direct Known Subclasses:
IanaLanguageTag

public class LanguageTag
extends java.lang.Object
implements LanguageTagCodes

RFC 3066, "Tags for the Identification of Languages".

Author:
jjc

Fields inherited from interface com.hp.hpl.jena.rdf.arp.lang.LanguageTagCodes
LT_DEFAULT, LT_EXTRA, LT_IANA, LT_IANA_DEPRECATED, LT_ILLEGAL, LT_ISO3166, LT_ISO639, LT_LOCAL_USE, LT_MULTIPLE, LT_PRIVATE_USE, LT_UNDETERMINED
 
Constructor Summary
LanguageTag(java.lang.String tag)
          Creates new RFC3066 LanguageTag.
 
Method Summary
 java.lang.String errorMessage()
          An error message describing the reason the tag is illegal.
 int tagType()
          The properties of this LanguageTag, expressed as a bitwise or of fields from LanguageTagCodes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageTag

public LanguageTag(java.lang.String tag)
            throws LanguageTagSyntaxException
Creates new RFC3066 LanguageTag.
Parameters:
tag - The tag to parse and analyse.
Throws:
LanguageTagSyntaxException - If the syntactic rules of RFC3066 section 2.1 are broken.
Method Detail

tagType

public int tagType()
The properties of this LanguageTag, expressed as a bitwise or of fields from LanguageTagCodes. If the tag is illegal only LT_ILLEGAL is reported. Examples include:
LT_ISO639
en English.
LT_ISO639|LT_ISO3166
en-GB British English
LT_ILLEGAL
en-ENGLAND No such country. Never returned in combination with other values.
LT_PRIVATE_USE
x-en-ENGLAND Private tag with private semantics.
LT_IANA|LT_EXTRA
i-klingon-trekkie Klingon + "trekkie"
LT_IANA_DEPRECATED
LT_MULTIPLE|LT_ISO3166|LT_EXTRA
mul-CH-dialects
LT_ISO639|LT_ISO3166|LT_IANA|LT_EXTRA
sgn-US-MA Martha's Vineyard Sign Language
Returns:
A bitwise or of all LT_xxx values that apply.

errorMessage

public java.lang.String errorMessage()
An error message describing the reason the tag is illegal.
Returns:
null if legal, or an error message if not.


Copyright 2001 Hewlett-Packard. All Rights Reserved.