All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.jsonldjava.impl.NQuadRDFParser Maven / Gradle / Ivy

There is a newer version: 0.13.6
Show newest version
package com.github.jsonldjava.impl;

import java.util.Map;

import com.github.jsonldjava.core.JSONLDProcessingError;
import com.github.jsonldjava.core.RDFParser;

import static com.github.jsonldjava.core.RDFDatasetUtils.parseNQuads;


public class NQuadRDFParser implements RDFParser {
	@Override
	public Map parse(Object dataset) throws JSONLDProcessingError {
		if (dataset instanceof String) {
			return parseNQuads((String)dataset);
		} else {
			throw new JSONLDProcessingError("NQuad Parser expected string input.")
				.setType(JSONLDProcessingError.Error.INVALID_INPUT)
				.setDetail("input", dataset);
		}
	}
	
	

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy