|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.hp.hpl.swade.portal.MultiStatementWrapper
A wrapper around a set of property/value pairs. This roughly corresponds to a set of RDF statements except that the property value of each statement is expected to be the same.
However, this is not an invariant and is not checked.
| Field Summary | |
protected DataSource |
datasource
The datasource this node is located in |
protected java.util.Map |
sources
Map from statements in this wrapper to their sources |
protected java.util.List |
statements
The list of statements in the wrapper |
| Constructor Summary | |
MultiStatementWrapper(DataSource datasource)
Constructor |
|
MultiStatementWrapper(java.util.Iterator stmts,
DataSource datasource)
Constructor. |
|
| Method Summary | |
void |
add(com.hp.hpl.jena.rdf.model.Statement stmt)
Add an additional statement to set. |
int |
compareTo(java.lang.Object o1)
Comparison based on displayname of property. |
ResourceWrapper |
getProp()
Return the property as a wrapped resource |
java.lang.String |
getPropName()
Return the displayable name of the property whose values are being wrapped. |
NodeWrapper |
getStatementSource()
Return a wrapped resource representing the data source of an arbitrary value for this multi statement or null if it is not known. |
NodeWrapper |
getStatementSource(java.lang.Object value)
Return a wrapped resource representing the data source of the given value of this multi-statement or null if it is not known. |
java.util.List |
getSubjects()
Return the set of subject values as wrapped objects. |
NodeWrapper |
getValue()
Return a wrapped arbitrary single value from this set or null if it is empty. |
java.util.List |
getValues()
Return the set of property values as a list of wrapper objects. |
boolean |
hasValue(java.lang.String resource)
Test if the MSW contains the given resource. |
boolean |
isEmpty()
Return true if this wrapper contains no statements. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.List statements
protected DataSource datasource
protected java.util.Map sources
| Constructor Detail |
public MultiStatementWrapper(DataSource datasource)
public MultiStatementWrapper(java.util.Iterator stmts,
DataSource datasource)
stmts - an iterator over the statements to include| Method Detail |
public void add(com.hp.hpl.jena.rdf.model.Statement stmt)
public boolean isEmpty()
public java.lang.String getPropName()
public ResourceWrapper getProp()
public java.util.List getValues()
public java.util.List getSubjects()
public boolean hasValue(java.lang.String resource)
public NodeWrapper getValue()
public NodeWrapper getStatementSource(java.lang.Object value)
public NodeWrapper getStatementSource()
public int compareTo(java.lang.Object o1)
compareTo in interface java.lang.Comparable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||