uk.ac.ic.doc.automed.modelmanagement.modelgen
Class HDMToRDFS

java.lang.Object
  extended by uk.ac.ic.doc.automed.modelmanagement.modelgen.HDMToRDFS

public class HDMToRDFS
extends java.lang.Object

A class to do HDM to RDFS model transformations

Author:
Andrew Charles Smith - acs203

Field Summary
private  java.util.ArrayList allConstraintObjects
           
private  java.util.ArrayList allEdgeObjects
           
private  java.util.ArrayList allNodeObjects
           
private  java.util.Hashtable classes
           
private  Construct cons
           
private  Construct edge
           
private  java.util.Hashtable extents
           
private  Model hdm
           
private  TypeHierarchy hlth
           
private  Construct node
           
private  Construct property
           
private  java.lang.String propertySuffix
           
private  Model rdfs
           
private  Construct rdfsClass
           
private  Construct rdfsClassOrLiteral
           
private  java.util.ArrayList rootNodeObjects
           
private  Schema sourceSchema
           
 
Constructor Summary
HDMToRDFS(Schema s1)
          Creates a new instance of HDMToRDFS
 
Method Summary
private  Schema addClass(Schema transformedSchema, SchemaObject hdmNode)
          Add a RDFS Class to Automed
private  void addHDMObjectsToHashTables()
          Add all the HDM objects to the appropriate hash classes
private  Schema addProperty(Schema s, SchemaObject hdmEdgeObject)
          Add a property
private  java.lang.String computeCardinality(Schema transformedSchema, SchemaObject hdmEdgeObject)
           
 Schema modelGen(TransformModel am)
          Transform the HDM elements in this schema into RDFS elements
private  Schema removeHDMConstructs(Schema transformedSchema)
          Remove the HDM constructs from the transformed schema
 void setSchema(Schema s)
          Set the schema to transform
private  void setUpRDFSModel()
          Set up the RDFS model, the constructs and the type hierarchy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

propertySuffix

private java.lang.String propertySuffix

hdm

private Model hdm

node

private Construct node

cons

private Construct cons

edge

private Construct edge

rdfs

private Model rdfs

rdfsClass

private Construct rdfsClass

rdfsClassOrLiteral

private Construct rdfsClassOrLiteral

property

private Construct property

sourceSchema

private Schema sourceSchema

hlth

private TypeHierarchy hlth

allEdgeObjects

private java.util.ArrayList allEdgeObjects

allConstraintObjects

private java.util.ArrayList allConstraintObjects

allNodeObjects

private java.util.ArrayList allNodeObjects

rootNodeObjects

private java.util.ArrayList rootNodeObjects

extents

private java.util.Hashtable extents

classes

private java.util.Hashtable classes
Constructor Detail

HDMToRDFS

public HDMToRDFS(Schema s1)
          throws NotFoundException
Creates a new instance of HDMToRDFS

Parameters:
s1 - The schema to transform
Throws:
NotFoundException - Throws an exception if constrcuts are not found
Method Detail

setSchema

public void setSchema(Schema s)
Set the schema to transform

Parameters:
s - The schema to transform

addHDMObjectsToHashTables

private void addHDMObjectsToHashTables()
                                throws AutoMedException
Add all the HDM objects to the appropriate hash classes

Throws:
AutoMedException

removeHDMConstructs

private Schema removeHDMConstructs(Schema transformedSchema)
                            throws AutoMedException
Remove the HDM constructs from the transformed schema

Throws:
AutoMedException

addClass

private Schema addClass(Schema transformedSchema,
                        SchemaObject hdmNode)
                 throws IntegrityException,
                        TypeMismatchException,
                        NotFoundException
Add a RDFS Class to Automed

Throws:
IntegrityException
TypeMismatchException
NotFoundException

addProperty

private Schema addProperty(Schema s,
                           SchemaObject hdmEdgeObject)
                    throws AutoMedException
Add a property

Throws:
AutoMedException

computeCardinality

private java.lang.String computeCardinality(Schema transformedSchema,
                                            SchemaObject hdmEdgeObject)

setUpRDFSModel

private void setUpRDFSModel()
                     throws NotFoundException
Set up the RDFS model, the constructs and the type hierarchy

Throws:
NotFoundException

modelGen

public Schema modelGen(TransformModel am)
                throws AutoMedException
Transform the HDM elements in this schema into RDFS elements

Parameters:
am - The TransformModel object that holds the HDM objects and the RDFS constructs they've been matched to during the matching process
Returns:
Returns the RDFS schema
Throws:
AutoMedException - General AutoMedException