|
XBRLAPIA Java API for XBRL |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbrlapi.aspects.AspectModelImpl
public class AspectModelImpl
Implementation of common aspect model methods.
| Constructor Summary | |
|---|---|
AspectModelImpl(Store store)
|
|
| 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)
|
protected Store |
getStore()
|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AspectModelImpl(Store store)
throws XBRLException
store - The data store required to create domains for some aspects.
XBRLException - if the store is null.| Method Detail |
|---|
public void initialise()
throws XBRLException
AspectModel
initialise in interface AspectModelXBRLExceptionAspectModel.initialise()protected Store getStore()
public String getDefaultAxis()
getDefaultAxis in interface AspectModelAspectModel.getDefaultAxis()public void setDefaultAxis(String defaultAxis)
setDefaultAxis in interface AspectModeldefaultAxis - the axis to add aspects to by default.AspectModel.setDefaultAxis(String)public boolean hasAxis(String axis)
hasAxis in interface AspectModelaxis - the axis.
AspectModel.hasAxis(String)public boolean hasAspect(URI aspectId)
hasAspect in interface AspectModelaspectId - the aspect ID.
AspectModel.hasAspect(URI)
public Aspect getAspect(URI aspectId)
throws XBRLException
getAspect in interface AspectModelaspectId - the aspect ID.
XBRLException - if the aspect is not in the model.AspectModel.getAspect(URI)
public Collection<Aspect> getAspects()
throws XBRLException
getAspects in interface AspectModelXBRLExceptionAspectModel.getAspects()public List<Aspect> getAspects(String axis)
getAspects in interface AspectModelaxis - 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.
AspectModel.getAspects(String)
public boolean axisContainsAspect(String axis,
URI aspectId)
axisContainsAspect in interface AspectModelaxis - The axisaspectId - the aspect
AspectModel.axisContainsAspect(String, URI)
public void addAspect(String axis,
Aspect aspect)
AspectModel
addAspect in interface AspectModelaxis - the axis to put the aspect in, in last place in the ordering.aspect - The aspect to add to the aspect model.AspectModel.addAspect(String, Aspect)public void addAspect(Aspect aspect)
AspectModel
addAspect in interface AspectModelaspect - The aspect to add to the aspect model.AspectModel.addAspect(Aspect)
public void addAspect(String axis,
Aspect parentAspect,
Aspect aspect)
throws XBRLException
AspectModel
addAspect in interface AspectModelaxis - 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.
XBRLExceptionAspectModel.addAspect(String, Aspect, Aspect)
public Labeller getLabeller(URI aspectId)
throws XBRLException
getLabeller in interface AspectModelaspectId - The ID of the aspect to get the labeller for.
XBRLException - if the aspect ID is null.AspectModel.getLabeller(URI)public boolean hasLabeller(URI aspectId)
hasLabeller in interface AspectModelaspectId - The ID of the aspect.
AspectModel.hasLabeller(URI)
public void setLabeller(URI aspectId,
Labeller labeller)
throws XBRLException
setLabeller in interface AspectModelaspectId - 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.AspectModel.setLabeller(URI, Labeller)
public void addAspect(Aspect parentAspect,
Aspect aspect)
throws XBRLException
AspectModel
addAspect in interface AspectModelparentAspect - The parent aspect for the aspect being added.aspect - The aspect to add to the aspect model.
XBRLExceptionAspectModel.addAspect(Aspect, Aspect)
public Set<String> getAxes()
throws XBRLException
getAxes in interface AspectModelXBRLExceptionAspectModel.getAxes()
public Map<URI,AspectValue> getAspectValues(Fact fact)
throws XBRLException
getAspectValues in interface AspectModelfact - The fact to get the aspect values for.
XBRLExceptionAspectModel.getAspectValues(Fact)
public Map<URI,AspectValue> getAspectValues(Fact fact,
Map<URI,AspectValue> existingValues)
throws XBRLException
getAspectValues in interface AspectModelfact - 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.
XBRLExceptionAspectModel.getAspectValues(Fact, Map)
public Map<URI,AspectValue> getAspectValues(Context context)
throws XBRLException
getAspectValues in interface AspectModelcontext - The context to determine the aspect values from.
XBRLExceptionAspectModel.getAspectValues(Context)
public Map<URI,AspectValue> getAspectValues(Context context,
Map<URI,AspectValue> existingValues)
throws XBRLException
getAspectValues in interface AspectModelcontext - 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.
XBRLExceptionAspectModel.getAspectValues(Context, Map)
public Map<URI,AspectValue> getAspectValues(Unit unit)
throws XBRLException
getAspectValues in interface AspectModelunit - The unit to determine the aspect values from.
XBRLExceptionAspectModel.getAspectValues(Unit)
public Map<URI,AspectValue> getAspectValues(Unit unit,
Map<URI,AspectValue> existingValues)
throws XBRLException
getAspectValues in interface AspectModelunit - 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.
XBRLExceptionAspectModel.getAspectValues(Unit, Map)
public void moveAspects(String originalAxis,
String newAxis)
throws XBRLException
moveAspects in interface AspectModeloriginalAxis - The axis to move the aspects fromnewAxis - The axis to move the aspects to
XBRLException - if the original axis does not exist.AspectModel.moveAspects(String, String)
public AspectModel duplicate()
throws XBRLException
duplicate in interface AspectModelXBRLException - if the aspect model does not support duplication.AspectModel.duplicate()
public String getAspectLabel(URI aspectId,
String locale,
URI resourceRole,
URI linkRole)
throws XBRLException
AspectModel
getAspectLabel in interface AspectModelaspectId - 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.AspectModel.getAspectLabel(URI, String, URI, URI)
public String getAspectValueLabel(AspectValue value,
String locale,
URI resourceRole,
URI linkRole)
throws XBRLException
AspectModel
getAspectValueLabel in interface AspectModelvalue - 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.AspectModel.getAspectValueLabel(AspectValue, String, URI, URI)
public String getAspectValueLabel(AspectValue value,
List<String> locales,
List<URI> resourceRoles,
List<URI> linkRoles)
throws XBRLException
AspectModel
getAspectValueLabel in interface AspectModelvalue - 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.AspectModel.getAspectValueLabel(AspectValue, List, List, List)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||