WICOM
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Protected Attributes
Translator Class Reference

Public Member Functions

 __construct ($strategy, $builder)
 
 set_with_queries ($bool)
 
 get_with_queries ()
 
 get_ontologyURI_fromNS ($json_ns)
 
 get_other_URIs_fromNS ($json_ns)
 
 to_owllink ($json)
 
 importedto_owllink ($json, $ontologyIRI, $prefix, $owllink)
 
 to_owl2 ($json)
 

Protected Attributes

 $strategy = null
 
 $builder = null
 
 $with_queries = true
 

Detailed Description

I translate a JSON formatted diagram into something else depending on the Builder instance given.

  1. Give a Strategy translator instance for specifying the algorithm for translating the diagram.
  2. Give a Builder for specifying the output format.

JSON Format

We expect the following fields:

Example

1 {"classes": [
2  {"attrs":[], "methods":[], "name": "Person"},
3  {"attrs":[], "methods":[], "name": "Cellphones"}],
4  "links": [
5  {"classes": ["Person", "Cellphones"],
6  "multiplicity": ["1..1", "1..*"],
7  "name": "hasCellphone",
8  "type": "association"}
9  ]
10 }

Constructor & Destructor Documentation

__construct (   $strategy,
  $builder 
)

Member Function Documentation

get_ontologyURI_fromNS (   $json_ns)
get_other_URIs_fromNS (   $json_ns)
get_with_queries ( )
importedto_owllink (   $json,
  $ontologyIRI,
  $prefix,
  $owllink 
)
Parameters
jsonA String.
owllinkAn Array with OWLlink strings
Returns
an XML OWLlink String.
set_with_queries (   $bool)
to_owl2 (   $json)
Parameters
jsonA String.
Returns
a XML OWL2 String.
to_owllink (   $json)
Parameters
jsonA String.
Returns
an XML OWLlink String.

Field Documentation

$builder = null
protected
$strategy = null
protected
$with_queries = true
protected
Todo:
The translator should add queries?

The documentation for this class was generated from the following file: