org.mulgara.jena.rdf.arp.lang
Class LanguageTag
java.lang.Object
org.mulgara.jena.rdf.arp.lang.LanguageTag
- All Implemented Interfaces:
- LanguageTagCodes
- Direct Known Subclasses:
- IanaLanguageTag
public class LanguageTag
- extends Object
- implements LanguageTagCodes
RFC 3066, "Tags for the Identification of Languages".
- Author:
- jjc
| Fields inherited from interface org.mulgara.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 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LanguageTag
public LanguageTag(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.
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 String errorMessage()
- An error message describing the reason the tag
is illegal.
- Returns:
- null if legal, or an error message if not.
Copyright © 2011. All Rights Reserved.