owltools.flex
Class FlexCollection

java.lang.Object
  extended by owltools.flex.FlexCollection
All Implemented Interfaces:
Iterable<FlexDocument>

public class FlexCollection
extends Object
implements Iterable<FlexDocument>

Pull defined sources into a middle state for output, loading into Solr, etc. Essentially, a Solr document workalike.


Field Summary
protected  ConfigManager config
           
protected  List<FlexDocument> docs
           
protected  OWLGraphWrapper graph
           
 
Constructor Summary
FlexCollection(ConfigManager aconf, OWLGraphWrapper in_graph)
          More fun init.
FlexCollection(OWLGraphWrapper in_graph)
          More fun init.
 
Method Summary
 String getExtString(org.semanticweb.owlapi.model.OWLObject oobj, List<String> function_sexpr)
          Get properly formatted output from the OWLGraphWrapper.
 List<String> getExtStringList(org.semanticweb.owlapi.model.OWLObject oobj, List<String> function_sexpr)
          Get properly formatted output from the OWLGraphWrapper.
 Iterator<FlexDocument> iterator()
           
 FlexDocument wring(org.semanticweb.owlapi.model.OWLObject obj, ConfigManager config)
          Main wrapping for adding ontology documents to GOlr.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected transient ConfigManager config

graph

protected transient OWLGraphWrapper graph

docs

protected List<FlexDocument> docs
Constructor Detail

FlexCollection

public FlexCollection(OWLGraphWrapper in_graph)
More fun init. This does not really work--just for testing some methods.

Parameters:
in_graph -

FlexCollection

public FlexCollection(ConfigManager aconf,
                      OWLGraphWrapper in_graph)
More fun init.

Parameters:
aconf -
in_graph -
Method Detail

getExtString

public String getExtString(org.semanticweb.owlapi.model.OWLObject oobj,
                           List<String> function_sexpr)
Get properly formatted output from the OWLGraphWrapper.

Parameters:
oobj -
function_sexpr - "s-expression"
Returns:
a (possibly null) string return value
See Also:
getExtStringList(org.semanticweb.owlapi.model.OWLObject, java.util.List)

getExtStringList

public List<String> getExtStringList(org.semanticweb.owlapi.model.OWLObject oobj,
                                     List<String> function_sexpr)
Get properly formatted output from the OWLGraphWrapper.

Parameters:
oobj -
function_sexpr - "s-expression"
Returns:
a (possibly empty) string list of returned values
See Also:
getExtString(org.semanticweb.owlapi.model.OWLObject, java.util.List)

wring

public FlexDocument wring(org.semanticweb.owlapi.model.OWLObject obj,
                          ConfigManager config)
Main wrapping for adding ontology documents to GOlr. Also see GafSolrDocumentLoader for the others. TODO: Bad Seth. We have hard-coded document_category here (and the GAF loader). The proper way would be to pair conf files and the file to be loaded, that is not happening quite yet, so we punt on this bad thing.

Parameters:
obj - owlObject
config -
Returns:
an input doc for add()

iterator

public Iterator<FlexDocument> iterator()
Specified by:
iterator in interface Iterable<FlexDocument>


Copyright © 2010-2014. All Rights Reserved.