treebolic.provider.owl
Class OwlParser

java.lang.Object
  extended by treebolic.provider.owl.OwlParser

public class OwlParser
extends java.lang.Object

OWL parser

Author:
Bernard Bou

Field Summary
(package private) static boolean asTree
          As tree
private  java.awt.Color theClassBackColor
          Class back color
private  java.awt.Color theClassForeColor
          Class fore color
private static java.awt.Image theClassImage
          Class image
private  java.lang.String theClassImageFile
          Class image
private  java.awt.Color theClassWithPropertiesBackColor
          Class fore color
private  java.awt.Color theClassWithPropertiesForeColor
          Class fore color
private static java.awt.Image theClassWithPropertiesImage
          Class with property image
private  java.lang.String theClassWithPropertiesImageFile
          Class image
(package private) static java.awt.Color theDefaultClassBackColor
          Default class color
private  java.util.Properties theProperties
          Properties
private  java.awt.Color thePropertiesBackColor
          Properties fore color
private  java.awt.Color thePropertiesForeColor
          Properties fore color
private static java.awt.Image thePropertiesImage
          Properties image
private  java.lang.String thePropertiesImageFile
          Properties image
private  java.lang.String thePropertiesLabel
          Properties label
private  java.awt.Color thePropertyBackColor
          Property fore color
private static java.awt.Color thePropertyEdgeColor
          Property edge color
private static java.lang.String thePropertyEdgeImageFile
          Property edge image file
private static java.lang.Integer thePropertyEdgeStyle
          Property edge style
private  java.awt.Color thePropertyForeColor
          Property fore color
private static java.awt.Image thePropertyImage
          Property image
private  java.lang.String thePropertyImageFile
          Property image
private  java.awt.Color theRootBackColor
          Root fore color
private  java.awt.Color theRootForeColor
          Root fore color
private static java.awt.Image theRootImage
          Focus image
private  java.lang.String theRootImageFile
          Root image
private  java.lang.String theRootLabel
          Root label
 
Constructor Summary
OwlParser(java.util.Properties theseProperties)
           
 
Method Summary
private  java.awt.Color getColor(java.lang.String thisColorKey, java.awt.Color thisColorValue)
          Get node color
private  java.lang.String getImageFile(java.lang.String thisImageKey)
          Set node image file
private  java.lang.String getLabel(java.lang.String thisLabelKey, java.lang.String thisLabelValue)
          Get node label
static java.lang.String getName(java.lang.String thisUriString)
          Get name
(package private)  void initialize()
          Initialize from properties
 Model parseModel(java.lang.String thisUrlString)
          Parse model
 Tree parseTree(java.lang.String thisUrlString)
          Parse tree
private  void setImage(MutableNode thisNode, java.lang.String thisImageFile, java.awt.Image thisImageDefault)
          Set node image
 void walkClasses(INode thisParentClassNode, com.hp.hpl.jena.util.iterator.ExtendedIterator theseClasses, java.lang.String thisUrlString)
          Walk classes in iterator
 void walkProperties(INode thisParentNode, com.hp.hpl.jena.util.iterator.ExtendedIterator theseProperties)
          Walk properties in iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

asTree

static boolean asTree
As tree


theDefaultClassBackColor

static java.awt.Color theDefaultClassBackColor
Default class color


theRootImage

private static final java.awt.Image theRootImage
Focus image


theClassImage

private static final java.awt.Image theClassImage
Class image


theClassWithPropertiesImage

private static final java.awt.Image theClassWithPropertiesImage
Class with property image


thePropertiesImage

private static final java.awt.Image thePropertiesImage
Properties image


thePropertyImage

private static final java.awt.Image thePropertyImage
Property image


theProperties

private java.util.Properties theProperties
Properties


theClassBackColor

private java.awt.Color theClassBackColor
Class back color


theClassForeColor

private java.awt.Color theClassForeColor
Class fore color


theClassImageFile

private java.lang.String theClassImageFile
Class image


theClassWithPropertiesBackColor

private java.awt.Color theClassWithPropertiesBackColor
Class fore color


theClassWithPropertiesForeColor

private java.awt.Color theClassWithPropertiesForeColor
Class fore color


theClassWithPropertiesImageFile

private java.lang.String theClassWithPropertiesImageFile
Class image


theRootLabel

private java.lang.String theRootLabel
Root label


theRootForeColor

private java.awt.Color theRootForeColor
Root fore color


theRootBackColor

private java.awt.Color theRootBackColor
Root fore color


theRootImageFile

private java.lang.String theRootImageFile
Root image


thePropertiesLabel

private java.lang.String thePropertiesLabel
Properties label


thePropertiesForeColor

private java.awt.Color thePropertiesForeColor
Properties fore color


thePropertiesBackColor

private java.awt.Color thePropertiesBackColor
Properties fore color


thePropertiesImageFile

private java.lang.String thePropertiesImageFile
Properties image


thePropertyForeColor

private java.awt.Color thePropertyForeColor
Property fore color


thePropertyBackColor

private java.awt.Color thePropertyBackColor
Property fore color


thePropertyImageFile

private java.lang.String thePropertyImageFile
Property image


thePropertyEdgeColor

private static java.awt.Color thePropertyEdgeColor
Property edge color


thePropertyEdgeStyle

private static java.lang.Integer thePropertyEdgeStyle
Property edge style


thePropertyEdgeImageFile

private static java.lang.String thePropertyEdgeImageFile
Property edge image file

Constructor Detail

OwlParser

public OwlParser(java.util.Properties theseProperties)
Method Detail

initialize

void initialize()
Initialize from properties


parseModel

public Model parseModel(java.lang.String thisUrlString)
Parse model

Returns:
model if successful

parseTree

public Tree parseTree(java.lang.String thisUrlString)
Parse tree

Returns:
tree if successful

walkClasses

public void walkClasses(INode thisParentClassNode,
                        com.hp.hpl.jena.util.iterator.ExtendedIterator theseClasses,
                        java.lang.String thisUrlString)
Walk classes in iterator

Parameters:
thisParentClassNode - treebolic parent node to attach to
theseClasses - class iterator
thisUrlString - URL string

walkProperties

public void walkProperties(INode thisParentNode,
                           com.hp.hpl.jena.util.iterator.ExtendedIterator theseProperties)
Walk properties in iterator

Parameters:
thisParentNode - treebolic parent node to attach to
theseProperties - property iterator

getLabel

private java.lang.String getLabel(java.lang.String thisLabelKey,
                                  java.lang.String thisLabelValue)
Get node label

Parameters:
thisLabelKey - label key
thisLabelValue - label value

getColor

private java.awt.Color getColor(java.lang.String thisColorKey,
                                java.awt.Color thisColorValue)
Get node color

Parameters:
thisColorKey - forecolor key
thisColorValue - forecolor value
Returns:
color

getImageFile

private java.lang.String getImageFile(java.lang.String thisImageKey)
Set node image file

Parameters:
thisImageKey - image key
Returns:
image file or null

setImage

private void setImage(MutableNode thisNode,
                      java.lang.String thisImageFile,
                      java.awt.Image thisImageDefault)
Set node image

Parameters:
thisNode - node
thisImageFile - image file (can be null to default)
thisImageDefault - image value

getName

public static java.lang.String getName(java.lang.String thisUriString)
Get name

Parameters:
thisUriString - uri string
Returns:
name