org.eaglei.model
Interface EIInstanceFactory


public interface EIInstanceFactory

Author:
Daniela Bourges-Waldegg

Method Summary
 EIInstance create(EIURI instanceUri, java.lang.String rdf, java.lang.String lang)
          Create an EIInstance from an RDF String serialization in one of the RDF languages supported by Jena
 EIInstance createEmbedded(EIURI instanceUri, java.lang.String rdf, java.lang.String lang)
          Create an embedded EIInstance from an RDF String serialization in one of the RDF languages supported by Jena
 EIInstance createEmpty(EIURI typeUri, EIEntity instanceEntity)
          Create an EIInstance with no properties other than an eiType (at least one type must be set)
 EIInstance createExtended(EIURI instanceUri, java.lang.String rdf, java.lang.String lang)
          Create an extended EIInstance from an RDF String serialization in one of the RDF languages supported by Jena
 java.lang.String serialize(EIInstance instance, java.lang.String lang)
          Serialize an EInstance into an RDF language
 

Method Detail

serialize

java.lang.String serialize(EIInstance instance,
                           java.lang.String lang)
Serialize an EInstance into an RDF language

Parameters:
instance -
lang - - one of the RDF languages supported by Jena; predefined values are "RDF/XML", "RDF/XML-ABBREV", "N-TRIPLE", "TURTLE", (and "TTL") and "N3". The default value, represented by null is "RDF/XML".
Returns:
- the serialized EIInstance as a STring

create

EIInstance create(EIURI instanceUri,
                  java.lang.String rdf,
                  java.lang.String lang)
Create an EIInstance from an RDF String serialization in one of the RDF languages supported by Jena

Parameters:
instanceUri - - the instance uri (all the triples in the rdf parameter should have it as subject)
rdf -
lang -
Returns:

createEmbedded

EIInstance createEmbedded(EIURI instanceUri,
                          java.lang.String rdf,
                          java.lang.String lang)
Create an embedded EIInstance from an RDF String serialization in one of the RDF languages supported by Jena

Parameters:
instanceUri - - the instance uri (all the triples in the rdf parameter should have it as subject)
rdf -
lang -
Returns:

createExtended

EIInstance createExtended(EIURI instanceUri,
                          java.lang.String rdf,
                          java.lang.String lang)
Create an extended EIInstance from an RDF String serialization in one of the RDF languages supported by Jena

Parameters:
instanceUri - - the instance uri (all the triples in the rdf parameter should have it as subject)
rdf -
lang -
Returns:

createEmpty

EIInstance createEmpty(EIURI typeUri,
                       EIEntity instanceEntity)
Create an EIInstance with no properties other than an eiType (at least one type must be set)

Parameters:
typeUri - - type of the EInstance; if more than one, add can be used
instanceEntity - - entity containing the instance Uri and its label
Returns:
null if the typeUri is not an EI Class


Copyright © 2009-2011 Eagle-I. All Rights Reserved.