fr.lirmm.graphik.cogui.rdf
Class ImportNaturalRDF

java.lang.Object
  extended by fr.lirmm.graphik.cogui.rdf.ImportNaturalRDF
All Implemented Interfaces:
ImportRDF

public class ImportNaturalRDF
extends java.lang.Object
implements ImportRDF

The Class ImportNaturalRDF parse RDF and build a "natural" conversion in cg


Constructor Summary
ImportNaturalRDF(Environment env, boolean modifySignature, boolean supportCompletion, boolean allowPartitionWithI, boolean considerOwl, boolean disjointWith, boolean allValuesFrom, boolean symmetry, boolean transitivity, boolean inverse, boolean keepAnonymousClasses, boolean removeIsolatedConcept, boolean removeConceptsReferringToTypes)
          Instantiates a new transfo2.
 
Method Summary
 void addAnonymousTC(com.hp.hpl.jena.rdf.model.Resource r)
          Adds the anonymous tc.
 java.lang.String addConceptGen(java.lang.String v)
          Adds the concept gen.
 java.lang.String addConceptInd(java.lang.String i)
          Adds the concept ind.
 java.lang.String addDataType(com.hp.hpl.jena.rdf.model.Literal literal)
          Adds the data type.
 java.lang.String addIndividual(com.hp.hpl.jena.rdf.model.Literal l, java.lang.String type)
          AddIndividual(i) : si i appartient a?
 void addIndividual(com.hp.hpl.jena.rdf.model.Resource i, java.lang.String type)
          AddIndividual(i) : si i appartient a?
 void addOrderTC(java.lang.String child, java.lang.String parent)
          placer child sous parent dans TC.
 void addOrderTR(java.lang.String child, java.lang.String parent)
          placer child sous parent dans TR.
 void addRelation(java.lang.String t, java.lang.String idC1, java.lang.String idC2)
          Adds the relation.
 void addTypeInSignature(java.lang.String relationType, java.lang.String conceptType, int numorder)
          Adds the type in signature.
 void addTypeTC(com.hp.hpl.jena.rdf.model.Resource r)
          AddTypeTC(t) : si t appartient a Tr ou t ?
 void addTypeToConcept(java.lang.String id, java.lang.String t)
          Adds the type to concept and normalize types if necessary.
 void addTypeTR(com.hp.hpl.jena.rdf.model.Resource r)
          AddTypeTR(t) : si t appartient a?
 boolean appartientIndiv(java.lang.String s)
          Appartient indiv.
 boolean appartientTC(java.lang.String s)
          Appartient tc.
 boolean appartientTR(java.lang.String s)
          Appartient tr.
 void parseStatement(com.hp.hpl.jena.rdf.model.Statement statement)
          Parses the statement.
 void prepare()
          Prepare.
 void terminate()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportNaturalRDF

public ImportNaturalRDF(Environment env,
                        boolean modifySignature,
                        boolean supportCompletion,
                        boolean allowPartitionWithI,
                        boolean considerOwl,
                        boolean disjointWith,
                        boolean allValuesFrom,
                        boolean symmetry,
                        boolean transitivity,
                        boolean inverse,
                        boolean keepAnonymousClasses,
                        boolean removeIsolatedConcept,
                        boolean removeConceptsReferringToTypes)
Instantiates a new transfo2.

Parameters:
env - the environment voc+graphs
modifySignature - allow to modify signature
supportCompletion - allow to complete support
allowPartitionWithI - the allow partition with i
considerOwl - the consider owl
allValuesFrom - the all values from
symmetry - the symmetry
transitivity - the transitivity
keepAnonymousClasses - the keep anonymous classes
removeIsolatedConcept - the remove isolated concept
removeConceptsReferringToTypes - the remove concepts referring to types
Method Detail

prepare

public void prepare()
Prepare.

Specified by:
prepare in interface ImportRDF

parseStatement

public void parseStatement(com.hp.hpl.jena.rdf.model.Statement statement)
                    throws java.lang.Exception
Parses the statement.

Specified by:
parseStatement in interface ImportRDF
Parameters:
statement - the statement to parse
Throws:
java.lang.Exception - the exception

terminate

public void terminate()
Specified by:
terminate in interface ImportRDF

addTypeTC

public void addTypeTC(com.hp.hpl.jena.rdf.model.Resource r)
               throws java.lang.Exception
AddTypeTC(t) : si t appartient a Tr ou t ?appartient a I alors erreur(" non partition ") sinonsi t n'appartient pas a Tc alors insérer t dans Tc sous Top.

Parameters:
r - the r
Throws:
java.lang.Exception - the exception

addAnonymousTC

public void addAnonymousTC(com.hp.hpl.jena.rdf.model.Resource r)
Adds the anonymous tc.

Parameters:
r - the r

addTypeTR

public void addTypeTR(com.hp.hpl.jena.rdf.model.Resource r)
               throws java.lang.Exception
AddTypeTR(t) : si t appartient a? Tc ou t appartient a I alors erreur(" non partition ") sinonsi t ?n'appartient pas a Tr alors insérer t dans Tr et associer (Top,Top) comme signature.

Parameters:
r - the r
Throws:
java.lang.Exception - the exception

addIndividual

public void addIndividual(com.hp.hpl.jena.rdf.model.Resource i,
                          java.lang.String type)
                   throws java.lang.Exception
AddIndividual(i) : si i appartient a? Tc ou i appartient a Tr alors erreur(" non partition ") sinonsi i ?n'appartient pas a I alors insérer i dans I.

Parameters:
i - the i
type - the type
Throws:
java.lang.Exception - the exception

addIndividual

public java.lang.String addIndividual(com.hp.hpl.jena.rdf.model.Literal l,
                                      java.lang.String type)
                               throws java.lang.Exception
AddIndividual(i) : si i appartient a? Tc ou i appartient a Tr alors erreur(" non partition ") sinonsi i ?n'appartient pas a I alors insérer i dans I.

Parameters:
l - the l
type - the type
Returns:
the string
Throws:
java.lang.Exception - the exception

addOrderTC

public void addOrderTC(java.lang.String child,
                       java.lang.String parent)
placer child sous parent dans TC.

Parameters:
child - the child
parent - the parent

addOrderTR

public void addOrderTR(java.lang.String child,
                       java.lang.String parent)
placer child sous parent dans TR.

Parameters:
child - the child
parent - the parent

appartientTC

public boolean appartientTC(java.lang.String s)
Appartient tc.

Parameters:
s - the s
Returns:
true, if successful

appartientTR

public boolean appartientTR(java.lang.String s)
Appartient tr.

Parameters:
s - the s
Returns:
true, if successful

appartientIndiv

public boolean appartientIndiv(java.lang.String s)
Appartient indiv.

Parameters:
s - the s
Returns:
true, if successful

addConceptInd

public java.lang.String addConceptInd(java.lang.String i)
Adds the concept ind.

Parameters:
i - the i
Returns:
the string

addConceptGen

public java.lang.String addConceptGen(java.lang.String v)
Adds the concept gen.

Parameters:
v - the v
Returns:
the string

addTypeToConcept

public void addTypeToConcept(java.lang.String id,
                             java.lang.String t)
Adds the type to concept and normalize types if necessary.

Parameters:
id - the id
t - the t

addRelation

public void addRelation(java.lang.String t,
                        java.lang.String idC1,
                        java.lang.String idC2)
Adds the relation.

Parameters:
t - the t
idC1 - the id c1
idC2 - the id c2

addTypeInSignature

public void addTypeInSignature(java.lang.String relationType,
                               java.lang.String conceptType,
                               int numorder)
Adds the type in signature.

Parameters:
relationType - the relation type
conceptType - the concept type
numorder - the numorder

addDataType

public java.lang.String addDataType(com.hp.hpl.jena.rdf.model.Literal literal)
Adds the data type.

Parameters:
literal - the literal
Returns:
the string