public class RdfRepresentation extends Object implements org.apache.stanbol.entityhub.servicesapi.model.Representation, RdfWrapper
Representation implementation backed by a Sesame Model| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.collections.Transformer |
objectTransFormer
Emits
Statement.getObject() |
| Modifier | Constructor and Description |
|---|---|
protected |
RdfRepresentation(org.openrdf.model.URI subject,
org.openrdf.model.Model model,
RdfValueFactory factory)
Creates a
Representation for the parsed subject. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String field,
Object value) |
void |
addNaturalText(String field,
String text,
String... languages) |
void |
addReference(String field,
String reference) |
boolean |
equals(Object obj) |
Iterator<Object> |
get(String field) |
<T> Iterator<T> |
get(String field,
Class<T> type) |
Iterator<org.apache.stanbol.entityhub.servicesapi.model.Text> |
get(String field,
String... languages) |
Iterator<String> |
getFieldNames() |
Object |
getFirst(String field) |
<T> T |
getFirst(String field,
Class<T> type) |
org.apache.stanbol.entityhub.servicesapi.model.Text |
getFirst(String field,
String... languages) |
org.apache.stanbol.entityhub.servicesapi.model.Reference |
getFirstReference(String field) |
String |
getId() |
org.openrdf.model.Model |
getModel()
Getter for the Model used by this Representation
Note that this model might also contain triples with other subjects as
the one used by this representation.
|
Iterator<org.apache.stanbol.entityhub.servicesapi.model.Reference> |
getReferences(String field) |
Iterator<org.apache.stanbol.entityhub.servicesapi.model.Text> |
getText(String field) |
org.openrdf.model.URI |
getURI() |
org.openrdf.model.Value |
getValue()
Getter for the wrapped Sesame
Value |
int |
hashCode() |
void |
remove(String field,
Object parsedValue) |
void |
removeAll(String field) |
void |
removeAllNaturalText(String field,
String... languages) |
void |
removeNaturalText(String field,
String value,
String... languages) |
void |
removeReference(String field,
String reference) |
void |
set(String field,
Object value) |
void |
setNaturalText(String field,
String text,
String... languages) |
void |
setReference(String field,
String reference) |
String |
toString() |
protected org.apache.commons.collections.Transformer objectTransFormer
Statement.getObject()protected RdfRepresentation(org.openrdf.model.URI subject,
org.openrdf.model.Model model,
RdfValueFactory factory)
Representation for the parsed subject. Data will be
added to the model.subject - the subjectmodel - the modelfactory - the factorypublic void add(String field, Object value) throws IllegalArgumentException
add in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic void addNaturalText(String field, String text, String... languages) throws IllegalArgumentException
addNaturalText in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic void addReference(String field, String reference) throws IllegalArgumentException
addReference in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic Iterator<Object> get(String field) throws IllegalArgumentException
get in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic <T> Iterator<T> get(String field, Class<T> type) throws org.apache.stanbol.entityhub.servicesapi.model.UnsupportedTypeException
get in interface org.apache.stanbol.entityhub.servicesapi.model.Representationorg.apache.stanbol.entityhub.servicesapi.model.UnsupportedTypeExceptionpublic Iterator<org.apache.stanbol.entityhub.servicesapi.model.Text> get(String field, String... languages)
get in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic Iterator<String> getFieldNames()
getFieldNames in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic Object getFirst(String field)
getFirst in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic <T> T getFirst(String field, Class<T> type) throws org.apache.stanbol.entityhub.servicesapi.model.UnsupportedTypeException
getFirst in interface org.apache.stanbol.entityhub.servicesapi.model.Representationorg.apache.stanbol.entityhub.servicesapi.model.UnsupportedTypeExceptionpublic org.apache.stanbol.entityhub.servicesapi.model.Text getFirst(String field, String... languages)
getFirst in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic org.apache.stanbol.entityhub.servicesapi.model.Reference getFirstReference(String field)
getFirstReference in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic String getId()
getId in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic Iterator<org.apache.stanbol.entityhub.servicesapi.model.Reference> getReferences(String field)
getReferences in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic Iterator<org.apache.stanbol.entityhub.servicesapi.model.Text> getText(String field)
getText in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic void remove(String field, Object parsedValue)
remove in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic void removeAll(String field) throws IllegalArgumentException
removeAll in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic void removeAllNaturalText(String field, String... languages) throws IllegalArgumentException
removeAllNaturalText in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic void removeNaturalText(String field, String value, String... languages)
removeNaturalText in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic void removeReference(String field, String reference)
removeReference in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic void set(String field, Object value) throws IllegalArgumentException
set in interface org.apache.stanbol.entityhub.servicesapi.model.RepresentationIllegalArgumentExceptionpublic void setNaturalText(String field, String text, String... languages)
setNaturalText in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic void setReference(String field, String reference)
setReference in interface org.apache.stanbol.entityhub.servicesapi.model.Representationpublic org.openrdf.model.Model getModel()
Note that this model might also contain triples with other subjects as the one used by this representation.
public org.openrdf.model.URI getURI()
public org.openrdf.model.Value getValue()
RdfWrapperValuegetValue in interface RdfWrapperCopyright © 2013-2014 The Apache Software Foundation. All Rights Reserved.