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

com.github.jsonldjava.core.JSONLDProcessingError Maven / Gradle / Ivy

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

import java.util.HashMap;
import java.util.Map;

public class JSONLDProcessingError extends Exception {

	Map details;
	private Error type;
	
	public JSONLDProcessingError(String string, Map details) {
		super(string);
		details = details;
	}

	public JSONLDProcessingError(String string) {
		super(string);
		details = new HashMap();
	}

	public JSONLDProcessingError setDetail(String string, Object val) {
		details.put(string, val);
		//System.out.println("ERROR DETAIL: " + string + ": " + val.toString());
		return this;
	}

	public enum Error {
		SYNTAX_ERROR, PARSE_ERROR, RDF_ERROR, CONTEXT_URL_ERROR, INVALID_URL, COMPACT_ERROR, CYCLICAL_CONTEXT, FLATTEN_ERROR, FRAME_ERROR, NORMALIZE_ERROR, UNKNOWN_FORMAT, INVALID_INPUT
	}

	public JSONLDProcessingError setType(Error error) {
		this.type = error;
		return this;
	};
	
	public Error getType() {
		return type;
	}
	
	public Map getDetails() {
		return details;
	}
	
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy