SchemaElementDefinition implements ElementDefinition { @JsonIgnore protected Set<String> getParents() { return parents; } SchemaElementDefinition(); ValidationResult validate(); @JsonIgnore Set<String> getProperties(); boolean containsProperty(final String propertyName); @JsonGetter("properties") Map<String, String> getPropertyMap(); @JsonIgnore Collection<IdentifierType> getIdentifiers(); @JsonIgnore Map<IdentifierType, String> getIdentifierMap(); boolean containsIdentifier(final IdentifierType identifierType); String getPropertyTypeName(final String propertyName); String getIdentifierTypeName(final IdentifierType idType); @JsonIgnore Collection<String> getPropertyTypeNames(); @JsonIgnore Collection<String> getIdentifierTypeNames(); Class<?> getClass(final String key); @JsonIgnore ElementAggregator getOriginalAggregator(); @JsonGetter("aggregateFunctions") List<TupleAdaptedBinaryOperator<String, ?>> getOriginalAggregateFunctions(); @JsonIgnore ElementAggregator getFullAggregator(); @JsonIgnore ElementAggregator getIngestAggregator(); @JsonIgnore ElementAggregator getQueryAggregator(final Set<String> viewGroupBy, final ElementAggregator viewAggregator); @JsonIgnore ElementFilter getValidator(); @JsonIgnore ElementFilter getOriginalValidator(); boolean hasValidation(); ElementFilter getValidator(final boolean includeIsA); @SuppressFBWarnings(value = "PZLA_PREFER_ZERO_LENGTH_ARRAYS", justification = "null is only returned when the validator is null") @JsonGetter("validateFunctions") TupleAdaptedPredicate[] getOriginalValidateFunctions(); @JsonIgnore Iterable<TypeDefinition> getPropertyTypeDefs(); TypeDefinition getPropertyTypeDef(final String property); Class<?> getPropertyClass(final String propertyName); Class<?> getIdentifierClass(final IdentifierType idType); Set<String> getGroupBy(); String getDescription(); @JsonIgnore abstract SchemaElementDefinition getExpandedDefinition(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); @Override void lock(); boolean isAggregate(); void setAggregate(final boolean aggregate);  }
@Test public void shouldNotBeAbleToModifyParentsOnceBuilt() { final T elementDef = createBuilder() .property("property", PROPERTY_STRING_TYPE) .parents("parentGroup1") .build(); try { elementDef.getParents().add("parentGroup2"); fail("Exception expected"); } catch (final UnsupportedOperationException e) { assertNotNull(e); } }