| java.lang.Object org.ontoware.rdf2go.util.ModelUtils
ModelUtils | public class ModelUtils (Code) | | Find a lot of convenience functions that are slow but nice and didn't make it
to the Model API.
author: voelkel |
Method Summary | |
public static Model | complement(Model a, Model b, Model result) | public static void | convert(File in, Syntax inSyntax, File out, Syntax outSyntax) Convert the input file, interpreted in the inputSyntax to outputFile, in
outputSyntax. | public static void | convert(File[] inFiles, Syntax[] inSyntax, File out, Syntax outSyntax) | public static void | copy(ModelSet source, ModelSet target) Copy data from the source modelset to the target modelset. | public static void | copy(Model source, Model target) | public static Model | intersection(Model a, Model b, Model result) | public static Model | loadFromFile(File in, Syntax inSyntax) Parameters: in - Parameters: inSyntax - a model with the content from 'in'. | public static void | loadFromFile(File in, Syntax inSyntax, Model sinkModel) Convenience method to load data from file in in syntax inSyntax and write
loaded triples to sinkModel.
Parameters: in - Parameters: inSyntax - Parameters: sinkModel - where to write the loaded content. | public static void | removeFrom(ModelSet source, ModelSet target) Remove data that is listed in the source modelset from the target
modelset. | public static int | size(Iterable> it) | public static int | size(Iterator> i) | public static Model | union(Model a, Model b, Model result) | public static void | writeToFile(Model model, File outFile, Syntax outSyntax) |
convert | public static void convert(File in, Syntax inSyntax, File out, Syntax outSyntax) throws FileNotFoundException(Code) | | Convert the input file, interpreted in the inputSyntax to outputFile, in
outputSyntax.
Parameters: in - input File Parameters: inSyntax - Parameters: out - output File Parameters: outSyntax - throws: FileNotFoundException - |
copy | public static void copy(ModelSet source, ModelSet target) throws ModelRuntimeException(Code) | | Copy data from the source modelset to the target modelset. Iterates
through all named models of the source and adds each to the target. If a
named graph already exists in the target, the data will be added to it,
target models will not be replaced.
Parameters: source - the source, data from here is taken Parameters: target - the target, data will be put here. throws: ModelRuntimeException - if the copying process has an error |
copy | public static void copy(Model source, Model target)(Code) | | If the two models come from different implementations, copying blank
nodes needs special care
Parameters: source - Parameters: target - |
loadFromFile | public static void loadFromFile(File in, Syntax inSyntax, Model sinkModel) throws ModelRuntimeException, IOException(Code) | | Convenience method to load data from file in in syntax inSyntax and write
loaded triples to sinkModel.
Parameters: in - Parameters: inSyntax - Parameters: sinkModel - where to write the loaded content. This model is not cleared.This model should be open. throws: ModelRuntimeException - throws: IOException - |
removeFrom | public static void removeFrom(ModelSet source, ModelSet target) throws ModelRuntimeException(Code) | | Remove data that is listed in the source modelset from the target
modelset. Iterates through all named models of the source and removes the
listed triples from the target.
Parameters: source - the source, data from here is evaluated Parameters: target - the target, data contained in source and target are removedfrom here throws: ModelRuntimeException - if the deleting process has an error |
size | public static int size(Iterable> it)(Code) | | Count statements in iterable 'it'
Parameters: it - the iterable the size |
size | public static int size(Iterator> i)(Code) | | Count statements in iterator 'it'
Parameters: i - the iterator the size |
|
|