VRP Installation Instructions

RDFSuite Overview Download VRP Documentation Users

## Installation

1. Download the latest version of VRP (v2.1)
2. Unzip and untar the package with command similar to

   >           gtar -zxvf VRP_2.1.tar.gz

   This will create a new directory RDF_VRP which should contain the following:
   - classes/ (directory) - containing the java classes of VRP, CUP, Statistics and GUI.
   - examples/ (directory) - containing some valid RDF examples
   - src/ (directory) - containing all java source files of VRP (including the JFlex and Cup source files for RDF syntax), Statistics and GUI.
   - README.html (file) - contains the installation & usage information
3. To run the program change into the directory RDF_VRP/classes and execute:

   >          java GUI.VRPGUI

   or execute:

   >          java -classpath <RDF_VRP Dir>/classes GUI.VRPGUI

   If your RDF files are large, you should use the -mx parameter to increase the main memory Java can allocate. For example if you want the Java to be able to use 100MB, you should run it with

   >          java -mx100m  -classpath <RDF_VRP Dir>/classes  GUI.VRPGUI

## Standalone Application Options

### Input Options

- Input/Output File
  - Select Input File: Select the file or enter the URL you want to store (e.g., http://athena.ics.forth.gr:9090/RDF/VRP/Examples/cweb.rdf).
    RDF files are found in the directory examples of RDF_VRP. More examples are available online.
  - Select Output file: Select a file or enter a new file for saving VRP messages.
    The output always appears in the text areas Results and Messages at the bottom area of the window.
- Input Options
  - Syntactic Validation: Checks if the RDF/XML syntax of the input namespace* conforms to the updated RDF/XML syntax proposed by W3C
  - Semantic Validation: Verifies the selected constraints derived from RDF Schema Specification (RDFS)
    - Choose Constraints:
    You can select the semantic constraints that you want to be applied to the descriptions
    - Class Hierarchy Loops: No loops are permitted in the subclass hierarchy
    - Property Hierarchy Loops: No loops are permitted in the subproperty hierarchy
    - Domain/Range of SubProperties: The domain/range of a property should be subset of the domain/range of its superproperties.
      Note: The constraint 'Property Hierarchy Loops' will also be checked. Verification of the constraint 'Domain/Range of SubProperties' can be done as long as there is no loop in the subproperty hierarchy
    - Source/Target Resources of properties: The source/target values of a property should be instances of the domain/range classes of the property
    - 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.
    - Extend Model with triples from:
      - External Namespaces: Connects to external (remote or local)** namespaces declared in the input namespace.
        The descriptions of the external namespaces will be also syntactically analyzed.
        Semantic validation will be done for the total of RDF descriptions, i.e., both the descriptions of the input and the external namespaces.
        Note: Remember to enable this option if you want to validate the input descriptions against RDF schemas declared in external namespaces.
      - Type Inference: Infers the type of resources (i.e., class, property, container or statement), if it is not exlplicitly declared. For example, if the resource (r1) is an instance of a subclass (C1) of the rdfs:Class, it will add in the model the triple (rdf:type, r1, rdfs:Class) and it will cast the resource to an class.
      - Domain/Range Inference: In case the domain/range of a property is undefined, the property will inherit the domain/range of its superproperty.
        If there are more than one superproperties, inheritance will not be performed.
        Note: The constraint 'Property Hierarchy Loops' will also be checked. Inference on Domain/Range can be done as long as there is no loop in the subproperty hierarchy
- START - CLEAR OUTPUT - EXIT Buttons
  - START: Starts the parsing and validation
  - CLEAR: Clears the Output Area of the GUI
  - EXIT: Closes the application

### Output Options

The default output of VRP reports:

- Whether the file is valid or not
- In case of errors the corresponding diagnostic messages

Additionally we can choose among the following options

- Debug: The Lexer will print the token names and token values it creates.
- Verbose: Messages about the actions performed by the VRP will be reported.
- Triples: The triples produced by the parser for the input RDF descriptions will be printed
- Statements: The triples included in the model produced by VRP will be printed.
  This set of triples may differ from the set of triples created by the parser (see Triples option), because the VRP model produced:
  - does not contain duplicate statements,
  - contains additional statements from external namespaces, if the option 'External Namespaces' is enabled.
  - contains additional statements from inference on domain/range of subproperties
- Graph: Prints a textual representation of the created RDF graph containing:

- The topological order (top down) of the Properties according to the subPropertyOf statements.
- The topological order (top down) of the Classes according to the subClassOf statements.
- The RDF Classes, Properties, Statements, Containers, and Resources.

- Statistics Options:
  - Model:
  - Number of schema and data resources: Prints the number of the number of triples, RDF class, properties, containers, statements and resources found in the input file
  - SubClass Hierarchy: For every class hierachy prints the number of classes contained, the average/maximum number of subclasses and the average/maximum length of the paths
  - SubProperty Hierarchy: Similar to 'SubClass Hierarchy' option for properties
  - Instances Distribution: Prints the number of instances per class
  - Time: Prints the time consumed for
    - parsing the input namespace
    - parsing the external namespaces & for inheritance on domain/range of properties
    - semantic validation

* A namespace can be a local file or a URL.
** Namespace URIs should include the complete filename of the RDF file, with the extension (e.g. .rdf, .rdfs) if any. For example,

- A remote namespace declaration:

      xmlns:cweb="http://athena.ics.forth.gr:9090/RDF/VRP/Examples/cweb.rdf#"

- A local namespace declaration (including the prefix 'file:') :

      xmlns:cweb="file:/home/grads/alexaki/RDF/example/cweb.rdf#"

## Using VRP APIs

The example Test.java shows how you can use VRP APIs.
The java class Main shows the methods provided for VRP.
In case you want to process the Model returned by VRP, see the methods of java class Model.

Last modified: March 19, 2002