gr.forth.ics.vrp.corevrp
Class Main

java.lang.Object
  extended bygr.forth.ics.vrp.corevrp.Main

public class Main
extends java.lang.Object

Main.java - Containing the main method.


Field Summary
static int error_counter
          A global error counter.
static MyPanel gui
          VRP GUI.
 boolean only_selected_Namespaces
          If selected the result Model can be restricted to specific namespaces (choosen by a user dialog).
 Model out_model
           
static parser p_all
          Will be used mainly by the RDF_Error.class.
static Output Print
          VRP Output.
static int warning_counter
          A global warning counter.
 
Constructor Summary
Main()
           
 
Method Summary
 void enableModelStatistics(int i, boolean b)
          Set the desired model statistics enableModelStatistics(0, true): Prints the number of triples, RDF class, properties, containers, statements and resources found in the input file enableModelStatistics(1, true): For subclass hierarchy, prints the number of classes contained, the average/maximum number of subclasses and the average/maximum number length of the paths enableModelStatistics(2, true): similar to enableModelStatistics(1, true) for property hierachy enableModelStatistics(3, true): Prints the number of instances per classes enableModelStatistics(4, true): Similar to enableModelStatistics(1, true) but prints the statistics for every subclass hierarchy enableModelStatistics(5, true): Similar to enableModelStatisticsenableModelStatistics(2, true) but prints the statistics for every subproperty hierarchy and not totally
 RDF_SemanticBroker getBroker()
           
static boolean getnoerrormsg()
          Returns whether the VRP error messages will not displayed.
static java.lang.String getOutputFile()
          Returns the name of the output file where are written VRP messages.
 boolean getRdfInit()
          If rdfInit is 'true' (default) the generated model will always contain the classes form the rdf and rdfs namespace.
 boolean getResourceRoot()
          If resourceRoot is 'true' the methode setResourceRoot(fetch_all) for the model is called.
 boolean isModelStatisticsEnabled(int i)
          Returns true if the modelStatistics option which corresponds to the integer i.
static void main(java.lang.String[] args)
          The main method.
 void setclassLoop(boolean b)
          Enables/disables the constraint 'Class Hierarchy Loops': No loops are permitted in the subclass hierarchy.
 void setdebug(boolean b)
          Sets whether the Lexer will print the token names and token values it creates.
 void setDebugRdf2svg(boolean i)
           
 void setfetch_all(boolean b)
          Sets whether VRP will connect to namespaces stated in the NS declaration and enter all triples or not.
 void setgraph(boolean b)
          Sets whether the textual representation of the created RDF graph.
 void setGUI(MyPanel f)
          Sets the VRP GUI.
 void setinheritance(boolean b)
          Sets whether inheritance on the domain/range of properties will be performed.
 void setmodeloptions(Model m)
          Setting all the options of the Model according to the options setted here.
 void setmodification_warnings(boolean b)
          Sets whether the Model will report modification warnings for remote modifications.
 void setnoerrormsg(boolean b)
          Sets whether the VRP error messages will not displayed.
 void setOnly_selected_Namespaces(boolean b)
          Sets the only_selected_Namespaces.
 void setonly(boolean b)
          Setting this option only syntactic validation will be performed and no model will be created.
 void setOutputFile(java.lang.String outfile)
          Sets the output file where are written VRP messages.
 void setparseroptions(parser p)
          Setting all the options of the parser according to the options setted here.
 void setpropertyLoop(boolean b)
          Enables/disables the constraint 'Property Hierarchy Loops': No loops are permitted in the subproperty hierarchy.
 void setRdfInit(boolean b)
          If rdfInit is 'true' (default) the generated model will always contain the classes form the rdf and rdfs namespace.
 void setResourceRoot(boolean b)
          If resourceRoot is 'true' the methode setResourceRoot(fetch_all) for the model is called.
 void setSelectedNS(java.util.HashSet selectedNSURI)
          Sets the namespaces you wish to be included in the output model returned by VRP
 void setsimple(boolean b)
          Sets the simple lexer for the syntactic validation.
 void setsourceTargetTypes(boolean b)
          Enables/disables the constraint 'Source/Target Resources of properties': The source/target values of a property should be instances of the domain/range classes of the property.
 void setstatements(boolean b)
          Sets whether the triples included in the VRP model will be printed.
 void setsubsetSubpropertyDomainRange(boolean b)
          Enables/disables the constraint Domain/Range of SubProperties: The domain/range of a property should be subset of the domain/range of its superproperties.
 void setsvg(boolean b)
          Sets whether the svg graphic representation of the created RDFS schema.
 void setsvggraph(boolean b)
           
 void setsvggraphclasscomments(boolean bool)
           
 void setsvggraphclasshierarchy(boolean bool)
           
 void setsvggraphclassproperties(boolean bool)
           
 void setsvggraphclassrootleaves(boolean bool)
           
 void setsvggraphoutput(java.lang.String out)
           
 void setsvggraphpropertycomments(boolean bool)
           
 void setsvggraphpropertydomainrange(boolean bool)
           
 void setsvggraphpropertyhierarchy(boolean bool)
           
 void setsvggraphpropertyrootleaves(boolean bool)
           
 void setsvggraphsize(int w, int h)
           
 void setsvgoutput(java.lang.String out)
           
 void setsvgsize(int w, int h)
           
 void settimeStatistics(boolean b)
          Sets whether time statistics will be reported.
 void settriples(boolean b)
          Sets whether the triples produced by the parser for the input RDF descriptions will be printed.
 void setTypeInfer(boolean b)
          Sets whether inheritance on the types of objects will be performed.
 void settyping(boolean b)
          Enables/disables the constraint 'Types of Resources': The resources used as RDF Classes, Properties, Containers and Stataments should have been assigned the respective RDF type.
 void setvalidatoroptions(RDF_Validator v)
          Setting all the options of the Validator according to the options setted here.
 void setverbose(boolean b)
          Sets whether messages about the actions performed by the VRP will be reported.
 Model start(java.lang.String Name)
          Create and start the parser and the validator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

p_all

public static parser p_all
Will be used mainly by the RDF_Error.class.


error_counter

public static int error_counter
A global error counter.


out_model

public Model out_model

only_selected_Namespaces

public boolean only_selected_Namespaces
If selected the result Model can be restricted to specific namespaces (choosen by a user dialog).


gui

public static MyPanel gui
VRP GUI.


Print

public static Output Print
VRP Output.


warning_counter

public static int warning_counter
A global warning counter.

Constructor Detail

Main

public Main()
Method Detail

setResourceRoot

public void setResourceRoot(boolean b)
If resourceRoot is 'true' the methode setResourceRoot(fetch_all) for the model is called. This also results in additional statements in the output model.


getResourceRoot

public boolean getResourceRoot()
If resourceRoot is 'true' the methode setResourceRoot(fetch_all) for the model is called. This also results in additional statements in the output model.


setRdfInit

public void setRdfInit(boolean b)
If rdfInit is 'true' (default) the generated model will always contain the classes form the rdf and rdfs namespace.


getRdfInit

public boolean getRdfInit()
If rdfInit is 'true' (default) the generated model will always contain the classes form the rdf and rdfs namespace.


setOnly_selected_Namespaces

public void setOnly_selected_Namespaces(boolean b)
Sets the only_selected_Namespaces.


getOutputFile

public static java.lang.String getOutputFile()
Returns the name of the output file where are written VRP messages.


setOutputFile

public void setOutputFile(java.lang.String outfile)
Sets the output file where are written VRP messages.


setnoerrormsg

public void setnoerrormsg(boolean b)
Sets whether the VRP error messages will not displayed. Default is 'false'


getnoerrormsg

public static boolean getnoerrormsg()
Returns whether the VRP error messages will not displayed.


setclassLoop

public void setclassLoop(boolean b)
Enables/disables the constraint 'Class Hierarchy Loops': No loops are permitted in the subclass hierarchy. Default is 'false'.

See Also:
setpropertyLoop, setsubsetSubpropertyDomainRange, settyping, setsourceTargetTypes, setfetch_all, setinheritance

settyping

public void settyping(boolean b)
Enables/disables the constraint 'Types of Resources': The resources used as RDF Classes, Properties, Containers and Stataments should have been assigned the respective RDF type. The XML Datatypes values should belong to the lexical space of the respective datatype. Default is 'false'.

See Also:
setclassLoop, setpropertyLoop, setsubsetSubpropertyDomainRange, setsourceTargetTypes, setfetch_all, setinheritance

setinheritance

public void setinheritance(boolean b)
Sets whether inheritance on the domain/range of properties will be performed. Default is 'false'


setTypeInfer

public void setTypeInfer(boolean b)
Sets whether inheritance on the types of objects will be performed. Default is 'false'


setpropertyLoop

public void setpropertyLoop(boolean b)
Enables/disables the constraint 'Property Hierarchy Loops': No loops are permitted in the subproperty hierarchy. Default is 'false'.

See Also:
setclassLoop, setsubsetSubpropertyDomainRange, settyping, setsourceTargetTypes, setfetch_all, setinheritance

setsourceTargetTypes

public void setsourceTargetTypes(boolean b)
Enables/disables the constraint 'Source/Target Resources of properties': The source/target values of a property should be instances of the domain/range classes of the property. Default is 'false'.

See Also:
setclassLoop, setpropertyLoop, setsubsetSubpropertyDomainRange, settyping, setfetch_all, setinheritance

setsubsetSubpropertyDomainRange

public void setsubsetSubpropertyDomainRange(boolean b)
Enables/disables the constraint Domain/Range of SubProperties: The domain/range of a property should be subset of the domain/range of its superproperties. Default is 'false'.

See Also:
setclassLoop, setpropertyLoop, settyping, setsourceTargetTypes, setfetch_all, setinheritance

setfetch_all

public void setfetch_all(boolean b)
Sets whether VRP will connect to namespaces stated in the NS declaration and enter all triples or not. Default is 'false'.


setdebug

public void setdebug(boolean b)
Sets whether the Lexer will print the token names and token values it creates. Default is 'false'


setmodification_warnings

public void setmodification_warnings(boolean b)
Sets whether the Model will report modification warnings for remote modifications.


setgraph

public void setgraph(boolean b)
Sets whether the textual representation of the created RDF graph. Default is 'false'


setsvg

public void setsvg(boolean b)
Sets whether the svg graphic representation of the created RDFS schema. Default is 'false'


setsvggraph

public void setsvggraph(boolean b)

setonly

public void setonly(boolean b)
Setting this option only syntactic validation will be performed and no model will be created. Default is 'false'


setsimple

public void setsimple(boolean b)
Sets the simple lexer for the syntactic validation. Default is false.

See Also:
Lexer_Simple

setstatements

public void setstatements(boolean b)
Sets whether the triples included in the VRP model will be printed. This set of triples may differ from the set of triples created by the parser (see settriples(boolean) method), because the VRP model produced: Default is 'false'

See Also:
settriples, setfetch_all, setinheritance

settriples

public void settriples(boolean b)
Sets whether the triples produced by the parser for the input RDF descriptions will be printed. Default is 'false'


setverbose

public void setverbose(boolean b)
Sets whether messages about the actions performed by the VRP will be reported.


settimeStatistics

public void settimeStatistics(boolean b)
Sets whether time statistics will be reported. Precisely prints time for:


setSelectedNS

public void setSelectedNS(java.util.HashSet selectedNSURI)
Sets the namespaces you wish to be included in the output model returned by VRP

Parameters:
selectedNSURI - hashmap containing the namespaces

enableModelStatistics

public void enableModelStatistics(int i,
                                  boolean b)
Set the desired model statistics
  1. enableModelStatistics(0, true): Prints the number of triples, RDF class, properties, containers, statements and resources found in the input file
  2. enableModelStatistics(1, true): For subclass hierarchy, prints the number of classes contained, the average/maximum number of subclasses and the average/maximum number length of the paths
  3. enableModelStatistics(2, true): similar to enableModelStatistics(1, true) for property hierachy
  4. enableModelStatistics(3, true): Prints the number of instances per classes
  5. enableModelStatistics(4, true): Similar to enableModelStatistics(1, true) but prints the statistics for every subclass hierarchy
  6. enableModelStatistics(5, true): Similar to enableModelStatisticsenableModelStatistics(2, true) but prints the statistics for every subproperty hierarchy and not totally


isModelStatisticsEnabled

public boolean isModelStatisticsEnabled(int i)
Returns true if the modelStatistics option which corresponds to the integer i. is enables, otherwise false

See Also:
enableModelStatistics

setsvgoutput

public void setsvgoutput(java.lang.String out)

setsvgsize

public void setsvgsize(int w,
                       int h)

setsvggraphoutput

public void setsvggraphoutput(java.lang.String out)

setsvggraphclasshierarchy

public void setsvggraphclasshierarchy(boolean bool)

setsvggraphclassrootleaves

public void setsvggraphclassrootleaves(boolean bool)

setsvggraphclassproperties

public void setsvggraphclassproperties(boolean bool)

setsvggraphclasscomments

public void setsvggraphclasscomments(boolean bool)

setsvggraphpropertyhierarchy

public void setsvggraphpropertyhierarchy(boolean bool)

setsvggraphpropertyrootleaves

public void setsvggraphpropertyrootleaves(boolean bool)

setsvggraphpropertydomainrange

public void setsvggraphpropertydomainrange(boolean bool)

setsvggraphpropertycomments

public void setsvggraphpropertycomments(boolean bool)

setsvggraphsize

public void setsvggraphsize(int w,
                            int h)

setGUI

public void setGUI(MyPanel f)
Sets the VRP GUI.


start

public Model start(java.lang.String Name)
Create and start the parser and the validator.


setparseroptions

public void setparseroptions(parser p)
Setting all the options of the parser according to the options setted here.


setmodeloptions

public void setmodeloptions(Model m)
Setting all the options of the Model according to the options setted here.


setvalidatoroptions

public void setvalidatoroptions(RDF_Validator v)
Setting all the options of the Validator according to the options setted here.


main

public static void main(java.lang.String[] args)
The main method.


setDebugRdf2svg

public void setDebugRdf2svg(boolean i)

getBroker

public RDF_SemanticBroker getBroker()