XBRLAPI

A Java API for XBRL


org.xbrlapi.aspects
Interface LabelCache

All Superinterfaces:
Serializable
All Known Implementing Classes:
MemoryLabelCache, StoreLabelCache

public interface LabelCache
extends Serializable

Label Cache

This interface defines the capabilities of aspect label caching systems.

Label caching systems are intended to improve the performance of aspect rendering systems by determining aspect and aspect value labels in advance.

Author:
Geoff Shuetrim (geoff@galexy.net)

Method Summary
 void cacheLabel(Class<?> labellerClass, URI aspectId, String valueId, String locale, URI resourceRole, URI linkRole, String label, boolean isFallbackLabel)
          Caches the given label, replacing earlier versions of such label in the cache to ensure that there is only ever one label in the cache that matches the selection criteria.
 String getLabel(Class<?> labellerClass, URI aspectId, String valueId, String locale, URI resourceRole, URI linkRole)
           
 String getLabelWithoutFallback(Class<?> labellerClass, URI aspectId, String valueId, String locale, URI resourceRole, URI linkRole)
           
 

Method Detail

getLabel

String getLabel(Class<?> labellerClass,
                URI aspectId,
                String valueId,
                String locale,
                URI resourceRole,
                URI linkRole)
                throws XBRLException
Parameters:
aspectId - the ID of the aspect - must not be null.
valueId - The id of the aspect value - must not be null.
locale - The XML language code - can be null.
resourceRole - The label resource role - can be null.
linkRole - The link role for the extended link containing the label - can be null.
Returns:
the label matching the parameters or null if there is no such label in the cache.
Throws:
XBRLException

getLabelWithoutFallback

String getLabelWithoutFallback(Class<?> labellerClass,
                               URI aspectId,
                               String valueId,
                               String locale,
                               URI resourceRole,
                               URI linkRole)
                               throws XBRLException
Parameters:
aspectId - the ID of the aspect - must not be null.
valueId - The id of the aspect value - must not be null.
locale - The XML language code - can be null.
resourceRole - The label resource role - can be null.
linkRole - The link role for the extended link containing the label - can be null.
Returns:
the label matching the parameters or null if there is no such label in the cache. Fallback labels (those generated by a superclass of the specified aspect labeller) are not returned.
Throws:
XBRLException

cacheLabel

void cacheLabel(Class<?> labellerClass,
                URI aspectId,
                String valueId,
                String locale,
                URI resourceRole,
                URI linkRole,
                String label,
                boolean isFallbackLabel)
                throws XBRLException
Caches the given label, replacing earlier versions of such label in the cache to ensure that there is only ever one label in the cache that matches the selection criteria.

Parameters:
aspectId - the ID of the aspect - must not be null.
valueId - The id of the aspect value - must not be null.
locale - The XML language code - can be null.
resourceRole - The label resource role - can be null.
linkRole - The link role for the extended link containing the label - can be null.
label - The label to cache - must not be null.
isFallbackLabel - true if the label is a fallback label and false otherwise.
Throws:
XBRLException

Get Java XBRL API implementation at SourceForge.net.