Schema extends ElementDefinitions<SchemaEntityDefinition, SchemaEdgeDefinition> implements Cloneable { @Override public SchemaElementDefinition getElement(final String group) { return (SchemaElementDefinition) super.getElement(group); } Schema(); protected  Schema(final Map<String, TypeDefinition> types); static Schema fromJson(final InputStream... inputStreams); static Schema fromJson(final Path... filePaths); static Schema fromJson(final byte[]... jsonBytes); @Deprecated String getId(); @Deprecated void setId(final String id); @SuppressWarnings("CloneDoesntCallSuperClone") @SuppressFBWarnings(value = "CN_IDIOM_NO_SUPER_CALL", justification = "Uses toJson instead.") @Override Schema clone(); @JsonIgnore boolean isAggregationEnabled(); @JsonIgnore List<String> getAggregatedGroups(); ValidationResult validate(); boolean hasValidation(); Map<String, TypeDefinition> getTypes(); TypeDefinition getType(final String typeName); @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "class") Serialiser getVertexSerialiser(); @Deprecated @JsonIgnore String getVertexSerialiserClass(); @Override SchemaElementDefinition getElement(final String group); String getVisibilityProperty(); @Deprecated String getTimestampProperty(); Map<String, String> getConfig(); String getConfig(final String key); void addConfig(final String key, final String value); @Override String toString(); byte[] toCompactJson();  }
@Test public void testCorrectSerialiserRetrievableFromConfig() throws NotSerializableException { Schema store = new Schema.Builder() .type(TestTypes.PROP_STRING, new TypeDefinition.Builder().clazz(String.class) .serialiser(new JavaSerialiser()).build()) .edge(TestGroups.EDGE, new SchemaEdgeDefinition.Builder() .property(TestPropertyNames.PROP_1, TestTypes.PROP_STRING).build()) .build(); assertEquals(JavaSerialiser.class, store.getElement(TestGroups.EDGE) .getPropertyTypeDef(TestPropertyNames.PROP_1).getSerialiser().getClass()); }