XBRLAPI

A Java API for XBRL


org.xbrlapi.networks
Class StorerImpl

java.lang.Object
  extended by org.xbrlapi.networks.StorerImpl
All Implemented Interfaces:
Storer

public class StorerImpl
extends Object
implements Storer

Author:
Geoff Shuetrim (geoff@galexy.net)

Field Summary
protected static org.apache.log4j.Logger logger
           
 
Constructor Summary
StorerImpl(Store store)
           
 
Method Summary
 void deleteInactiveRelationships()
          Removes all persisted prohibited or overridden relationships from a network.
 void deleteInactiveRelationships(URI linkRole, URI arcrole)
          Removes persisted prohibited or overridden relationships from a network.
 void deleteRelationships()
          Deletes all persisted relationships in the data store.
 void deleteRelationships(URI document)
          Deletes the persisted relationships that are related to arcs in the specified document.
 void deleteRelationships(URI linkRole, URI arcrole)
          Deletes the persisted relationships with the given link and arc role from the data store.
 void storeAllRelationships()
          +++
 void storeRelationship(Arc arc, Fragment source, Fragment target)
          Persist the relationship defined by the given fragments.
 void storeRelationship(Relationship relationship)
          When the relationship is persisted in the data store, any equivalent relationship will be removed from the data store.
 void storeRelationships(Collection<URI> documents)
           
 void storeRelationships(Network network)
           
 void storeRelationships(Networks networks)
           
 void storeRelationships(URI document)
          This implementation uses just 3 database queries for the document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static org.apache.log4j.Logger logger
Constructor Detail

StorerImpl

public StorerImpl(Store store)
           throws XBRLException
Throws:
XBRLException
Method Detail

storeRelationship

public void storeRelationship(Relationship relationship)
                       throws XBRLException
Description copied from interface: Storer
When the relationship is persisted in the data store, any equivalent relationship will be removed from the data store. Equivalence is assessed on the basis of the relationship semantic key.

Specified by:
storeRelationship in interface Storer
Parameters:
relationship - The relationship that will be be persisted in the data store.
Throws:
XBRLException
See Also:
Storer.storeRelationship(Relationship)

storeRelationship

public void storeRelationship(Arc arc,
                              Fragment source,
                              Fragment target)
                       throws XBRLException
Description copied from interface: Storer
Persist the relationship defined by the given fragments.

Specified by:
storeRelationship in interface Storer
Parameters:
arc - The relationship arc
source - The relationship source fragment
target - The relationship target fragment
Throws:
XBRLException
See Also:
Storer.storeRelationship(Arc, Fragment, Fragment)

storeRelationships

public void storeRelationships(Network network)
                        throws XBRLException
Specified by:
storeRelationships in interface Storer
Parameters:
network - The network from which all relationships (active and inactive) will be persisted in the data store.
Throws:
XBRLException
See Also:
Storer.storeRelationships(org.xbrlapi.networks.Network)

storeRelationships

public void storeRelationships(Networks networks)
                        throws XBRLException
Specified by:
storeRelationships in interface Storer
Parameters:
networks - The set of networks from which all active relationships will be persisted in the data store.
Throws:
XBRLException
See Also:
Storer.storeRelationships(org.xbrlapi.networks.Networks)

storeAllRelationships

public void storeAllRelationships()
                           throws XBRLException
+++

Specified by:
storeAllRelationships in interface Storer
Throws:
XBRLException
See Also:
Storer.storeAllRelationships()

deleteRelationships

public void deleteRelationships(URI linkRole,
                                URI arcrole)
                         throws XBRLException
Description copied from interface: Storer
Deletes the persisted relationships with the given link and arc role from the data store. Note that this has no impact on the document fragments stored in the data store.

Specified by:
deleteRelationships in interface Storer
Parameters:
linkRole - The linkrole for relationships to be deleted.
arcrole - The arcrole for relationships to be deleted.
Throws:
XBRLException
See Also:
Storer.deleteRelationships(URI, URI)

deleteRelationships

public void deleteRelationships(URI document)
                         throws XBRLException
Description copied from interface: Storer
Deletes the persisted relationships that are related to arcs in the specified document.

Specified by:
deleteRelationships in interface Storer
Parameters:
document - The URI of the document to delete the persisted relationships for.
Throws:
XBRLException
See Also:
Storer.deleteRelationships(URI)

deleteRelationships

public void deleteRelationships()
                         throws XBRLException
Description copied from interface: Storer
Deletes all persisted relationships in the data store.

Specified by:
deleteRelationships in interface Storer
Throws:
XBRLException
See Also:
Storer.deleteRelationships()

storeRelationships

public void storeRelationships(Collection<URI> documents)
                        throws XBRLException
Specified by:
storeRelationships in interface Storer
Parameters:
documents - The collection of URIs of the documents to store the relationships for. Relationships are sought among the XLink arcs in the documents. This is used by the discover to updated persisted relationships in the data store.
Throws:
XBRLException
See Also:
Storer.storeRelationships(Collection)

storeRelationships

public void storeRelationships(URI document)
                        throws XBRLException
This implementation uses just 3 database queries for the document.

Specified by:
storeRelationships in interface Storer
Parameters:
document - The URI of the document to store the relationships for. Relationships are sought among the XLink arcs in the documents. This is used by the discover to updated persisted relationships in the data store.
Throws:
XBRLException
See Also:
Storer.storeRelationships(URI)

deleteInactiveRelationships

public void deleteInactiveRelationships()
                                 throws XBRLException
Description copied from interface: Storer
Removes all persisted prohibited or overridden relationships from a network.

Specified by:
deleteInactiveRelationships in interface Storer
Throws:
XBRLException
See Also:
Storer.deleteInactiveRelationships()

deleteInactiveRelationships

public void deleteInactiveRelationships(URI linkRole,
                                        URI arcrole)
                                 throws XBRLException
Description copied from interface: Storer
Removes persisted prohibited or overridden relationships from a network.

Specified by:
deleteInactiveRelationships in interface Storer
Parameters:
linkRole - The linkRole of the network to purge.
arcrole - The arcrole of the network to purge.
Throws:
XBRLException
See Also:
Storer.deleteInactiveRelationships(URI, URI)

Get Java XBRL API implementation at SourceForge.net.