com.github.jsonldjava.impl.NQuadRDFParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jsonld-java Show documentation
Show all versions of jsonld-java Show documentation
Json-LD core implementation
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