XBRLAPI

A Java API for XBRL


org.xbrlapi.networks
Interface Networks

All Superinterfaces:
Iterable<Network>
All Known Implementing Classes:
NetworksImpl

public interface Networks
extends Iterable<Network>

The networks interface defines the functionality provided by a collection of individual network objects.

Author:
Geoffrey Shuetrim (geoff@galexy.net)

Method Summary
 void addAll(List<Network> networks)
          Merges the specified list of networks into this set of networks.
 void addAll(Networks networks)
          Merges the specified set of networks into this set of networks.
 void addNetwork(Network network)
          If the collection of networks already has a network with the same role and arcrole, then the relationships from the added network are added into the existing network.
 void addRelationship(Relationship relationship)
           
 void addRelationships(Collection<Relationship> relationships)
           
 void addRelationships(URI arcrole)
          Adds all relationships with the given arcrole to the set of networks.
 void complete()
          Complete the networks, finding all active relationships in the data store that participate in the networks.
 List<Relationship> getActiveRelationships()
           
 SortedSet<Relationship> getActiveRelationshipsFrom(String index)
           
 SortedSet<Relationship> getActiveRelationshipsTo(String index)
           
 List<URI> getArcroles()
           
 List<URI> getLinkRoles(URI arcrole)
           
 Network getNetwork(URI linkRole, URI arcrole)
           
 Networks getNetworks(URI arcrole)
           
 int getSize()
           
<F extends Fragment>
List<F>
getSources(String targetIndex, URI arcrole)
           
<F extends Fragment>
List<F>
getSources(String targetIndex, URI linkRole, URI arcrole)
           
 Store getStore()
           
<F extends Fragment>
List<F>
getTargets(String sourceIndex, URI arcrole)
           
<F extends Fragment>
List<F>
getTargets(String sourceIndex, URI linkRole, URI arcrole)
           
 boolean hasNetwork(URI linkRole, URI arcrole)
           
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getActiveRelationships

List<Relationship> getActiveRelationships()
                                          throws XBRLException
Returns:
a list of all active relationships in this collection of networks.
Throws:
XBRLException

getActiveRelationshipsFrom

SortedSet<Relationship> getActiveRelationshipsFrom(String index)
                                                   throws XBRLException
Parameters:
index - The index of the source fragment.
Returns:
the relationships that override or prohibit all other equivalent relationships in the networks and that run from the same source fragment.
Throws:
XBRLException

getActiveRelationshipsTo

SortedSet<Relationship> getActiveRelationshipsTo(String index)
                                                 throws XBRLException
Parameters:
index - The index of the target fragment.
Returns:
the relationships that override or prohibit all other equivalent relationships in the networks and that run to the same target fragment.
Throws:
XBRLException

complete

void complete()
              throws XBRLException
Complete the networks, finding all active relationships in the data store that participate in the networks.

Throws:
XBRLException

addNetwork

void addNetwork(Network network)
                throws XBRLException
If the collection of networks already has a network with the same role and arcrole, then the relationships from the added network are added into the existing network.

Parameters:
network - The network to add to the collection of networks.
Throws:
XBRLException

getNetwork

Network getNetwork(URI linkRole,
                   URI arcrole)
                   throws XBRLException
Parameters:
linkRole - The link role of the network to get.
arcrole - The arc role of the network to get.
Returns:
The network corresponding to the given arc and link roles or null if no such network is available.
Throws:
XBRLException

getNetworks

Networks getNetworks(URI arcrole)
                     throws XBRLException
Parameters:
arcrole - The arc role to get the networks for.
Returns:
a list of networks, one per link role that exists for the specified arc role.
Throws:
XBRLException

getSources

<F extends Fragment> List<F> getSources(String targetIndex,
                                        URI arcrole)
                                    throws XBRLException
Parameters:
targetIndex - The index of the fragment that is the target for the sources being retrieved
arcrole - The arc role of the relationships to navigate from the given target to the sources being retrieved.
Returns:
The set of source fragments for active relationships in the collection of networks that are direct connections from the source fragments to the specified target fragment.
Throws:
XBRLException

getSources

<F extends Fragment> List<F> getSources(String targetIndex,
                                        URI linkRole,
                                        URI arcrole)
                                    throws XBRLException
Parameters:
targetIndex - The index of the fragment that is the target for the sources being retrieved
linkRole - The arc role of the relationships to navigate from the given target to the sources being retrieved.
arcrole - The arc role of the relationships to navigate from the given target to the sources being retrieved.
Returns:
The set of source fragments for active relationships in the chosen network that are direct connections from the source fragments to the specified. target fragment.
Throws:
XBRLException

getTargets

<F extends Fragment> List<F> getTargets(String sourceIndex,
                                        URI arcrole)
                                    throws XBRLException
Parameters:
sourceIndex - The index of the fragment that is the source for the targets being retrieved
arcrole - The arc role of the relationships to navigate from the given source to the targets being retrieved.
Returns:
The set of target fragments for active relationships in the collection of networks that are direct connections from the target fragments to the specified source fragment.
Throws:
XBRLException

getTargets

<F extends Fragment> List<F> getTargets(String sourceIndex,
                                        URI linkRole,
                                        URI arcrole)
                                    throws XBRLException
Parameters:
sourceIndex - The index of the fragment that is the source for the targets being retrieved
linkRole - The arc role of the relationships to navigate from the given source to the targets being retrieved.
arcrole - The arc role of the relationships to navigate from the given source to the targets being retrieved.
Returns:
The set of target fragments for active relationships in the chosen network that are direct connections from the target fragments to the specified source fragment.
Throws:
XBRLException

hasNetwork

boolean hasNetwork(URI linkRole,
                   URI arcrole)
Parameters:
linkRole - The link role of the network to get.
arcrole - The arc role of the network to get.
Returns:
true if there is a network in the collection for the given arc role and link role.

addRelationship

void addRelationship(Relationship relationship)
                     throws XBRLException
Parameters:
relationship - The relationship to add to the collection of networks.
Throws:
XBRLException

addRelationships

void addRelationships(Collection<Relationship> relationships)
                      throws XBRLException
Parameters:
relationships - THe list of relationships to add to the networks
Throws:
XBRLException

addRelationships

void addRelationships(URI arcrole)
                      throws XBRLException
Adds all relationships with the given arcrole to the set of networks.

Parameters:
arcrole - The required arcrole.
Throws:
XBRLException

getArcroles

List<URI> getArcroles()
                      throws XBRLException
Returns:
a list of arc role values for which there are networks in the collection. The list is empty if there are no networks in the set of networks.
Throws:
XBRLException

getLinkRoles

List<URI> getLinkRoles(URI arcrole)
                       throws XBRLException
Parameters:
arcrole - The arc role for which the link roles are required.
Returns:
a list of link role values for which there are networks in the collection with the given arc role. The list is empty if there are no networks with the given arc role.
Throws:
XBRLException

getSize

int getSize()
            throws XBRLException
Returns:
The number of networks in the collection.
Throws:
XBRLException

getStore

Store getStore()
Returns:
the data store containing the information defining this collection of networks.

addAll

void addAll(Networks networks)
            throws XBRLException
Merges the specified set of networks into this set of networks.

Parameters:
networks - The networks to merge into this collection of networks.
Throws:
XBRLException

addAll

void addAll(List<Network> networks)
            throws XBRLException
Merges the specified list of networks into this set of networks.

Parameters:
networks - The networks to merge into this collection of networks.
Throws:
XBRLException

Get Java XBRL API implementation at SourceForge.net.