SKB Base

Base definitions, some standard classes and services, categories for the SKB, and the base line for composite hierarchies for the SKB.

License

License

GroupId

GroupId

de.vandermeer
ArtifactId

ArtifactId

skb.base
Last Version

Last Version

0.0.3
Release Date

Release Date

Type

Type

jar
Description

Description

SKB Base
Base definitions, some standard classes and services, categories for the SKB, and the base line for composite hierarchies for the SKB.
Project URL

Project URL

https://github.com/vdmeer/skb-java-base
Source Code Management

Source Code Management

https://github.com/vdmeer/skb-java-base

Download skb.base

How to add to project

<!-- https://jarcasting.com/artifacts/de.vandermeer/skb.base/ -->
<dependency>
    <groupId>de.vandermeer</groupId>
    <artifactId>skb.base</artifactId>
    <version>0.0.3</version>
</dependency>
// https://jarcasting.com/artifacts/de.vandermeer/skb.base/
implementation 'de.vandermeer:skb.base:0.0.3'
// https://jarcasting.com/artifacts/de.vandermeer/skb.base/
implementation ("de.vandermeer:skb.base:0.0.3")
'de.vandermeer:skb.base:jar:0.0.3'
<dependency org="de.vandermeer" name="skb.base" rev="0.0.3">
  <artifact name="skb.base" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.vandermeer', module='skb.base', version='0.0.3')
)
libraryDependencies += "de.vandermeer" % "skb.base" % "0.0.3"
[de.vandermeer/skb.base "0.0.3"]

Dependencies

compile (4)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.7
org.antlr : ST4 jar 4.0.8
org.apache.commons : commons-lang3 jar 3.1
org.antlr : antlr4 jar 4.2.2

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

SKB Base

Current release is 0.2.0. All releases are on Maven Central.

The project is organized in packages representing implementations of basic concepts. Some concepts require more than one package. Packages can but don’t have to be related to each other. For instance, the message package is used by the composite.coin package which in turn is used by the managers package.

Implemented Concepts

Base

Very basic interfaces are provided in the top level base package.

Categories

The package categories defines a hierarchy of interfaces (and some classes and default implementations) for categories such as has something or is something. It has two sub packages: categories.kvt for key/value/type categories (e.g. keys and keys with types) and categories.options for option categories (still experimental).

Composite Pattern

The package composite provides a simple implementation of the composite pattern with a top element and nodes (containing other nodes and leafs) and of course leafs. It has one sub package composite.coin that defines hybrid classes implementing node and leaf functionality (so "both sides of a coin").

Those hybrid objects can be used as node and leaf. The package defines null objects, which can be used to qualify a null return (as compared to simply returning null). The package also defined CC objects for standard message types: information, warning, and error.

Console

The console package has an implementation of a non-blocking console reader and an object with some interesting console features. Skb_Console defines loggers that can then be used for standard console output (similar to stdout and stderr, just using loggers thus configurable at runtime).

It also provides standard methods to use the loggers. For example conWarn() will print a message typed warning to the standard out logger. These methods make use of a global variable USE_CONSOLE, thus they can be switched on and off by an application resulting in standard output being printed or ignored at runtime.

Info (source, loader, target, writer, validator)

The info package implements a concept for defining, retrieving, writing, and validation information sources and information. This package solves many standard problem: define and validate a directory or a file or a set of both, load STGroups from any source and validate them, walk directories and apply actions to filtered elements found.

The concept here is based on

  • InfoSource as a source of information (directory, file, database with constraints such as file system, resource),

  • InfoLoader as something that can load information from a given InfoSource (for instance a set of files from a directory),

  • InfoTarget as a target of information (the opposite of an InfoSource),

  • InfoWriter as a writer of information to an InfoTarget (kind of the opposite of an InfoLoader),

  • InfoValidator as a validator of source or target or actual information.

Each of these concepts has some implementations for standard problems.

Managers

The managers package implements managers, currently only a message manager that uses the standard message and coin objects and provides an object with flexible message processing (printing, storing, counting).

Message (5WH)

The message package implements the concept of a message as a 5WH object: who, what, when, where, why, and how. It comes with builder and renderer (using string templates).

(Command) Shell

The shell package implements a shell with commands being injected into as command interpreters. Commands can have arguments (parameters).

All of those shell components are defined in interfaces and the package provides abstract implementations and a factory. Some standard commands (exit, wait, standard help generation using string templates or ASCII tables, history, and run commands) are implemented.

Strings

The strings package implements strings that have an identifier and a version and/or a value part. This can be very helpful when identifier need to be encoded along with versions but defining a class is for some reasons not suitable.

Utils

The utils package provides some standard utils. The sub package utils.collections has some simple helper classes to deal with Java maps and Java collections.

Versions

Version
0.0.3