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

org.jpmml.model.UnsupportedElementException Maven / Gradle / Ivy

There is a newer version: 1.6.6
Show newest version
/*
 * Copyright (c) 2018 Villu Ruusmann
 */
package org.jpmml.model;

import org.dmg.pmml.PMMLObject;

public class UnsupportedElementException extends UnsupportedMarkupException {

	public UnsupportedElementException(PMMLObject object){
		super("Element " + formatElement(object) + " is not supported", object);
	}

	static
	private String formatElement(PMMLObject object){
		Class clazz = object.getClass();

		String result = XPathUtil.formatElement(clazz);

		String name = clazz.getName();
		if(!name.startsWith("org.dmg.pmml.")){
			result += (" (Java class " + name + ")");
		}

		return result;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy