XBRLAPI

A Java API for XBRL


org.xbrlapi.impl
Class NetworkGraphImpl

java.lang.Object
  extended by org.xbrlapi.impl.XMLImpl
      extended by org.xbrlapi.impl.NonFragmentXMLImpl
          extended by org.xbrlapi.impl.NetworkGraphImpl
All Implemented Interfaces:
Serializable, Comparable<XML>, NetworkGraph, NonFragmentXML, XML

public class NetworkGraphImpl
extends NonFragmentXMLImpl
implements NetworkGraph

A network graph XML resource stores information about a graph of XLink relationships between XML fragments.

Author:
Geoffrey Shuetrim (geoff@galexy.net)
See Also:
Serialized Form

Constructor Summary
NetworkGraphImpl()
          No argument constructor.
NetworkGraphImpl(RoleType linkRole, ArcroleType arcrole)
          The network graph XML resource index is made up from the linkRole and the arcrole fragment indices.
 
Method Summary
 URI getArcrole()
           
 String getArcroleIndex()
           
 List<Element> getChildren(Element parent)
           
 ArcroleType getCustomArcrole()
           
 RoleType getCustomLinkRole()
           
 URI getLinkRole()
           
 String getLinkRoleIndex()
           
 Element getParent(Element child)
           
 Set<Element> getRoots()
           
 
Methods inherited from class org.xbrlapi.impl.NonFragmentXMLImpl
finalizeBuilder
 
Methods inherited from class org.xbrlapi.impl.XMLImpl
appendMetadataElement, compareTo, equals, finalize, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xbrlapi.XML
appendMetadataElement, equals, getBuilder, getDocumentNode, getIndex, getMetaAttribute, getMetadataRootElement, getStore, getType, hashCode, hasMetaAttribute, isa, isa, removeMetaAttribute, removeMetadataElement, serialize, serialize, serialize, setBuilder, setIndex, setMetaAttribute, setResource, setStore, updateInStore
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

NetworkGraphImpl

public NetworkGraphImpl()
                 throws XBRLException
No argument constructor.

Throws:
XBRLException

NetworkGraphImpl

public NetworkGraphImpl(RoleType linkRole,
                        ArcroleType arcrole)
                 throws XBRLException
The network graph XML resource index is made up from the linkRole and the arcrole fragment indices.

Parameters:
linkRole - The custom link role type declaration fragment.
arcrole - The custom arcrole type declaration fragment.
Throws:
XBRLException
Method Detail

getLinkRole

public URI getLinkRole()
                throws XBRLException
Specified by:
getLinkRole in interface NetworkGraph
Returns:
the XLink extended link role defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getLinkRole()

getLinkRoleIndex

public String getLinkRoleIndex()
                        throws XBRLException
Specified by:
getLinkRoleIndex in interface NetworkGraph
Returns:
the index of the XLink extended link role defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getLinkRoleIndex()

getCustomLinkRole

public RoleType getCustomLinkRole()
                           throws XBRLException
Specified by:
getCustomLinkRole in interface NetworkGraph
Returns:
the custom type declaration for the XLink extended link role defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getCustomLinkRole()

getArcrole

public URI getArcrole()
               throws XBRLException
Specified by:
getArcrole in interface NetworkGraph
Returns:
the XLink arcrole defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getArcrole()

getArcroleIndex

public String getArcroleIndex()
                       throws XBRLException
Specified by:
getArcroleIndex in interface NetworkGraph
Returns:
the index of the Link arcrole defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getArcroleIndex()

getCustomArcrole

public ArcroleType getCustomArcrole()
                             throws XBRLException
Specified by:
getCustomArcrole in interface NetworkGraph
Returns:
the custom type declaration for the XLink arcrole defining the graph.
Throws:
XBRLException
See Also:
NetworkGraph.getCustomArcrole()

getChildren

public List<Element> getChildren(Element parent)
                          throws XBRLException
Specified by:
getChildren in interface NetworkGraph
Parameters:
parent - The element in the graph resource representing the parent.
Returns:
the set elements in the graph resource representing the children. The children are ordered by the order attribute on the arcs expressing the relationships. Where the order attribute is identical for two relationships, the child index ordering cannot be relied upon to be consistent.
Throws:
XBRLException
See Also:
NetworkGraph.getChildren(Element)

getParent

public Element getParent(Element child)
                  throws XBRLException
Specified by:
getParent in interface NetworkGraph
Parameters:
child - The index of the child fragment.
Returns:
the index of the child fragment's parent or null if the child fragment is a root.
Throws:
XBRLException
See Also:
NetworkGraph.getParent(Element)

getRoots

public Set<Element> getRoots()
                      throws XBRLException
Specified by:
getRoots in interface NetworkGraph
Returns:
the set of root elements in the graph. A root is defined as a node that has no relationships to it from other nodes.
Throws:
XBRLException
See Also:
NetworkGraph.getRoots()

Get Java XBRL API implementation at SourceForge.net.