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 TypeMethodDescriptionvoidexposeFragment(ResourceFragment out, org.apache.jena.rdf.model.Resource priorState, Object entity) voidexposeShape(org.aksw.jena_sparql_api.shape.ResourceShapeBuilder shapeBuilder) Expose SPARQL patterns that identify the set of triples that are needed to populate the *immediate* values of the affected entity properties.default StringgetName()It may be useful giving property mappers names.Return the set of entity properties which are affected by this populator.voidpopulate(EntityFragment out, org.apache.jena.rdf.model.Resource shape, Object entity) Return a relation that addresses the attribute on in the RDF
-
Method Details
-
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
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(org.aksw.jena_sparql_api.shape.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
-
resolve
Return a relation that addresses the attribute on in the RDF- Returns:
-