public void deletePropertyValue(URI property) { for (PropertyValue pv : this.properties) { if (pv.getUri().equals(property)) { this.properties.remove(pv); } } }
public Model toRDF2GoModel() { Model model = RDF2Go.getModelFactory().createModel(); model.open(); Resource sample = this.getUri(); model.addStatement(sample, RDF.type, this.type); for (PropertyValue property : properties) { Node object; if (property.getLang() != null) { object = model.createLanguageTagLiteral(property.getValue(), property.getLang()); } else if (property.getDatatype() != null) { object = model.createDatatypeLiteral(property.getValue(), property.getDatatype()); } else { object = model.createPlainLiteral(property.getValue()); } model.addStatement(sample, property.getUri(), object); } return model; }