|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AspectModel
Aspect models are collections of aspects. They allow the aspects in the aspect model to be arranged into ordered groups, each of which is referred to as an axis of the aspect model. Aspect models imply no ordering over axes. Axes are useful in enabling structures like tabular representations of data to be defined. For example, by specifying a set of aspects as being in the column axis and another set of aspects as being in the row axis, it is possible to define a simple two dimensional table arrangement of XBRL facts.
Aspect models provide a means of getting the set of facts in the aspect model that are reported with specified values for a chosen set of aspects.
All aspect model classes need to have a constructor with a single parameter, that being the data store. @see org.xbrlapi.data.Store This constructor is used by the aspect model duplicate method.
| Method Summary | |
|---|---|
void |
addAspect(Aspect aspect)
The aspect will be added as the last aspect in the default axis. |
void |
addAspect(Aspect parentAspect,
Aspect aspect)
The aspect will be added to the aspect model in the default axis and it will be immediately follow the parent aspect ID in the list of aspects associated with the default axis if that axis has the parent aspect in it. |
void |
addAspect(String axis,
Aspect aspect)
The aspect will be added as the last aspect in the given axis. |
void |
addAspect(String axis,
Aspect parentAspect,
Aspect aspect)
The aspect will be added to the aspect model in the specified axis and it will be immediately follow the parent aspect ID in the list of aspects associated with the given axis if that axis has the parent aspect in it. |
boolean |
axisContainsAspect(String axis,
URI aspectId)
|
AspectModel |
duplicate()
|
Aspect |
getAspect(URI aspectId)
|
String |
getAspectLabel(URI aspectId,
String locale,
URI resourceRole,
URI linkRole)
This is a convenience method to give access to the labels generated by the labellers for each aspect in the aspect model. |
Collection<Aspect> |
getAspects()
|
List<Aspect> |
getAspects(String axis)
|
String |
getAspectValueLabel(AspectValue value,
List<String> locales,
List<URI> resourceRoles,
List<URI> linkRoles)
This is a convenience method to give access to the labels generated by the labellers for the values of each aspect in the aspect model. |
String |
getAspectValueLabel(AspectValue value,
String locale,
URI resourceRole,
URI linkRole)
This is a convenience method to give access to the labels generated by the labellers for the values of each aspect in the aspect model. |
Map<URI,AspectValue> |
getAspectValues(Context context)
|
Map<URI,AspectValue> |
getAspectValues(Context context,
Map<URI,AspectValue> existingValues)
|
Map<URI,AspectValue> |
getAspectValues(Fact fact)
|
Map<URI,AspectValue> |
getAspectValues(Fact fact,
Map<URI,AspectValue> existingValues)
|
Map<URI,AspectValue> |
getAspectValues(Unit unit)
|
Map<URI,AspectValue> |
getAspectValues(Unit unit,
Map<URI,AspectValue> existingValues)
|
Set<String> |
getAxes()
|
String |
getDefaultAxis()
|
Labeller |
getLabeller(URI aspectId)
|
boolean |
hasAspect(URI aspectId)
|
boolean |
hasAxis(String axis)
|
boolean |
hasLabeller(URI aspectId)
|
void |
initialise()
Initialises the aspects and the aspect value labellers in the aspect model. |
void |
moveAspects(String originalAxis,
String newAxis)
|
void |
setDefaultAxis(String defaultAxis)
|
void |
setLabeller(URI aspectId,
Labeller labeller)
|
| Method Detail |
|---|
void initialise()
throws XBRLException
XBRLException
Collection<Aspect> getAspects()
throws XBRLException
XBRLExceptionboolean hasAspect(URI aspectId)
aspectId - the aspect ID.
Aspect getAspect(URI aspectId)
throws XBRLException
aspectId - the aspect ID.
XBRLException - if the aspect is not in the model.List<Aspect> getAspects(String axis)
axis - The unique (for the aspect model) identifier for an axis of
the aspect model. Aspect models can have zero or more axes,
each of which has an ordered sequence of aspects.
void addAspect(String axis,
Aspect aspect)
aspect - The aspect to add to the aspect model.axis - the axis to put the aspect in, in last place in the ordering.LabellerImplvoid addAspect(Aspect aspect)
aspect - The aspect to add to the aspect model.
void addAspect(String axis,
Aspect parentAspect,
Aspect aspect)
throws XBRLException
axis - the axis to put the aspect in.parentAspect - The parent aspect for the aspect being added.aspect - The aspect to add to the aspect model.
XBRLExceptionLabellerImpl
void addAspect(Aspect parentAspect,
Aspect aspect)
throws XBRLException
parentAspect - The parent aspect for the aspect being added.aspect - The aspect to add to the aspect model.
XBRLException
boolean hasAxis(String axis)
throws XBRLException
axis - the axis.
XBRLException
boolean axisContainsAspect(String axis,
URI aspectId)
axis - The axisaspectId - the aspect
Set<String> getAxes()
throws XBRLException
XBRLExceptionString getDefaultAxis()
void setDefaultAxis(String defaultAxis)
throws XBRLException
defaultAxis - the axis to add aspects to by default.
XBRLException - if the axis is null.
Map<URI,AspectValue> getAspectValues(Fact fact)
throws XBRLException
fact - The fact to get the aspect values for.
XBRLException
Map<URI,AspectValue> getAspectValues(Context context)
throws XBRLException
context - The context to determine the aspect values from.
XBRLException
Map<URI,AspectValue> getAspectValues(Unit unit)
throws XBRLException
unit - The unit to determine the aspect values from.
XBRLException
Map<URI,AspectValue> getAspectValues(Unit unit,
Map<URI,AspectValue> existingValues)
throws XBRLException
unit - The unit to get the aspect values for.existingValues - The map of aspect values that we already have and so do not
need to get now.
XBRLException
Map<URI,AspectValue> getAspectValues(Context context,
Map<URI,AspectValue> existingValues)
throws XBRLException
context - The context to get the aspect values for.existingValues - The map of aspect values that we already have and so do not
need to get now.
XBRLException
Map<URI,AspectValue> getAspectValues(Fact fact,
Map<URI,AspectValue> existingValues)
throws XBRLException
fact - The fact to get the aspect values for.existingValues - The map of aspect values that we already have and so do not
need to get now.
XBRLException
void moveAspects(String originalAxis,
String newAxis)
throws XBRLException
originalAxis - The axis to move the aspects fromnewAxis - The axis to move the aspects to
XBRLException - if the original axis does not exist.
void setLabeller(URI aspectId,
Labeller labeller)
throws XBRLException
aspectId - The ID of the aspect that the labeller is to be used for.labeller - The labeller to use.
XBRLException - if a parameter is null or if the labeller is not
for the specified aspect.
Labeller getLabeller(URI aspectId)
throws XBRLException
aspectId - The ID of the aspect to get the labeller for.
XBRLException - if the aspect ID is null.LabellerImplboolean hasLabeller(URI aspectId)
aspectId - The ID of the aspect.
AspectModel duplicate()
throws XBRLException
XBRLException - if the aspect model does not support duplication.
String getAspectLabel(URI aspectId,
String locale,
URI resourceRole,
URI linkRole)
throws XBRLException
aspectId - the ID of the aspect being labelled.locale - The label localeresourceRole - The label XLink resource rolelinkRole - The label link role
XBRLException - if the aspect is not in the aspect model.
String getAspectValueLabel(AspectValue value,
String locale,
URI resourceRole,
URI linkRole)
throws XBRLException
value - The aspect valuelocale - The label localeresourceRole - The label XLink resource rolelinkRole - The label link role
XBRLException - if the aspect is not in the aspect model.
String getAspectValueLabel(AspectValue value,
List<String> locales,
List<URI> resourceRoles,
List<URI> linkRoles)
throws XBRLException
value - The aspect valuelocales - The list of label locales from first, most preferred to last,
least preferred. The list can include nulls or it can be null.resourceRoles - The list of label XLink resource roles from first, most
preferred to last, least preferred. The list can include nulls
or it can be null.linkRoles - The label link role from first, most preferred to last, least
preferred. The list can include nulls or it can be null.
XBRLException - if the aspect is not in the aspect model.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||