Class StringSlot<T>
- java.lang.Object
-
- org.incenp.obofoundry.sssom.slots.Slot<T>
-
- org.incenp.obofoundry.sssom.slots.StringSlot<T>
-
- Type Parameters:
T- The type of SSSOM object the slot is associated with.
- Direct Known Subclasses:
EntityReferenceSlot,URISlot
public class StringSlot<T> extends Slot<T>
Represents a metadata slot that is backed by a String-typed field.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ISlotVisitor<T> visitor, T target, Object value)Accepts a visitor.booleanisMultivalued()Indicates whether the slot holds a list of values rather than a single value.voidsetValue(T object, String value)Tries setting the value of the slot for a given object, using a string as input.-
Methods inherited from class org.incenp.obofoundry.sssom.slots.Slot
accept, getCompliantVersion, getName, getType, getURI, getValue, isEntityReference, isPropagatable, isURI, setValue
-
-
-
-
Method Detail
-
isMultivalued
public boolean isMultivalued()
Indicates whether the slot holds a list of values rather than a single value.- Returns:
trueis the slot is multivalued, otherwisefalse.
-
accept
public void accept(ISlotVisitor<T> visitor, T target, Object value)
Description copied from class:SlotAccepts a visitor.
-
setValue
public void setValue(T object, String value)
Description copied from class:SlotTries setting the value of the slot for a given object, using a string as input.This method only works for String-typed slots, but classes for other slot types can override it to allow parsing a string into another type of value.
-
-