Interface RdfMapper

All Known Subinterfaces:
RdfMapperProperty
All Known Implementing Classes:
RdfMapperPropertyBase, RdfMapperPropertyMulti, RdfMapperPropertySingle

public interface RdfMapper
RdfPopulators map bean properties to triples and vice versa. In general RdfPopulators can implement arbitrary mappings between bean properties and RDF triples, i.e. beanProperties:triples -- 1:n, m:n, m:1 Note that an RDF populator only populates the *immediate* properties. Scheduling Lazy / Eager fetching is NOT up to the populator.
Author:
raven
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    exposeFragment(ResourceFragment out, org.apache.jena.rdf.model.Resource priorState, Object entity)
     
    void
    Expose SPARQL patterns that identify the set of triples that are needed to populate the *immediate* values of the affected entity properties.
    default String
    It may be useful giving property mappers names.
    Return the set of entity properties which are affected by this populator.
    void
    populate(EntityFragment out, org.apache.jena.rdf.model.Resource shape, Object entity)
     
    resolve(String propertyName)
    Return a relation that addresses the attribute on in the RDF
  • Method Details

    • getName

      default String getName()
      It may be useful giving property mappers names. For mappers that map to a single java property, the mapper name can be that of the property. But if a mapper writes to multiple java properties, a custom name could be given. A default implementation could return a string from joining the ordered affected property names alphabetically.
    • getPropertyNames

      Set<String> getPropertyNames()
      Return the set of entity properties which are affected by this populator. For instance, an RDF wktLiteral may map to two properties 'lat' and 'long'
      Returns:
    • exposeShape

      void exposeShape(ResourceShapeBuilder shapeBuilder)
      Expose SPARQL patterns that identify the set of triples that are needed to populate the *immediate* values of the affected entity properties.
      Parameters:
      shapeBuilder -
    • exposeFragment

      void exposeFragment(ResourceFragment out, org.apache.jena.rdf.model.Resource priorState, Object entity)
    • populate

      void populate(EntityFragment out, org.apache.jena.rdf.model.Resource shape, Object entity)
    • resolve

      PathFragment resolve(String propertyName)
      Return a relation that addresses the attribute on in the RDF
      Returns: