public abstract class KiWiResource extends KiWiNode implements org.openrdf.model.Resource
Each KiWiResource has a 1:1 correspondance to a content item. Each KiWiResource is also directly related with a Sesame 2 resource in the knowledge base backend. The kiwi.sesame package contains appropriate adaptors for transforming Sesame 2 resources into KiWiResources.
Each KiWiResoure furthermore participates in exactly one knowledge space, where the RDF resource may have different identifiers for the users. This knowledge space defines the getTripleStore().of the node. For this reason, a Sesame 2 Value may correspond to several KiWiNodes in different knowledge spaces.
TODO: we could further simplify the data model by treating TextContent and MediaContent as literals that are in a certain relation with the resource ("kiwi:hasTextContent", "kiwi:hasMediaContent") and introducing the following new literal types: KiWiTextContentLiteral KiWiMediaContentLiteral KiWiStringContentLiteral The class hierarchy should be changed so that from KiWiNode -> KiWiLiteral and from KiWiNode -> KiWiResource there is joined subclass, and from there on single table currently existing functionality should be moved to ContentItemService
Modifier | Constructor and Description |
---|---|
protected |
KiWiResource() |
protected |
KiWiResource(Date created) |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
isAnonymousResource()
Return true if the resource is an anonymous resource / blank node
|
boolean |
isLiteral()
Return true if the node is a literal.
|
abstract boolean |
isUriResource()
Return true in case the node is a uri resource (avoids instanceof test)
|
getCreated, getId, setCreated, setId
protected KiWiResource()
protected KiWiResource(Date created)
public boolean isLiteral()
public abstract boolean isAnonymousResource()
isAnonymousResource
in class KiWiNode
public abstract boolean isUriResource()
KiWiNode
isUriResource
in class KiWiNode
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.