org.refcodes.mixin.Schema Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refcodes-mixin Show documentation
Show all versions of refcodes-mixin Show documentation
Artifact for mixins of general interest.
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