|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgr.forth.ics.rdfsuite.vrp.corevrp.model.RDF_DAG
public class RDF_DAG
RDF_DAG.java - DAG stands for Directed Acyclic Graph.
This class has been generated to describe the Directed Acyclic Graph for classes
and properties in respect to the subClass and subProperty relations.
It consists of a HashMap containing the Objects as key and the corresponding
sub resources are in a HashSet as the value.
The graph might consist of several parts that are not connected. To enable an easy
traversal the roots are stored in a seperate ArrayList.
In addition, every key of the HashMap points to the following Arraylists structure:
Object Key --> ArrayList -|->[0] (HashSet) Descendants
|->[1] (HashSet) Ancestors
|->[2] (Integer) Number of total Descendants
|->[3] (Integer) Number of total Ancestors
|->[4] (Integer) level distro
|->[5] reserved for data needed by algorithms
| Field Summary | |
|---|---|
java.util.HashMap |
dag
Containing the elements of the adjazenz list. |
protected static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
RDF_DAG()
Creates a new RDF_DAG object. |
|
| Method Summary | |
|---|---|
void |
computeLevelDistro()
Computes the level distro of the resources entered in the dag. |
void |
computeRelatives()
Computes for all resources in the dag their relatives and put the number in the dag. |
void |
enter(java.lang.Object sub,
java.lang.Object super_res,
boolean resource)
enter to the dag a resource |
void |
enter(RDF_Resource s)
|
void |
enter(RDF_Resource sub,
RDF_Resource super_res)
|
void |
enumerate(RDF_Model model)
Print the DAG-Graph to Std IO. |
java.util.HashSet |
findLeaves()
Find the leaves, i.e., the nodes without descendants based on the information |
java.util.HashSet |
findRoots()
Recompute the roots, i.e., the nodes without ancestors based on the information |
void |
getAllAncestors()
Computes the distinct ancestors for all nodes contained in the dag and put the number of the descendants in the dag |
void |
getAllDescendants(RDF_Resource res)
Computes the distinct descendants for all nodes under the |
java.util.HashMap |
getdag()
|
java.util.HashSet |
getDirectAncestors(RDF_Schema_Resource res,
IRDF_Model model)
5/12/2007 This method as far as I can understand,returns the direct ancestors that are NOT inferred by some other subsumption relationship? |
java.util.HashSet |
getLeaves()
|
java.util.ArrayList |
getLevelDistro()
Returns an ArrayList of HashSets containing the resources of the same level. |
java.util.ArrayList |
getloop_element()
|
boolean |
getno_loop()
|
java.util.ArrayList |
getorder()
|
java.util.HashSet |
getRelatives(RDF_Resource res,
int i)
Returns a HashSet containing all the distinct relatives of a node res |
java.util.HashSet |
getroots()
|
java.util.HashSet |
getRoots()
|
boolean |
loopcheck()
Checking the graph for loops and creating the topological order list. |
java.lang.String |
output()
Return a string containing the topological order of the DAG |
boolean |
remove(java.lang.Object sub,
java.lang.Object super_res,
boolean resource)
|
boolean |
remove(RDF_Resource res)
|
boolean |
remove(RDF_Resource sub,
RDF_Resource super_res)
Tries to remove the link from 'sub' to 'superResource' out of the DAG |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.HashMap dag
protected static final org.apache.log4j.Logger log
| Constructor Detail |
|---|
public RDF_DAG()
| Method Detail |
|---|
public java.util.ArrayList getLevelDistro()
public java.util.ArrayList getorder()
public java.util.HashSet getRoots()
public java.util.HashSet getroots()
public java.util.HashSet getLeaves()
public java.util.ArrayList getloop_element()
public boolean getno_loop()
public java.util.HashMap getdag()
public java.util.HashSet getDirectAncestors(RDF_Schema_Resource res,
IRDF_Model model)
throws gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException
res - model -
gr.forth.ics.rdfsuite.services.exceptions.LabelCreationException
public java.util.HashSet getRelatives(RDF_Resource res,
int i)
res - the node referencei - When it is set to 0 it computes the distinct descendants of the
node. When it is set to 1 computes the distinct ancestorspublic void getAllDescendants(RDF_Resource res)
public void getAllAncestors()
public void enter(java.lang.Object sub,
java.lang.Object super_res,
boolean resource)
sub - super_res - resource -
public void enter(RDF_Resource sub,
RDF_Resource super_res)
public void enter(RDF_Resource s)
public boolean remove(RDF_Resource sub,
RDF_Resource super_res)
public boolean remove(RDF_Resource res)
public boolean remove(java.lang.Object sub,
java.lang.Object super_res,
boolean resource)
public boolean loopcheck()
public void computeLevelDistro()
public java.util.HashSet findRoots()
public java.util.HashSet findLeaves()
public void computeRelatives()
public java.lang.String output()
public void enumerate(RDF_Model model)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||