Revert "Use the dataset directly for isomorphism with Jena backend"
This reverts commit f45847842c
.
This commit is contained in:
parent
f45847842c
commit
b891e8a40b
1 changed files with 9 additions and 15 deletions
|
@ -7,8 +7,6 @@ import java.io.ByteArrayOutputStream;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -21,7 +19,6 @@ import org.apache.commons.logging.LogFactory;
|
|||
import org.apache.jena.query.QuerySolutionMap;
|
||||
import org.apache.jena.query.Syntax;
|
||||
import org.apache.jena.rdf.model.Literal;
|
||||
import org.apache.jena.riot.Lang;
|
||||
import org.apache.jena.riot.RDFDataMgr;
|
||||
import org.apache.log4j.lf5.util.StreamUtils;
|
||||
|
||||
|
@ -597,14 +594,10 @@ public abstract class RDFServiceJena extends RDFServiceImpl implements RDFServic
|
|||
@Override
|
||||
public boolean isEquivalentGraph(String graphURI, InputStream serializedGraph,
|
||||
ModelSerializationFormat serializationFormat) throws RDFServiceException {
|
||||
|
||||
Model fileModel = RDFServiceUtils.parseModel(serializedGraph, serializationFormat);
|
||||
|
||||
DatasetWrapper dw = getDatasetWrapper();
|
||||
Dataset d = dw.getDataset();
|
||||
Model tripleStoreModel = d.getNamedModel(graphURI);
|
||||
|
||||
return fileModel.isIsomorphicWith(tripleStoreModel);
|
||||
Model tripleStoreModel = new RDFServiceDataset(this).getNamedModel(graphURI);
|
||||
Model fromTripleStoreModel = ModelFactory.createDefaultModel().add(tripleStoreModel);
|
||||
return fileModel.isIsomorphicWith(fromTripleStoreModel);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -614,11 +607,12 @@ public abstract class RDFServiceJena extends RDFServiceImpl implements RDFServic
|
|||
@Override
|
||||
public boolean isEquivalentGraph(String graphURI, Model graph) throws RDFServiceException {
|
||||
// Retrieve the graph to compare
|
||||
DatasetWrapper dw = getDatasetWrapper();
|
||||
Dataset d = dw.getDataset();
|
||||
Model tripleStoreModel = d.getNamedModel(graphURI);
|
||||
Model tripleStoreModel = new RDFServiceDataset(this).getNamedModel(graphURI);
|
||||
|
||||
return graph.isIsomorphicWith(tripleStoreModel);
|
||||
// Load the entire graph into memory (faster comparison)
|
||||
Model fromTripleStoreModel = ModelFactory.createDefaultModel().add(tripleStoreModel);
|
||||
|
||||
return graph.isIsomorphicWith(fromTripleStoreModel);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue