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

org.refcodes.mixin.Schema Maven / Gradle / Ivy

There is a newer version: 3.3.8
Show newest version
package org.refcodes.mixin;

import java.util.Map;

/**
 * A {@link Schema} describes a nested data structure with 0..n children
 * schemata whilst not being the data structure itself. For description
 * purposes, any descriptive attribute can be added as a key with the according
 * value, as a Schema extends the {@link Map} interface.
 */
@SuppressWarnings("rawtypes")
public interface Schema extends Map, ChildrenAccessor, TypeAccessor, AliasAccessor, DescriptionAccessor {

	// /////////////////////////////////////////////////////////////////////////
	// CONSTANTS:
	// /////////////////////////////////////////////////////////////////////////

	String DESCRIPTION = "DESCRIPTION";
	String ALIAS = "ALIAS";
	String TYPE = "TYPE";
	String VALUE = "VALUE";
	String KEY = "KEY";
	String EXCEPTION = "EXCEPTION";

	// /////////////////////////////////////////////////////////////////////////
	// METHODS:
	// /////////////////////////////////////////////////////////////////////////

	/**
	 * {@inheritDoc}
	 */
	@Override
	Schema[] getChildren();

	/**
	 * {@inheritDoc}
	 */
	@Override
	default String getAlias() {
		return (String) get( ALIAS );
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	default Class getType() {
		return (Class) get( TYPE );
	}

	/**
	 * {@inheritDoc}
	 */
	@Override
	default String getDescription() {
		return (String) get( DESCRIPTION );
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy