XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class LanguageMap

java.lang.Object
  extended by org.xbrlapi.impl.LanguageMap

public class LanguageMap
extends Object

Enables easy management of collections of language definitions.

Author:
Geoff Shuetrim (geoff@galexy.net)

Constructor Summary
LanguageMap()
           
 
Method Summary
 void addAll(List<Language> languages)
          Adds a list of languages to the map.
 void addLanguage(Language language)
          Adds a language to the map.
 boolean contains(String code, String encoding)
           
 Language get(String code, String encoding)
           
 Set<String> getCodes()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LanguageMap

public LanguageMap()
Method Detail

addLanguage

public void addLanguage(Language language)
                 throws XBRLException
Adds a language to the map.

Parameters:
language - The language to add.
Throws:
XBRLException

addAll

public void addAll(List<Language> languages)
            throws XBRLException
Adds a list of languages to the map.

Parameters:
languages - The languages to add.
Throws:
XBRLException

getCodes

public Set<String> getCodes()
Returns:
the set of all codes of languages in the map.

contains

public boolean contains(String code,
                        String encoding)
Parameters:
code - The code to test for.
encoding - The encoding to test for.
Returns:
true if a language is in the map that gives the name for the code language in the encoding language.

get

public Language get(String code,
                    String encoding)
Parameters:
code - the code of the language.
encoding - the encoding of the langauge.
Returns:
the language or null if none is available.

Get Java XBRL API implementation at SourceForge.net. Fast, secure and Free Open Source software downloads