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

org.w3.skos.Concept Maven / Gradle / Ivy

There is a newer version: 3.1.8
Show newest version
package org.w3.skos;

import org.cassproject.schema.general.EcRemoteLinkedData;
import org.stjs.javascript.Array;

/**
 * www.w3.org/2004/02/skos/core/Concept
 * An idea or notion; a unit of thought.
 * @author w3.org
 * @class Concept
 * @module org.w3.skos
 */
public class Concept extends EcRemoteLinkedData
{
	private static final String TYPE_0_1 = "http://schema.cassproject.org/0.3/skos/Concept";
	private static final String TYPE_0_2 = "https://schema.cassproject.org/0.3/skos/Concept";
	private static final String TYPE_0_3 = "https://schema.cassproject.org/0.4/skos/Concept";
	public static final String myType = TYPE_0_3;
	/**
	 * Constructor, automatically sets @context and @type.
	 * @constructor
	 */
	public Concept()
	{
		super("https://schema.cassproject.org/0.4/skos/","Concept");
	}

	/**
	 * www.w3.org/2004/02/skos/core/topConceptOf
	 * Relates a concept to the concept scheme that it is a top level concept of.
	 * @property topConceptOf
	 * @type ConceptScheme
	 */
	public ConceptScheme topConceptOf;

	/**
	 * www.w3.org/2004/02/skos/core/semanticRelation
	 * Links a concept to a concept related by meaning.
	 * @property semanticRelation
	 * @type Concept
	 */
	public Concept semanticRelation;

	@Override
	protected void upgrade() {
		super.upgrade();
		if (TYPE_0_1.equals(getFullType())) {
			setContextAndType("https://schema.cassproject.org/0.3/skos", TYPE_0_2);
		}
		if (TYPE_0_2.equals(getFullType())) {
			setContextAndType("https://schema.cassproject.org/0.4/skos", TYPE_0_3);
		}
	}

	@Override
	public Array getTypes() {
		Array a = new Array();
		a.push(TYPE_0_3);
		a.push(TYPE_0_2);
		a.push(TYPE_0_1);
		return a;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy