/** * */ package ecologylab.bigsemantics.metadata; import java.util.HashSet; import ecologylab.bigsemantics.model.text.ITermVector; /** * Base class for Metadata fields that represent scalar values. * * These, for example, lack mixins. * * @author andruid * */ public interface MetadataBase extends Iterable<MetadataFieldDescriptor> { /** * Only use this accessor, in order to maintain future code compatability. * * @return */ // public MetaMetadataRepository repository(); /** * This is actually the real composite term vector. * * @return Null for scalars. */ public ITermVector termVector(); public ITermVector termVector(HashSet<Metadata> visitedMetadata); public void recycle(); /** * Rebuilds the composite TermVector from the individual TermVectors, when there is one. * This implementation, in the base class, does nothing. */ public void rebuildCompositeTermVector(); /** * Determine if the Metadata has any entries. * @return True if there are Metadata entries. * @deprecated -- Does not seem to be substantially used. -- Andruid 6/22/11 */ public boolean hasCompositeTermVector(); /** * Says that a type should never contribute terms. * * @return */ public boolean ignoreInTermVector(); /** * * @param context * Object that the field is in. * * @return true if the field is not a scalar or a psuedo-scalar, and it has a non null value. */ // public boolean isNonNullReference(ElementState context); }