XBRLAPI

A Java API for XBRL


org.xbrlapi.networks
Interface Analyser

All Superinterfaces:
Serializable
All Known Implementing Classes:
AllAnalyserImpl, AnalyserImpl, NonProhibitedAnalyserImpl

public interface Analyser
extends Serializable

Classes implementing this interface support analysis of persisted relationship information in a data store. This can be much more efficient than direct analysis of the network information based upon the original data.

Author:
Geoff Shuetrim (geoff@galexy.net)

Method Summary
 List<Relationship> getAllRelationships()
           
 Set<URI> getArcroles()
           
 Set<URI> getArcroles(URI linkRole)
           
 List<Relationship> getLabelRelationships(String sourceIndex)
           
 List<Relationship> getLabelRelationshipsByLanguage(String sourceIndex, String language)
           
 List<Relationship> getLabelRelationshipsByLanguageAndRole(String sourceIndex, String language, URI role)
           
 List<Relationship> getLabelRelationshipsByLanguages(String sourceIndex, List<String> languages)
           
 List<Relationship> getLabelRelationshipsByRole(String sourceIndex, URI role)
           
 List<Relationship> getLabelRelationshipsByRoles(String sourceIndex, List<String> languages, List<URI> roles)
           
 List<Relationship> getLabelRelationshipsByRoles(String sourceIndex, List<URI> roles)
           
 Set<URI> getLinkRoles()
           
 Set<URI> getLinkRoles(URI arcrole)
           
 List<Relationship> getReferenceRelationships(String sourceIndex)
           
 List<Relationship> getReferenceRelationshipsByLanguage(String sourceIndex, String language)
           
 List<Relationship> getReferenceRelationshipsByLanguageAndRole(String sourceIndex, String language, URI role)
           
 List<Relationship> getReferenceRelationshipsByLanguages(String sourceIndex, List<String> languages)
           
 List<Relationship> getReferenceRelationshipsByRole(String sourceIndex, URI role)
           
 List<Relationship> getReferenceRelationshipsByRoles(String sourceIndex, List<String> languages, List<URI> roles)
           
 List<Relationship> getReferenceRelationshipsByRoles(String sourceIndex, List<URI> roles)
           
 List<Relationship> getRelationships(Set<URI> arcroles)
           
 List<Relationship> getRelationships(String sourceIndex, String targetIndex, URI linkRole, URI arcrole)
           
 List<Relationship> getRelationships(URI arcrole)
           
 List<Relationship> getRelationships(URI linkRole, Set<URI> arcroles)
           
 List<Relationship> getRelationships(URI linkRole, URI arcrole)
           
 List<Relationship> getRelationshipsFrom(String sourceIndex, Set<URI> arcroles)
           
 List<Relationship> getRelationshipsFrom(String sourceIndex, URI arcrole)
           
 List<Relationship> getRelationshipsFrom(String sourceIndex, URI linkRole, Set<URI> arcroles)
           
 SortedSet<Relationship> getRelationshipsFrom(String sourceIndex, URI linkRole, URI arcrole)
           
 List<Relationship> getRelationshipsTo(String targetIndex, Set<URI> arcroles)
           
 List<Relationship> getRelationshipsTo(String targetIndex, URI arcrole)
           
 List<Relationship> getRelationshipsTo(String targetIndex, URI linkRole, Set<URI> arcroles)
           
 SortedSet<Relationship> getRelationshipsTo(String targetIndex, URI linkRole, URI arcrole)
           
 Set<String> getRootIndices(URI linkRole, URI arcrole)
           
 List<Relationship> getRootRelationships(URI linkRole, URI arcrole)
           
<F extends Fragment>
Set<F>
getRoots(URI linkRole, URI arcrole)
           
 boolean hasAllRelationships(URI document)
           
 

Method Detail

hasAllRelationships

boolean hasAllRelationships(URI document)
                            throws XBRLException
Parameters:
document - The document URI.
Returns:
true if all of the relationships expressed by the arcs in the document have been persisted in the data store and false otherwise.
Throws:
XBRLException

getLinkRoles

Set<URI> getLinkRoles()
                      throws XBRLException
Returns:
a list of all extended link roles for persisted relationships.
Throws:
XBRLException

getArcroles

Set<URI> getArcroles()
                     throws XBRLException
Returns:
a list of all arcroles for persisted relationships.
Throws:
XBRLException

getLinkRoles

Set<URI> getLinkRoles(URI arcrole)
                      throws XBRLException
Parameters:
arcrole - the constraining arcrole value.
Returns:
a list of all link roles for extended links that contain arcs defining persisted relationships with the given arcrole.
Throws:
XBRLException

getArcroles

Set<URI> getArcroles(URI linkRole)
                     throws XBRLException
Parameters:
linkRole - the constraining link role value.
Returns:
a list of all arcroles for persisted relationships defined in extended links with the given link role.
Throws:
XBRLException

getRelationships

List<Relationship> getRelationships(URI linkRole,
                                    Set<URI> arcroles)
                                    throws XBRLException
Parameters:
linkRole - The link role for the extended links that are allowed to contain the arcs defining the active relationships to be returned.
arcroles - The list of arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any one of the specified arcroles and that are in networks with the given link role.
Throws:
XBRLException

getRelationships

List<Relationship> getRelationships(Set<URI> arcroles)
                                    throws XBRLException
Parameters:
arcroles - The list of arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any one of the specified arcroles.
Throws:
XBRLException

getAllRelationships

List<Relationship> getAllRelationships()
                                       throws XBRLException
Returns:
A list of all relationships in the data store that are accepted by the analyser's relationship filtration rules. Note that this can tend to overwhelm available physical resources when the data store is of significant size.
Throws:
XBRLException

getRelationships

List<Relationship> getRelationships(URI arcrole)
                                    throws XBRLException
Parameters:
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve the specified arcrole.
Throws:
XBRLException

getRelationships

List<Relationship> getRelationships(URI linkRole,
                                    URI arcrole)
                                    throws XBRLException
Parameters:
linkRole - The link role constraining the set of returned active relationships.
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve the specified arcrole and that have the specified link role.
Throws:
XBRLException

getRelationshipsFrom

SortedSet<Relationship> getRelationshipsFrom(String sourceIndex,
                                             URI linkRole,
                                             URI arcrole)
                                             throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get relationships from.
linkRole - The link role constraining the set of returned active relationships.
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A sorted set of all active relationships that involve the specified arcrole and that have the specified link role and that run from the specified source fragment, ordered by the arc order attribute value. The arcrole and link role is ignored if it is null.
Throws:
XBRLException

getRelationshipsTo

SortedSet<Relationship> getRelationshipsTo(String targetIndex,
                                           URI linkRole,
                                           URI arcrole)
                                           throws XBRLException
Parameters:
targetIndex - The index of the fragment to get relationships to.
linkRole - The link role constraining the set of returned active relationships.
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A sorted set of all active relationships that involve the specified arcrole and that have the specified link role and that run to the specified target fragment. The relationships are sorted by the order attributes on the arcs expressing them. The arcrole and link role is ignored if it is null.
Throws:
XBRLException

getRelationshipsFrom

List<Relationship> getRelationshipsFrom(String sourceIndex,
                                        URI arcrole)
                                        throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get relationships from.
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve the specified arcrole and that run from the specified source fragment.
Throws:
XBRLException

getRelationshipsTo

List<Relationship> getRelationshipsTo(String targetIndex,
                                      URI arcrole)
                                      throws XBRLException
Parameters:
targetIndex - The index of the fragment to get relationships to.
arcrole - The arcrole used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve the specified arcrole and that run to the specified target fragment.
Throws:
XBRLException

getRelationshipsFrom

List<Relationship> getRelationshipsFrom(String sourceIndex,
                                        URI linkRole,
                                        Set<URI> arcroles)
                                        throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get relationships from.
linkRole - The link role constraining the set of returned active relationships.
arcroles - The arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any of the specified arcroles and that have the specified link role and that run from the specified source fragment.
Throws:
XBRLException

getRelationshipsTo

List<Relationship> getRelationshipsTo(String targetIndex,
                                      URI linkRole,
                                      Set<URI> arcroles)
                                      throws XBRLException
Parameters:
targetIndex - The index of the fragment to get relationships to.
linkRole - The link role constraining the set of returned active relationships.
arcroles - The arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any of the specified arcroles and that have the specified link role and that run to the specified target fragment.
Throws:
XBRLException

getRelationshipsFrom

List<Relationship> getRelationshipsFrom(String sourceIndex,
                                        Set<URI> arcroles)
                                        throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get relationships from.
arcroles - The arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any of the specified arcroles and that run from the specified source fragment.
Throws:
XBRLException

getRelationshipsTo

List<Relationship> getRelationshipsTo(String targetIndex,
                                      Set<URI> arcroles)
                                      throws XBRLException
Parameters:
targetIndex - The index of the fragment to get relationships to.
arcroles - The arcroles used to select the returned list of active relationships that have been persisted in the data store.
Returns:
A list of all active relationships that involve any of the specified arcroles and that run to the specified target fragment.
Throws:
XBRLException

getRootRelationships

List<Relationship> getRootRelationships(URI linkRole,
                                        URI arcrole)
                                        throws XBRLException
Parameters:
linkRole - The link role of the network.
arcrole - The arcrole of the network.
Returns:
the relationships that run from root fragments in the network with the specified link role and arcrole. If the arcrole or link role is null it is ignored.
Throws:
XBRLException

getRoots

<F extends Fragment> Set<F> getRoots(URI linkRole,
                                     URI arcrole)
                                 throws XBRLException
Type Parameters:
F - The fragment type
Parameters:
linkRole - The link role URI
arcrole - The arcrole URI
Returns:
the list of fragments that are roots of networks with the given link role and arcrole.
Throws:
XBRLException

getRootIndices

Set<String> getRootIndices(URI linkRole,
                           URI arcrole)
                           throws XBRLException
Parameters:
linkRole - The link role defining the network
arcrole - The arcrole defining the network
Returns:
the set of indices of the root fragments in the network. If the arcrole or link role is null it is ignored.
Throws:
XBRLException

getLabelRelationships

List<Relationship> getLabelRelationships(String sourceIndex)
                                         throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
Returns:
a list of active relationships to labels from the fragment identified by the specified index.
Throws:
XBRLException

getLabelRelationshipsByLanguage

List<Relationship> getLabelRelationshipsByLanguage(String sourceIndex,
                                                   String language)
                                                   throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
language - The XML language code identifying the language of the label.
Returns:
a list of active relationships to labels from the fragment identified by the specified index and with the specified language. The list is empty if no relationships match the specified selection criteria.
Throws:
XBRLException

getLabelRelationshipsByLanguages

List<Relationship> getLabelRelationshipsByLanguages(String sourceIndex,
                                                    List<String> languages)
                                                    throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
languages - The list of XML language code identifying the language of the label, in order of preference with the first value being the most preferred. A null value in the list implies that the full set of labels that match the other criteria will be selected.
Returns:
a list of active relationships to labels that match the selection criteria. The list is empty if no relationships match the specified selection criteria.
Throws:
XBRLException

getLabelRelationshipsByRole

List<Relationship> getLabelRelationshipsByRole(String sourceIndex,
                                               URI role)
                                               throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
role - A required resource role for the labels.
Returns:
a list of active relationships to labels that match the selection criteria.
Throws:
XBRLException

getLabelRelationshipsByRoles

List<Relationship> getLabelRelationshipsByRoles(String sourceIndex,
                                                List<URI> roles)
                                                throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
roles - A list of resource roles for the labels in order of preference with the first role in the list being the most preferred XLink role attribute value. A null value in the list implies that the full set of labels that match the other criteria will be selected.
Returns:
a list of active relationships to labels that match the selection criteria.
Throws:
XBRLException

getLabelRelationshipsByLanguageAndRole

List<Relationship> getLabelRelationshipsByLanguageAndRole(String sourceIndex,
                                                          String language,
                                                          URI role)
                                                          throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
language - The XML language code identifying the language of the label.
role - A required resource role for the labels.
Returns:
a list of active relationships to labels that match the selection criteria.
Throws:
XBRLException

getLabelRelationshipsByRoles

List<Relationship> getLabelRelationshipsByRoles(String sourceIndex,
                                                List<String> languages,
                                                List<URI> roles)
                                                throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the labels for.
languages - The list of XML language code identifying the language of the label, in order of preference with the first value being the most preferred. A null value in the list implies that the full set of labels that match the other criteria will be selected.
roles - A list of resource roles for the labels in order of preference with the first role in the list being the most preferred XLink role attribute value. A null value in the list implies that the full set of labels that match the other criteria will be selected.
Returns:
a list of active relationships to labels that match the selection criteria. Note that label language preferences get precedence over label role preferences.
Throws:
XBRLException

getReferenceRelationships

List<Relationship> getReferenceRelationships(String sourceIndex)
                                             throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
Returns:
a list of active relationships to references from the fragment identified by the specified index.
Throws:
XBRLException

getReferenceRelationshipsByLanguage

List<Relationship> getReferenceRelationshipsByLanguage(String sourceIndex,
                                                       String language)
                                                       throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
language - The XML language code identifying the language of the reference.
Returns:
a list of active relationships to references from the fragment identified by the specified index and with the specified language. The list is empty if no relationships match the specified selection criteria.
Throws:
XBRLException

getReferenceRelationshipsByLanguages

List<Relationship> getReferenceRelationshipsByLanguages(String sourceIndex,
                                                        List<String> languages)
                                                        throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
languages - The list of XML language code identifying the language of the reference, in order of preference with the first value being the most preferred. A null value in the list implies that the full set of references that match the other criteria will be selected.
Returns:
a list of active relationships to references that match the selection criteria. The list is empty if no relationships match the specified selection criteria.
Throws:
XBRLException

getReferenceRelationshipsByRole

List<Relationship> getReferenceRelationshipsByRole(String sourceIndex,
                                                   URI role)
                                                   throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
role - A required resource role for the references.
Returns:
a list of active relationships to references that match the selection criteria.
Throws:
XBRLException

getReferenceRelationshipsByRoles

List<Relationship> getReferenceRelationshipsByRoles(String sourceIndex,
                                                    List<URI> roles)
                                                    throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
roles - A list of resource roles for the references in order of preference with the first role in the list being the most preferred XLink role attribute value. A null value in the list implies that the full set of references that match the other criteria will be selected.
Returns:
a list of active relationships to references that match the selection criteria.
Throws:
XBRLException

getReferenceRelationshipsByLanguageAndRole

List<Relationship> getReferenceRelationshipsByLanguageAndRole(String sourceIndex,
                                                              String language,
                                                              URI role)
                                                              throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
language - The XML language code identifying the language of the reference.
role - A required resource role for the references.
Returns:
a list of active relationships to references that match the selection criteria.
Throws:
XBRLException

getReferenceRelationshipsByRoles

List<Relationship> getReferenceRelationshipsByRoles(String sourceIndex,
                                                    List<String> languages,
                                                    List<URI> roles)
                                                    throws XBRLException
Parameters:
sourceIndex - The index of the fragment to get the references for.
languages - The list of XML language code identifying the language of the reference, in order of preference with the first value being the most preferred. A null value in the list implies that the full set of references that match the other criteria will be selected.
roles - A list of resource roles for the references in order of preference with the first role in the list being the most preferred XLink role attribute value. A null value in the list implies that the full set of references that match the other criteria will be selected.
Returns:
a list of active relationships to references that match the selection criteria.
Throws:
XBRLException

getRelationships

List<Relationship> getRelationships(String sourceIndex,
                                    String targetIndex,
                                    URI linkRole,
                                    URI arcrole)
                                    throws XBRLException
Parameters:
sourceIndex - The source index to match.
targetIndex - The target index to match.
linkRole - The link role to match.
arcrole - The arcrole to match.
Returns:
a list of persisted relationships matching the specified criteria. The arcrole and linkrole are ignored if they are equal to null.
Throws:
XBRLException

Get Java XBRL API implementation at SourceForge.net.