gr.forth.ics.vrp.label
Class Label

java.lang.Object
  |
  +--gr.forth.ics.vrp.label.Label

public class Label
extends java.lang.Object

Version:
2.0 (23 July 2003) File Label.java - Keeps the labeling information for an RDF_DAG This information is kept in two HashMaps: one for the classes and one for the properties
Author:
Stavros Saxtouri

Field Summary
 java.util.HashMap directLabelGraph
          Contains the labels of the nodes accesible throw DIRECT non tree arcs
 int fatherIdPosition
          Position of fatherId value in the ArrayList
 java.util.HashMap idTree
          Contains the uri of every node in the dag, key is the postOrder
 int indexPosition
          Position of index value in the ArrayList
 java.util.HashMap labelGraph
          Contains the labels of the nodes accesible throw non tree arcs
 java.util.HashMap labelTree
          Contains the label of every node in the dag, key is the URI
 java.util.HashSet labelVisit
           
 int listCapacity
          Size of the list keeping a node label
 int postOrderPosition
          Position of postOrder value in the ArrayList
 
Constructor Summary
Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag, java.util.ArrayList roots, java.math.BigInteger offset)
           
Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag, java.util.ArrayList roots, java.math.BigInteger offset, java.lang.String baseURI)
           
Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag, java.lang.Object root, java.math.BigInteger offset)
           
Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag, java.lang.Object root, java.math.BigInteger offset, java.lang.String baseURI)
           
 
Method Summary
 void enumerate()
          Enumeration over the Property dag usefull for debuging perposes
 java.lang.String getBaseUri()
           
 java.util.ArrayList getDirectArcLabels(java.lang.Object uri)
          get the list of nodes accesible from uri through DIRECT non-tree arcs
 java.math.BigInteger getFatherId(java.lang.Object uri)
          get the fatherId value of uri from labelTree, return null if not exist
 java.math.BigInteger getIndex(java.lang.Object uri)
          get the index value of uri from labelTree, return null if not exist
 java.math.BigInteger getMaxId()
          Return max Id (post order no) used in tree (the id of root)
 java.util.ArrayList getNonTreeLabels(java.lang.Object uri)
           
 java.math.BigInteger getPostOrder(java.lang.Object uri)
          get the postOrder value of uri from labelTree, return null if not exist
 java.lang.Object getRoot()
           
 java.lang.Object getUri(java.math.BigInteger id)
           
 void setFatherId(java.lang.Object uri, java.math.BigInteger value)
          set the fatherId value of a node with URI uri in the labelTree
 void setIndex(java.lang.Object uri, java.math.BigInteger value)
          set the index value of a node with URI uri in the treeLabel
 void setNSFilter(boolean newNSFilter)
           
 void setPostOrder(java.lang.Object uri, java.math.BigInteger value)
          set the postOrder value of a node with URI uri in the labelTree
 boolean withNSFilter()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

labelTree

public java.util.HashMap labelTree
Contains the label of every node in the dag, key is the URI

labelGraph

public java.util.HashMap labelGraph
Contains the labels of the nodes accesible throw non tree arcs

directLabelGraph

public java.util.HashMap directLabelGraph
Contains the labels of the nodes accesible throw DIRECT non tree arcs

labelVisit

public java.util.HashSet labelVisit

idTree

public java.util.HashMap idTree
Contains the uri of every node in the dag, key is the postOrder

indexPosition

public final int indexPosition
Position of index value in the ArrayList

postOrderPosition

public final int postOrderPosition
Position of postOrder value in the ArrayList

fatherIdPosition

public final int fatherIdPosition
Position of fatherId value in the ArrayList

listCapacity

public final int listCapacity
Size of the list keeping a node label
Constructor Detail

Label

public Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag,
             java.lang.Object root,
             java.math.BigInteger offset)
Parameters:
aDag - - the input Directed Acyclic Graph
root - - the desired root of the spanning tree
offset - - minimum post order number for node labeling Extract the class and property DAGs from the model, cover the DAGs with spanning trees , asign labels and construct the structure where the labeling information is kept.

Label

public Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag,
             java.util.ArrayList roots,
             java.math.BigInteger offset)
Parameters:
aDag - - the input Directed Acyclic Graph
root - - the desired root-list of the spanning forest
offset - - minimum post order number for node labeling Extract the class and property DAGs from the model, cover the DAGs with spanning trees , asign labels and construct the structure where the labeling information is kept.

Label

public Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag,
             java.lang.Object root,
             java.math.BigInteger offset,
             java.lang.String baseURI)
Parameters:
aDag - - the input Directed Acyclic Graph
root - - the desired root of the spanning tree
offset - - minimum post order number for node labeling
baseURI - - the Name Space URI Extract the class and property DAGs from the model, cover the DAGs with spanning trees , asign labels and construct the structure where the labeling information is kept. Name Space filter is activated and only URIs in baseURI ns are considered

Label

public Label(gr.forth.ics.vrp.corevrp.model.RDF_DAG aDag,
             java.util.ArrayList roots,
             java.math.BigInteger offset,
             java.lang.String baseURI)
Parameters:
aDag - - the input Directed Acyclic Graph
roots - - the desired root list of the spanning forest
offset - - minimum post order number for node labeling
baseURI - - the Name Space URI Extract the class and property DAGs from the model, cover the DAGs with spanning trees , asign labels and construct the structure where the labeling information is kept. Name Space filter is activated and only URIs in baseURI ns are considered
Method Detail

getRoot

public java.lang.Object getRoot()

getMaxId

public java.math.BigInteger getMaxId()
Return max Id (post order no) used in tree (the id of root)
Returns:
BigInteger - The maximum post order used

getBaseUri

public java.lang.String getBaseUri()
Returns:
String - the URI of the name space get the value of the baseUri

withNSFilter

public boolean withNSFilter()
Returns:
boolean - true if Name Space filter is activated If Name Space filter is activated, nodes must have baseUri as a prefix to be inserted in the spanning tree, otherwze they are ignored

setNSFilter

public void setNSFilter(boolean newNSFilter)
Parameters:
newNSFilter - - if true, the NSFilter is activated, otherwise inactivated If Name Space filter is activated, nodes must have baseUri as a prefix to be inserted in the spanning tree, otherwze they are ignored

getDirectArcLabels

public java.util.ArrayList getDirectArcLabels(java.lang.Object uri)
get the list of nodes accesible from uri through DIRECT non-tree arcs

getNonTreeLabels

public java.util.ArrayList getNonTreeLabels(java.lang.Object uri)
Parameters:
uri - - the primary object
Returns:
ArrayList - a list of all labels of objects that are accessible only through paths that contain at least one non-tree arc, null if no such object exist Returns a list of all objects that are descedants of uri, through non-tree arcs In case of objects that are, also, accessible through tree arcs, these objects are omited.

setIndex

public void setIndex(java.lang.Object uri,
                     java.math.BigInteger value)
set the index value of a node with URI uri in the treeLabel

getIndex

public java.math.BigInteger getIndex(java.lang.Object uri)
get the index value of uri from labelTree, return null if not exist

setPostOrder

public void setPostOrder(java.lang.Object uri,
                         java.math.BigInteger value)
set the postOrder value of a node with URI uri in the labelTree

getPostOrder

public java.math.BigInteger getPostOrder(java.lang.Object uri)
get the postOrder value of uri from labelTree, return null if not exist

getUri

public java.lang.Object getUri(java.math.BigInteger id)

setFatherId

public void setFatherId(java.lang.Object uri,
                        java.math.BigInteger value)
set the fatherId value of a node with URI uri in the labelTree

getFatherId

public java.math.BigInteger getFatherId(java.lang.Object uri)
get the fatherId value of uri from labelTree, return null if not exist

enumerate

public void enumerate()
Enumeration over the Property dag usefull for debuging perposes