Skip to content

Commit

Permalink
interim commit
Browse files Browse the repository at this point in the history
  • Loading branch information
david-waltermire committed May 7, 2024
1 parent 8a2275a commit 2aad7b7
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ default Object getEffectiveDefaultValue() {
return getDefaultValue();
}

@Override
default Object getValue(Object parent) {
return IBoundProperty.super.getValue(parent);
}

@Override
default void setValue(Object parentObject, Object value) {
IBoundProperty.super.setValue(parentObject, value);
}

@Override
default Object readItem(Object parent, IItemReadHandler handler) throws IOException {
return handler.readItemFieldValue(ObjectUtils.requireNonNull(parent, "parent"), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,34 @@

import gov.nist.secauto.metaschema.core.model.IInstance;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

/**
* Represents a Metaschema module instance bound to Java data.
*/
public interface IBoundInstance extends IBoundProperty, IInstance {
@Override
IBoundDefinitionModel getContainingDefinition();

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
@Nullable
default Object getValue(@NonNull Object parent) {
return IBoundProperty.super.getValue(parent);
}

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
default void setValue(@NonNull Object parentObject, @Nullable Object value) {
IBoundProperty.super.setValue(parentObject, value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import javax.xml.namespace.QName;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

/**
* Represents a flag instance bound to Java data.
Expand Down Expand Up @@ -116,27 +115,6 @@ default IBoundInstanceFlag getInlineInstance() {
return this;
}

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
@Nullable
default Object getValue(@NonNull Object parent) {
return IBoundInstance.super.getValue(parent);
}

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
default void setValue(@NonNull Object parentObject, @Nullable Object value) {
IBoundInstance.super.setValue(parentObject, value);
}

@Override
default void deepCopy(@NonNull Object fromInstance, @NonNull Object toInstance) throws BindingException {
Object value = getValue(fromInstance);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,4 @@ default Collection<? extends Object> getItemValues(Object value) {
@Nullable
IBoundInstanceFlag getItemJsonKey(@NonNull Object item);

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
default Object getValue(Object parent) {
return IBoundInstance.super.getValue(parent);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ default boolean canHandleXmlQName(QName qname) {
}
return retval;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,6 @@ default IBoundInstanceFlag getJsonValueKeyFlagInstance() {
return null;
}

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
default Object getValue(Object parent) {
return IBoundInstanceModelField.super.getValue(parent);
}

/**
* {@inheritDoc}
* <p>
* Always bound to a field.
*/
@Override
default void setValue(Object parentObject, Object value) {
IBoundInstanceModelField.super.setValue(parentObject, value);
}

@Override
default Object readItem(Object parent, IItemReadHandler handler) throws IOException {
return handler.readItemField(ObjectUtils.requireNonNull(parent, "parent"), this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@

import gov.nist.secauto.metaschema.core.datatype.IDataTypeAdapter;
import gov.nist.secauto.metaschema.databind.io.BindingException;
import gov.nist.secauto.metaschema.databind.model.IValuedMutable;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;

public interface IFeatureScalarItemValueHandler
extends IItemValueHandler {

@Nullable
Object getValue(@NonNull Object parent);

void setValue(@NonNull Object parent, Object value);
extends IItemValueHandler, IValuedMutable {

default void setValue(@NonNull Object parent, @NonNull String text) {
Object item = getValueFromString(text);
Expand Down

0 comments on commit 2aad7b7

Please sign in to comment.