All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.stapi.graphoperations.ogmProviders.specific.graphDescriptionMappingProviders.EntityIdentifierGraphMappingProvider Maven / Gradle / Ivy

There is a newer version: 0.3.2
Show newest version
package ai.stapi.graphoperations.ogmProviders.specific.graphDescriptionMappingProviders;

import ai.stapi.graphoperations.graphLanguage.graphDescription.graphDescriptionBuilder.GraphDescriptionBuilder;
import ai.stapi.graphoperations.objectGraphLanguage.ObjectGraphMapping;
import ai.stapi.graphoperations.objectGraphLanguage.objectGraphMappingBuilder.specific.ogm.ObjectGraphMappingBuilder;
import ai.stapi.graphoperations.objectLanguage.EntityIdentifier;
import ai.stapi.graphoperations.ogmProviders.specific.SpecificGraphMappingProvider;

public class EntityIdentifierGraphMappingProvider implements SpecificGraphMappingProvider {

  protected String getGraphDescriptionNodeType() {
    return "object_declaration_entity_identifier";
  }

  @Override
  public ObjectGraphMapping provideGraphMapping(String serializationType,
                                                String fieldName) {
    var definition = new ObjectGraphMappingBuilder();
    definition.setGraphDescription(
        new GraphDescriptionBuilder().addNodeDescription(this.getGraphDescriptionNodeType()));
    return definition.build();
  }

  @Override
  public boolean supports(String serializationType) {
    return serializationType.equals(EntityIdentifier.SERIALIZATION_TYPE);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy