public class RdfClass extends RdfTypeComplexBase
| Modifier and Type | Field and Description |
|---|---|
protected Concept |
concept
The concept that captures rdf terms that are instances of this class.
|
protected java.util.function.Function<Object,String> |
defaultIriFn
A function for obtaining a default IRI from an object
|
protected EntityOps |
entityOps
The affected class (maybe we should use the fully qualified class name instead?)
|
protected boolean |
isPopulated |
protected List<RdfMapper> |
populators
Populators are used to map between property values and RDF data
A single populator may thereby set multiple properties at once.
|
protected Map<String,RdfPropertyDescriptor> |
propertyDescriptors
PropertyDescriptors map the Java property types to RdfType instances.
|
| Constructor and Description |
|---|
RdfClass(EntityOps targetClass,
java.util.function.Function<Object,String> defaultIriFn) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPropertyDescriptor(RdfPropertyDescriptor propertyDescriptor) |
void |
addPropertyMapper(RdfMapper populator) |
void |
checkPopulated() |
Object |
createJavaObject(org.apache.jena.rdf.model.RDFNode r)
Extract a Java (literal) object from a given node.
|
Object |
createProxy(org.apache.jena.sparql.core.DatasetGraph datasetGraph,
org.apache.jena.graph.Node subject)
Deprecated.
Use createJavaObject first, and initialize values from a datasetGraph using a separate call to one of the methods of this class
TODO which method?
|
void |
exposeFragment(ResourceFragment out,
org.apache.jena.rdf.model.Resource priorState,
Object entity)
Return an RDF graph from the entity, where nodes may be placeholders
|
void |
exposeShape(ResourceShapeBuilder builder) |
Concept |
getConcept() |
Class<?> |
getEntityClass()
Return the Java class corresponding to this type
(maybe it should be Type instead of Class)
|
EntityOps |
getEntityOps() |
static MethodInterceptorRdf |
getMethodInterceptor(Object o) |
Collection<RdfPropertyDescriptor> |
getPropertyDescriptors() |
RdfPropertyDescriptor |
getPropertyDescriptors(String propertyName) |
Collection<RdfMapper> |
getPropertyMappers() |
org.apache.jena.graph.Node |
getRootNode(Object o)
Returns the subject of a given object or null if not present.
|
boolean |
hasIdentity()
Flag to indicate whether entities created from this mapping have their own identity.
|
boolean |
isPopulated()
Whether this RdfClass instance is fully initialized.
|
EntityFragment |
populate(org.apache.jena.rdf.model.Resource shape,
Object entity)
Set property values of the given target object based a DatasetGraph.
|
PathFragment |
resolve(String propertyName) |
void |
setPopulated(boolean isPopulated) |
Object |
toJava(org.apache.jena.graph.Node node) |
String |
toString() |
isSimpleTypeprotected EntityOps entityOps
protected Concept concept
protected java.util.function.Function<Object,String> defaultIriFn
protected List<RdfMapper> populators
protected Map<String,RdfPropertyDescriptor> propertyDescriptors
protected boolean isPopulated
public RdfClass(EntityOps targetClass, java.util.function.Function<Object,String> defaultIriFn)
public Collection<RdfMapper> getPropertyMappers()
public Collection<RdfPropertyDescriptor> getPropertyDescriptors()
public RdfPropertyDescriptor getPropertyDescriptors(String propertyName)
public EntityOps getEntityOps()
public Concept getConcept()
public void setPopulated(boolean isPopulated)
public void checkPopulated()
public void addPropertyDescriptor(RdfPropertyDescriptor propertyDescriptor)
public void addPropertyMapper(RdfMapper populator)
public boolean isPopulated()
public Class<?> getEntityClass()
RdfTypepublic void exposeShape(ResourceShapeBuilder builder)
public static MethodInterceptorRdf getMethodInterceptor(Object o)
public org.apache.jena.graph.Node getRootNode(Object o)
o - public Object toJava(org.apache.jena.graph.Node node)
public EntityFragment populate(org.apache.jena.rdf.model.Resource shape, Object entity)
entity - datasetGraph - @Deprecated public Object createProxy(org.apache.jena.sparql.core.DatasetGraph datasetGraph, org.apache.jena.graph.Node subject)
datasetGraph - public Object createJavaObject(org.apache.jena.rdf.model.RDFNode r)
RdfTypepublic boolean hasIdentity()
RdfTypepublic void exposeFragment(ResourceFragment out, org.apache.jena.rdf.model.Resource priorState, Object entity)
entity - public PathFragment resolve(String propertyName)
resolve in interface RdfTyperesolve in class RdfTypeBaseCopyright © 2017. All rights reserved.