public class AnalyserImpl extends java.lang.Object implements Analyser
Constructor and Description |
---|
AnalyserImpl(Store store) |
Modifier and Type | Method and Description |
---|---|
java.util.List<Relationship> |
getAllRelationships() |
java.util.Set<java.lang.String> |
getArcroles() |
java.util.Set<java.lang.String> |
getArcroles(java.lang.String linkRole) |
java.util.List<Relationship> |
getLabelRelationships(java.lang.String sourceIndex) |
java.util.List<Relationship> |
getLabelRelationshipsByLanguage(java.lang.String sourceIndex,
java.lang.String language) |
java.util.List<Relationship> |
getLabelRelationshipsByLanguageAndRole(java.lang.String sourceIndex,
java.lang.String language,
java.lang.String role) |
java.util.List<Relationship> |
getLabelRelationshipsByLanguages(java.lang.String sourceIndex,
java.util.List<java.lang.String> languages) |
java.util.List<Relationship> |
getLabelRelationshipsByRole(java.lang.String sourceIndex,
java.lang.String role) |
java.util.List<Relationship> |
getLabelRelationshipsByRoles(java.lang.String sourceIndex,
java.util.List<java.lang.String> roles) |
java.util.List<Relationship> |
getLabelRelationshipsByRoles(java.lang.String sourceIndex,
java.util.List<java.lang.String> languages,
java.util.List<java.lang.String> roles) |
java.util.Set<java.lang.String> |
getLinkRoles() |
java.util.Set<java.lang.String> |
getLinkRoles(java.lang.String arcrole) |
java.util.List<Relationship> |
getReferenceRelationships(java.lang.String sourceIndex) |
java.util.List<Relationship> |
getReferenceRelationshipsByLanguage(java.lang.String sourceIndex,
java.lang.String language) |
java.util.List<Relationship> |
getReferenceRelationshipsByLanguageAndRole(java.lang.String sourceIndex,
java.lang.String language,
java.lang.String role) |
java.util.List<Relationship> |
getReferenceRelationshipsByLanguages(java.lang.String sourceIndex,
java.util.List<java.lang.String> languages) |
java.util.List<Relationship> |
getReferenceRelationshipsByRole(java.lang.String sourceIndex,
java.lang.String role) |
java.util.List<Relationship> |
getReferenceRelationshipsByRoles(java.lang.String sourceIndex,
java.util.List<java.lang.String> roles) |
java.util.List<Relationship> |
getReferenceRelationshipsByRoles(java.lang.String sourceIndex,
java.util.List<java.lang.String> languages,
java.util.List<java.lang.String> roles) |
java.util.List<Relationship> |
getRelationships(java.util.Set<java.lang.String> arcroles) |
java.util.List<Relationship> |
getRelationships(java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationships(java.lang.String linkRole,
java.util.Set<java.lang.String> arcroles) |
java.util.List<Relationship> |
getRelationships(java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationships(java.lang.String sourceIndex,
java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationshipsFrom(java.lang.String sourceIndex,
java.util.Set<java.lang.String> arcroles) |
java.util.List<Relationship> |
getRelationshipsFrom(java.lang.String sourceIndex,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationshipsFrom(java.lang.String sourceIndex,
java.lang.String linkRole,
java.util.Set<java.lang.String> arcroles) |
java.util.SortedSet<Relationship> |
getRelationshipsFrom(java.lang.String sourceIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationshipsTo(java.lang.String targetIndex,
java.util.Set<java.lang.String> arcroles) |
java.util.List<Relationship> |
getRelationshipsTo(java.lang.String targetIndex,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRelationshipsTo(java.lang.String targetIndex,
java.lang.String linkRole,
java.util.Set<java.lang.String> arcroles) |
java.util.SortedSet<Relationship> |
getRelationshipsTo(java.lang.String targetIndex,
java.lang.String linkRole,
java.lang.String arcrole) |
java.util.Set<java.lang.String> |
getRootIndices(java.lang.String linkRole,
java.lang.String arcrole) |
java.util.List<Relationship> |
getRootRelationships(java.lang.String linkRole,
java.lang.String arcrole) |
<F extends Fragment> |
getRoots(java.lang.String linkRole,
java.lang.String arcrole) |
boolean |
hasAllRelationships(java.net.URI document)
Algorithm involves:
Getting all persisted relationships in the document
Getting all arc+arcend+arcsource combinations in the document
Matching each arc to its persisted relationships
Returning false if any arc does not have persisted relationships
|
public AnalyserImpl(Store store) throws XBRLException
store
- The data store to use.XBRLException
- if the store is null.public boolean hasAllRelationships(java.net.URI document) throws XBRLException
hasAllRelationships
in interface Analyser
document
- The document URI.XBRLException
Analyser.hasAllRelationships(URI)
public java.util.List<Relationship> getAllRelationships() throws XBRLException
getAllRelationships
in interface Analyser
XBRLException
Analyser.getAllRelationships()
public java.util.Set<java.lang.String> getArcroles() throws XBRLException
getArcroles
in interface Analyser
XBRLException
Analyser.getArcroles()
public java.util.Set<java.lang.String> getArcroles(java.lang.String linkRole) throws XBRLException
getArcroles
in interface Analyser
linkRole
- the constraining link role value.XBRLException
Analyser.getArcroles(String)
public java.util.Set<java.lang.String> getLinkRoles() throws XBRLException
getLinkRoles
in interface Analyser
XBRLException
Analyser.getLinkRoles()
public java.util.Set<java.lang.String> getLinkRoles(java.lang.String arcrole) throws XBRLException
getLinkRoles
in interface Analyser
arcrole
- the constraining arcrole value.XBRLException
Analyser.getLinkRoles(String)
public java.util.List<Relationship> getRelationships(java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationships
in interface Analyser
arcroles
- The list of arcroles used to select the
returned list of active relationships that have been
persisted in the data store.XBRLException
Analyser.getRelationships(Set)
public java.util.List<Relationship> getRelationships(java.lang.String linkRole, java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationships
in interface Analyser
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.XBRLException
Analyser.getRelationships(String, Set)
public java.util.List<Relationship> getRelationships(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRelationships
in interface Analyser
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.XBRLException
Analyser.getRelationships(String, String)
public java.util.List<Relationship> getRelationships(java.lang.String arcrole) throws XBRLException
getRelationships
in interface Analyser
arcrole
- The arcrole used to select the
returned list of active relationships that have been
persisted in the data store.XBRLException
Analyser.getRelationships(String)
public java.util.List<Relationship> getRelationshipsFrom(java.lang.String sourceIndex, java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationshipsFrom
in interface Analyser
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.XBRLException
Analyser.getRelationshipsFrom(java.lang.String, Set)
public java.util.List<Relationship> getRelationshipsFrom(java.lang.String sourceIndex, java.lang.String linkRole, java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationshipsFrom
in interface Analyser
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.XBRLException
Analyser.getRelationshipsFrom(java.lang.String, String, Set)
public java.util.SortedSet<Relationship> getRelationshipsFrom(java.lang.String sourceIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRelationshipsFrom
in interface Analyser
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.XBRLException
Analyser.getRelationshipsFrom(java.lang.String, String, String)
public java.util.List<Relationship> getRelationshipsFrom(java.lang.String sourceIndex, java.lang.String arcrole) throws XBRLException
getRelationshipsFrom
in interface Analyser
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.XBRLException
Analyser.getRelationshipsFrom(java.lang.String, String)
public java.util.List<Relationship> getRelationshipsTo(java.lang.String targetIndex, java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationshipsTo
in interface Analyser
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.XBRLException
Analyser.getRelationshipsTo(java.lang.String, Set)
public java.util.List<Relationship> getRelationshipsTo(java.lang.String targetIndex, java.lang.String linkRole, java.util.Set<java.lang.String> arcroles) throws XBRLException
getRelationshipsTo
in interface Analyser
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.XBRLException
Analyser.getRelationshipsTo(java.lang.String, String, Set)
public java.util.SortedSet<Relationship> getRelationshipsTo(java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRelationshipsTo
in interface Analyser
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.XBRLException
Analyser.getRelationshipsTo(java.lang.String, String, String)
public java.util.List<Relationship> getRelationshipsTo(java.lang.String targetIndex, java.lang.String arcrole) throws XBRLException
getRelationshipsTo
in interface Analyser
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.XBRLException
Analyser.getRelationshipsTo(java.lang.String, String)
public java.util.List<Relationship> getRootRelationships(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRootRelationships
in interface Analyser
linkRole
- The link role of the network.arcrole
- The arcrole of the network.XBRLException
Analyser.getRootRelationships(String, String)
public <F extends Fragment> java.util.Set<F> getRoots(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRoots
in interface Analyser
F
- The fragment typelinkRole
- The link role URIarcrole
- The arcrole URIXBRLException
Analyser.getRoots(String, String)
public java.util.Set<java.lang.String> getRootIndices(java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRootIndices
in interface Analyser
linkRole
- The link role defining the networkarcrole
- The arcrole defining the networkXBRLException
Analyser.getRootIndices(String, String)
public java.util.List<Relationship> getLabelRelationships(java.lang.String sourceIndex) throws XBRLException
getLabelRelationships
in interface Analyser
sourceIndex
- The index of the fragment to get the labels for.XBRLException
Analyser.getLabelRelationships(java.lang.String)
public java.util.List<Relationship> getLabelRelationshipsByLanguage(java.lang.String sourceIndex, java.lang.String language) throws XBRLException
getLabelRelationshipsByLanguage
in interface Analyser
sourceIndex
- The index of the fragment to get the labels for.language
- The XML language code identifying the language of the label.XBRLException
Analyser.getLabelRelationshipsByLanguage(java.lang.String, java.lang.String)
public java.util.List<Relationship> getLabelRelationshipsByLanguageAndRole(java.lang.String sourceIndex, java.lang.String language, java.lang.String role) throws XBRLException
getLabelRelationshipsByLanguageAndRole
in interface Analyser
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.XBRLException
Analyser.getLabelRelationshipsByLanguageAndRole(java.lang.String, java.lang.String, String)
public java.util.List<Relationship> getLabelRelationshipsByLanguages(java.lang.String sourceIndex, java.util.List<java.lang.String> languages) throws XBRLException
getLabelRelationshipsByLanguages
in interface Analyser
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.XBRLException
Analyser.getLabelRelationshipsByLanguages(java.lang.String, java.util.List)
public java.util.List<Relationship> getLabelRelationshipsByRole(java.lang.String sourceIndex, java.lang.String role) throws XBRLException
getLabelRelationshipsByRole
in interface Analyser
sourceIndex
- The index of the fragment to get the labels for.role
- A required resource role for the labels.XBRLException
Analyser.getLabelRelationshipsByRole(java.lang.String, String)
public java.util.List<Relationship> getLabelRelationshipsByRoles(java.lang.String sourceIndex, java.util.List<java.lang.String> languages, java.util.List<java.lang.String> roles) throws XBRLException
getLabelRelationshipsByRoles
in interface Analyser
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.XBRLException
Analyser.getLabelRelationshipsByRoles(java.lang.String, java.util.List, List)
public java.util.List<Relationship> getLabelRelationshipsByRoles(java.lang.String sourceIndex, java.util.List<java.lang.String> roles) throws XBRLException
getLabelRelationshipsByRoles
in interface Analyser
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.XBRLException
Analyser.getLabelRelationshipsByRoles(java.lang.String, List)
public java.util.List<Relationship> getReferenceRelationships(java.lang.String sourceIndex) throws XBRLException
getReferenceRelationships
in interface Analyser
sourceIndex
- The index of the fragment to get the references for.XBRLException
Analyser.getReferenceRelationships(java.lang.String)
public java.util.List<Relationship> getReferenceRelationshipsByLanguage(java.lang.String sourceIndex, java.lang.String language) throws XBRLException
getReferenceRelationshipsByLanguage
in interface Analyser
sourceIndex
- The index of the fragment to get the references for.language
- The XML language code identifying the language of the reference.XBRLException
Analyser.getReferenceRelationshipsByLanguage(java.lang.String, java.lang.String)
public java.util.List<Relationship> getReferenceRelationshipsByLanguageAndRole(java.lang.String sourceIndex, java.lang.String language, java.lang.String role) throws XBRLException
getReferenceRelationshipsByLanguageAndRole
in interface Analyser
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.XBRLException
Analyser.getReferenceRelationshipsByLanguageAndRole(java.lang.String, java.lang.String, String)
public java.util.List<Relationship> getReferenceRelationshipsByLanguages(java.lang.String sourceIndex, java.util.List<java.lang.String> languages) throws XBRLException
getReferenceRelationshipsByLanguages
in interface Analyser
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.XBRLException
Analyser.getReferenceRelationshipsByLanguages(java.lang.String, java.util.List)
public java.util.List<Relationship> getReferenceRelationshipsByRole(java.lang.String sourceIndex, java.lang.String role) throws XBRLException
getReferenceRelationshipsByRole
in interface Analyser
sourceIndex
- The index of the fragment to get the references for.role
- A required resource role for the references.XBRLException
Analyser.getReferenceRelationshipsByRole(java.lang.String, String)
public java.util.List<Relationship> getReferenceRelationshipsByRoles(java.lang.String sourceIndex, java.util.List<java.lang.String> languages, java.util.List<java.lang.String> roles) throws XBRLException
getReferenceRelationshipsByRoles
in interface Analyser
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.XBRLException
Analyser.getReferenceRelationshipsByRoles(java.lang.String, java.util.List, List)
public java.util.List<Relationship> getReferenceRelationshipsByRoles(java.lang.String sourceIndex, java.util.List<java.lang.String> roles) throws XBRLException
getReferenceRelationshipsByRoles
in interface Analyser
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.XBRLException
Analyser.getReferenceRelationshipsByRoles(java.lang.String, List)
public java.util.List<Relationship> getRelationships(java.lang.String sourceIndex, java.lang.String targetIndex, java.lang.String linkRole, java.lang.String arcrole) throws XBRLException
getRelationships
in interface Analyser
sourceIndex
- The source index to match.targetIndex
- The target index to match.linkRole
- The link role to match.arcrole
- The arcrole to match.XBRLException
Analyser.getRelationships(String, String, String, String)