|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ontoware.rdf2go.util.ModelUtils
public class ModelUtils
Find a lot of convenience functions that are slow but nice and didn't make it to the Model API.
| Constructor Summary | |
|---|---|
ModelUtils()
|
|
| Method Summary | |
|---|---|
static Model |
complement(Model a,
Model b,
Model result)
|
static void |
convert(java.io.File[] inFiles,
Syntax[] inSyntax,
java.io.File out,
Syntax outSyntax)
Merge all input files into one model and export to outfile in output syntax |
static void |
convert(java.io.File in,
Syntax inSyntax,
java.io.File out,
Syntax outSyntax)
Convert the input file, interpreted in the inputSyntax to outputFile, in outputSyntax. |
static void |
copy(Model source,
Model target)
If the two models come from different implementations, copying blank nodes needs special care |
static void |
copy(ModelSet source,
ModelSet target)
Copy data from the source modelset to the target modelset. |
static Model |
intersection(Model a,
Model b,
Model result)
|
static Model |
loadFromFile(java.io.File in,
Syntax inSyntax)
Deprecated. This method creates new models via RDF2Go. If multiple model factories are used, this might be wrong. Use instead public static void loadFromFile(File in, Syntax inSyntax, Model sinkModel) |
static void |
loadFromFile(java.io.File in,
Syntax inSyntax,
Model sinkModel)
Convenience method to load data from file in in syntax inSyntax and write loaded triples to sinkModel. |
static void |
removeFrom(ModelSet source,
ModelSet target)
Remove data that is listed in the source modelset from the target modelset. |
static int |
size(java.lang.Iterable<?> it)
Count statements in iterable 'it' |
static int |
size(java.util.Iterator<?> i)
Count statements in iterator 'it' |
static Model |
union(Model a,
Model b,
Model result)
|
static void |
writeToFile(Model model,
java.io.File outFile,
Syntax outSyntax)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ModelUtils()
| Method Detail |
|---|
public static int size(java.lang.Iterable<?> it)
it - the iterable
public static int size(java.util.Iterator<?> i)
i - the iterator
public static void copy(ModelSet source,
ModelSet target)
throws ModelRuntimeException
source - the source, data from here is takentarget - the target, data will be put here.
ModelRuntimeException - if the copying process has an error
public static void copy(Model source,
Model target)
source - target -
public static void removeFrom(ModelSet source,
ModelSet target)
throws ModelRuntimeException
source - the source, data from here is evaluatedtarget - the target, data contained in source and target are removed
from here
ModelRuntimeException - if the deleting process has an error
public static Model intersection(Model a,
Model b,
Model result)
throws ModelRuntimeException
a - b - result -
ModelRuntimeException
public static Model union(Model a,
Model b,
Model result)
throws ModelRuntimeException
a - b - result -
ModelRuntimeException
public static Model complement(Model a,
Model b,
Model result)
throws ModelRuntimeException
a - b - result -
ModelRuntimeException
public static void convert(java.io.File in,
Syntax inSyntax,
java.io.File out,
Syntax outSyntax)
throws java.io.FileNotFoundException
in - input FileinSyntax - out - output FileoutSyntax -
java.io.FileNotFoundException
@Deprecated
public static Model loadFromFile(java.io.File in,
Syntax inSyntax)
throws ModelRuntimeException,
java.io.IOException
in - inSyntax -
ModelRuntimeException
java.io.IOException
public static void loadFromFile(java.io.File in,
Syntax inSyntax,
Model sinkModel)
throws ModelRuntimeException,
java.io.IOException
in - inSyntax - sinkModel - where to write the loaded content. This model is not cleared.
This model should be open.
ModelRuntimeException
java.io.IOException
public static void writeToFile(Model model,
java.io.File outFile,
Syntax outSyntax)
throws ModelRuntimeException,
java.io.IOException
ModelRuntimeException
java.io.IOException
public static void convert(java.io.File[] inFiles,
Syntax[] inSyntax,
java.io.File out,
Syntax outSyntax)
throws ModelRuntimeException,
java.io.IOException
java.io.IOException
ModelRuntimeException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||