Skip to content
Snippets Groups Projects
Commit d2ed636e authored by Jonas Blatt's avatar Jonas Blatt :ant:
Browse files

Merge branch 'develop' into feature-actions

parents 45da7bed dc7ea56d
No related branches found
No related tags found
No related merge requests found
Showing
with 295 additions and 10 deletions
......@@ -14,6 +14,6 @@ public class Description extends AbstractStringValueObject {
@Override
protected Integer getMaxLength() {
return 1000;
return 2000;
}
}
package de.unikoblenz.fgbks.base.domain;
import de.unikoblenz.fgbks.base.value.AbstractStringValueObject;
public class Label extends AbstractStringValueObject {
public Label(Label initialValue) {
this(initialValue.getValue());
}
public Label(String initialValue) {
super(initialValue);
}
@Override
protected Integer getMaxLength() {
return 1000;
}
}
package de.unikoblenz.fgbks.base.domain;
import de.unikoblenz.fgbks.base.value.AbstractStringValueObject;
public class StringValue extends AbstractStringValueObject {
public StringValue(StringValue initialValue) {
this(initialValue.getValue());
}
public StringValue(String initialValue) {
super(initialValue);
}
@Override
protected Integer getMaxLength() {
return 1000;
}
}
package de.unikoblenz.fgbks.base.domain;
import de.unikoblenz.fgbks.base.value.AbstractStringValueObject;
public class Text extends AbstractStringValueObject {
public Text(Text initialValue) {
this(initialValue.getValue());
}
public Text(String initialValue) {
super(initialValue);
}
@Override
protected boolean handleBlanksAsNull() {
return false;
}
@Override
protected Integer getMaxLength() {
return 1000;
}
@Override
protected Integer getMinLength() {
return 0; // can be blank
}
}
......@@ -3,8 +3,16 @@ package de.unikoblenz.fgbks.core.dmn.domain.common;
import de.unikoblenz.fgbks.base.value.AbstractSimpleValueObject;
import org.apache.commons.lang3.Validate;
/**
* Representing a row number of a dmn decision table.
*/
public class RowNumber extends AbstractSimpleValueObject<Long> {
/**
* Create a new RowNumber with the initial value.
*
* @param initialValue the row number
*/
public RowNumber(Long initialValue) {
super(initialValue);
}
......
......@@ -2,12 +2,26 @@ package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.base.value.AbstractStringValueObject;
/**
* An AbstractId is a String with a max 100 character length and should specify a unique element of
* a dmn table.
*/
public abstract class AbstractId extends AbstractStringValueObject {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public AbstractId(AbstractId initialValue) {
this(initialValue.getValue());
}
/**
* Create new object with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public AbstractId(String initialValue) {
super(initialValue);
}
......@@ -17,6 +31,11 @@ public abstract class AbstractId extends AbstractStringValueObject {
return 100;
}
/**
* Get a string, which contains the classname of the id and the value of the id.
*
* @return the String with the classname + ": + the value of the id
*/
@Override
public String toString() {
return this.getClassName() + ": " + this.getValue();
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnColumn;
/**
* A column id, representing the id of a {@link VDmnColumn}.
*/
public abstract class ColumnId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public ColumnId(AbstractId initialValue) {
super(initialValue);
}
/**
* Create new ColumnId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public ColumnId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecision;
/**
* A decision id, representing the id of a {@link VDmnDecision}.
*/
@JsonIdentifier("decisionId")
public class DecisionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DecisionId(DecisionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DecisionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DecisionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDecisionTable;
/**
* A decision table id, representing the id of a {@link VDmnDecisionTable}.
*/
@JsonIdentifier("decisionTableId")
public class DecisionTableId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DecisionTableId(DecisionTableId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DecisionTableId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DecisionTableId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnDefinition;
/**
* A definition id, representing the id of a {@link VDmnDefinition}.
*/
@JsonIdentifier("definitionId")
public class DefinitionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public DefinitionId(DefinitionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new DefinitionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public DefinitionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputData;
/**
* A InputDataId id, representing the id of a {@link VDmnInputData}.
*/
@JsonIdentifier("ruleId")
public class InputDataId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputDataId(InputDataId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputDataId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputDataId(String initialValue) {
super(initialValue);
}
}
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputValue;
/**
* A input entry id, representing the id of the expression of a {@link VDmnInputValue}.
*/
@JsonIdentifier("inputEntryId")
public class InputEntryId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputEntryId(InputEntryId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputEntryId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputEntryId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputValue;
/**
* A input entry id, representing the id of a {@link VDmnInputValue}.
*/
@JsonIdentifier("inputExpressionId")
public class InputExpressionId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputExpressionId(InputExpressionId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputExpressionId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputExpressionId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnInputColumn;
/**
* A input id, representing the id of the a {@link VDmnInputColumn}.
*/
@JsonIdentifier("inputId")
public class InputId extends ColumnId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public InputId(InputId initialValue) {
this(initialValue.getValue());
}
/**
* Create new InputId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public InputId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnOutputColumn;
/**
* A output entry id, representing the id of the expression of a {@link VDmnOutputColumn}.
*/
@JsonIdentifier("outputEntryId")
public class OutputEntryId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public OutputEntryId(OutputEntryId initialValue) {
this(initialValue.getValue());
}
/**
* Create new OutputEntryId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public OutputEntryId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
@JsonIdentifier("OutputId")
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnOutputColumn;
/**
* A output id, representing the id of the a {@link VDmnOutputColumn}.
*/
@JsonIdentifier("outputId")
public class OutputId extends ColumnId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public OutputId(OutputId initialValue) {
super(initialValue.getValue());
}
/**
* Create new OutputId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public OutputId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.ids;
import de.unikoblenz.fgbks.core.dmn.domain.vdmn.VDmnRule;
/**
* A rule id, representing the id of the a {@link VDmnRule}.
*/
@JsonIdentifier("ruleId")
public class RuleId extends AbstractId {
/**
* Create a new copy of the initialValue with the id value of the given Id object.
*
* @param initialValue the original id
*/
public RuleId(RuleId initialValue) {
this(initialValue.getValue());
}
/**
* Create new RuleId with the id value of the initialValue.
*
* @param initialValue the value of the new id
*/
public RuleId(String initialValue) {
super(initialValue);
}
......
package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.base.domain.Label;
import de.unikoblenz.fgbks.base.domain.Name;
import de.unikoblenz.fgbks.base.domain.StringValue;
import de.unikoblenz.fgbks.core.dmn.domain.ids.ColumnId;
import java.util.List;
import java.util.Optional;
public interface VDmnColumn extends VDmnElement {
VDmnDecisionTable getDmnDecisionTable();
default ColumnId getColumnId() {
return (ColumnId) getId();
}
Optional<List<StringValue>> getPredefinedValues();
Optional<Name> getName();
Optional<Label> getLabel();
VTypeRef getTypeRef();
List<VDmnValue> getValues();
default ColumnId getColumnId() {
return (ColumnId) getId();
}
}
package de.unikoblenz.fgbks.core.dmn.domain.vdmn;
import de.unikoblenz.fgbks.core.dmn.domain.ids.DecisionId;
import java.util.List;
public interface VDmnDecision extends VDmnElement {
VDmnDefinition getDmnDefinition();
public interface VDmnDecision extends VDmnNode {
default DecisionId getDecisionId() {
return (DecisionId) getId();
}
List<VDmnNode> getInformationRequirements();
VDmnDecisionTable getDmnDecisionTable();
}
......@@ -5,9 +5,11 @@ import java.util.List;
public interface VDmnDefinition extends VDmnElement {
List<VDmnDecision> getDmnDecisions();
List<VDmnInputData> getDmnInputData();
default DefinitionId getDefinitionId() {
return (DefinitionId) getId();
}
List<VDmnDecision> getDmnDecisions();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment