public class GraphCollection extends Object
| Constructor and Description |
|---|
GraphCollection() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGraph(NamedGraph g)
Adds a graph to the
GraphCollection |
void |
addPrefix(Prefix p)
Adds a prefix to the
GraphCollection |
void |
applyPrefixes()
Applies all prefixes of the
GraphCollection |
int |
blankNodeCount(boolean recursive,
boolean distinct)
Deprecated.
|
void |
clear()
Clears the graph collection by removing all contained graphs
|
int |
countDuplicates()
Counts duplicate triples in the
GraphCollection
Attentions: Only cares about triples (MSGs are ignored) and sorts all triples! |
int |
countPredicate(String predicate)
Counts triples with specified predicate in the
GraphCollection |
LinkedList<NamedGraph> |
getGraphs() |
LinkedList<Prefix> |
getPrefixes() |
ArrayList<Triple> |
getRootTriples()
Get all triples at the root level (outside any graph) of the
GraphCollection |
SignatureData |
getSignature() |
int[] |
getStats()
Gets statistics of the
GraphCollection
Array index - value
0 - total triple count
1 - IRIs / resources
2 - literals
3 - blank nodes
4 - distinct blank nodes
5 - Unique subject URIs |
boolean |
hasSignature() |
boolean |
hasTriples()
Check if the
GraphCollection has any triples |
boolean |
isHashed()
Checks if
GraphCollection has been hashed |
boolean |
isUsingMSGs()
Checks if there are any MSGs in the
GraphCollection |
boolean |
isValid()
Checks if the graph collection and all it's content is well-formed
|
void |
resolvePrefixes()
Resolves all prefixes of the
GraphCollection |
void |
setGraphs(LinkedList<NamedGraph> graphs) |
void |
setSignature(SignatureData signature) |
void |
sortGraphs()
Sorts all graphs in the
GraphCollection |
String |
toString()
Converts the
GraphCollection to a string (used for printing and debugging)
Attention: May not work properly with very big graphs |
int |
tripleCount()
Gets the triple count of the
GraphCollection |
void |
updateDepths()
Updates the depths of all contained graphs
|
public LinkedList<Prefix> getPrefixes()
public LinkedList<NamedGraph> getGraphs()
public void setGraphs(LinkedList<NamedGraph> graphs)
public SignatureData getSignature()
public void setSignature(SignatureData signature)
public boolean hasSignature()
public void addPrefix(Prefix p)
GraphCollectionp - Prefix to addpublic void addGraph(NamedGraph g)
GraphCollectiong - NamedGraph to addpublic boolean hasTriples()
GraphCollection has any triplespublic int tripleCount()
GraphCollectionGraphCollectionpublic ArrayList<Triple> getRootTriples()
GraphCollection@Deprecated public int blankNodeCount(boolean recursive, boolean distinct)
GraphCollectionrecursive - count recursively in all sub graphs?distinct - count distinct blank nodes only?public int[] getStats()
GraphCollection
Array index - value
0 - total triple count
1 - IRIs / resources
2 - literals
3 - blank nodes
4 - distinct blank nodes
5 - Unique subject URIspublic int countPredicate(String predicate)
GraphCollectionpredicate - URI of the predicatepublic int countDuplicates()
GraphCollection
Attentions: Only cares about triples (MSGs are ignored) and sorts all triples!public void resolvePrefixes()
GraphCollectionpublic void applyPrefixes()
GraphCollectionpublic void sortGraphs()
GraphCollectionpublic boolean isHashed()
GraphCollection has been hashedpublic boolean isUsingMSGs()
GraphCollectionpublic boolean isValid()
throws Exception
Exception - if its malformedpublic void clear()
public void updateDepths()
public String toString()
GraphCollection to a string (used for printing and debugging)
Attention: May not work properly with very big graphsCopyright © 2018. All rights reserved.