Java Code Examples for org.eclipse.rdf4j.rio.RDFFormat#supportsContexts()

The following examples show how to use org.eclipse.rdf4j.rio.RDFFormat#supportsContexts() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public void add(File file, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(file, getBaseURI(), dataFormat, getAddContexts());
	} else {
		super.add(file, getBaseURI(), dataFormat, contexts);
	}
}
 
Example 2
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void add(File file, String baseURI, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (baseURI == null) {
		baseURI = getBaseURI();
	}
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(file, baseURI, dataFormat, getAddContexts());
	} else {
		super.add(file, baseURI, dataFormat, contexts);
	}
}
 
Example 3
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public void add(InputStream in, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(in, getBaseURI(), dataFormat, getAddContexts());
	} else {
		super.add(in, getBaseURI(), dataFormat, contexts);
	}
}
 
Example 4
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (baseURI == null) {
		baseURI = getBaseURI();
	}
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(in, baseURI, dataFormat, getAddContexts());
	} else {
		super.add(in, baseURI, dataFormat, contexts);
	}
}
 
Example 5
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public void add(Reader reader, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(reader, getBaseURI(), dataFormat, getAddContexts());
	} else {
		super.add(reader, getBaseURI(), dataFormat, contexts);
	}
}
 
Example 6
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void add(Reader reader, String baseURI, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (baseURI == null) {
		baseURI = getBaseURI();
	}
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(reader, baseURI, dataFormat, getAddContexts());
	} else {
		super.add(reader, baseURI, dataFormat, contexts);
	}
}
 
Example 7
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public void add(URL url, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(url, getBaseURI(), dataFormat, getAddContexts());
	} else {
		super.add(url, getBaseURI(), dataFormat, contexts);
	}
}
 
Example 8
Source File: ContextAwareConnection.java    From rdf4j with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public void add(URL url, String baseURI, RDFFormat dataFormat, Resource... contexts)
		throws IOException, RDFParseException, RepositoryException {
	if (baseURI == null) {
		baseURI = getBaseURI();
	}
	if (isNilContext(contexts) && !dataFormat.supportsContexts()) {
		super.add(url, baseURI, dataFormat, getAddContexts());
	} else {
		super.add(url, baseURI, dataFormat, contexts);
	}
}