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

com.eduworks.cruncher.ontology.CruncherOntologySetUriPrefix Maven / Gradle / Ivy

There is a newer version: 5.16.4
Show newest version
package com.eduworks.cruncher.ontology;

import java.io.InputStream;
import java.util.Map;

import org.json.JSONException;
import org.json.JSONObject;

import com.eduworks.ontology.Ontology;
import com.eduworks.resolver.Context;
import com.eduworks.resolver.Cruncher;

public class CruncherOntologySetUriPrefix extends Cruncher
{

	@Override
	public Object resolve(Context c, Map parameters, Map dataStreams) throws JSONException
	{
		String uri = decodeValue(optAsString("uri", "", c, parameters, dataStreams));
		
		Ontology.setDefaultURI(uri);
		
		return uri;
	}

	@Override
	public String getDescription()
	{
		return "adds an import statement to the ontology specified by ontologyId to import the ontology specified with importId";
	}

	@Override
	public String getReturn()
	{
		return "Object";
	}

	@Override
	public String getAttribution()
	{
		return ATTRIB_NONE;
	}

	@Override
	public JSONObject getParameters() throws JSONException
	{
		return jo("ontologyId", "string", "directory", "path string", "importId", "string");
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy