public ProvDocumentDeserializer(ProvFactory pf) { this.pf=pf; this.name=pf.getName(); this.vconv = new ValueConverter(pf); }
@Override public Object convertValueToObject(org.openprovenance.prov.model.ValueConverter vconv) { if (valueAsJavaObject==null) { if (value instanceof String) { valueAsJavaObject=vconv.convertToJava(getType(), (String)value); } else { valueAsJavaObject=value; } } return valueAsJavaObject; }
ValueConverter vconv=new ValueConverter(this); if (getName().RDF_LITERAL.equals(attr.getType())&& (aValue instanceof String)) { aValue=vconv.convertToJava(attr.getType(),(String)aValue);
/** * Gets the value of the test property. * * @return * possible object is * {@link AValue } * */ @Embedded public AValue getValueItem() { if ((avalue==null) && (value!=null)) { if (type==null) { avalue=SQLValueConverter.convertToAValue(vc.getXsdType(value), value); } else if (value instanceof LangString) { avalue=SQLValueConverter.convertToAValue(type, ((LangString) value).getValue()); } else if (value instanceof org.openprovenance.prov.model.QualifiedName) { avalue=SQLValueConverter.convertToAValue(type, (QualifiedName) value); } else { avalue=SQLValueConverter.convertToAValue(type, vc.convertToJava(type, (String)value)); } } return avalue; }
private Attribute decodeAttributeValue(JsonElement element, QualifiedName elementName) { if (element.isJsonPrimitive()) { Object o = decodeJSONPrimitive(element.getAsString()); QualifiedName type = vconv.getXsdType(o); return pf.newAttribute(elementName, o, type); } else {
return convertXMLLiteral(value);
ValueConverter vconv=new ValueConverter(this); if (getName().RDF_LITERAL.equals(attr.getType())&& (aValue instanceof String)) { aValue=vconv.convertToJava(attr.getType(),(String)aValue);
private Attribute decodeAttributeValue(JsonElement element, QualifiedName elementName) { if (element.isJsonPrimitive()) { Object o = decodeJSONPrimitive(element.getAsString()); QualifiedName type = vconv.getXsdType(o); return pf.newAttribute(elementName, o, type); } else {
return convertXMLLiteral(value);
public ProvDocumentDeserializer(ProvFactory pf) { this.pf=pf; this.name=pf.getName(); this.vconv = new ValueConverter(pf); }
/** * Gets the value of the value property. * * @return * possible object is * {@link Object } * */ public Object convertValueToObject(ValueConverter vconv) { if (valueAsJava==null) { valueAsJava=vconv.convertToJava(getType(), (String)value); } return valueAsJava; } @Transient
public TreeTraversal(ModelConstructor c, ProvFactory pFactory) { this.c=c; this.pFactory=pFactory; this.name=pFactory.getName(); this.namespace=pFactory.newNamespace(); this.namespace.addKnownNamespaces(); this.vconv=new ValueConverter(pFactory); }
return pFactory .newAttribute(namespace, local, prefix, vconv.convertToJava(type, child), type); } else { return pFactory.newAttribute(namespace, local, prefix, pFactory
public TreeTraversal(ModelConstructor c, ProvFactory pFactory) { this.c=c; this.pFactory=pFactory; this.name=pFactory.getName(); this.namespace=pFactory.newNamespace(); this.namespace.addKnownNamespaces(); this.vconv=new ValueConverter(pFactory); }
return pFactory .newAttribute(namespace, local, prefix, vconv.convertToJava(type, child), type); } else { return pFactory.newAttribute(namespace, local, prefix, pFactory
this.valueConverter = new ValueConverter(pFactory); this.bundles = new Hashtable<QualifiedName, BundleHolder>(); this.namespace=new Namespace();
this.valueConverter = new ValueConverter(pFactory); this.bundles = new Hashtable<QualifiedName, BundleHolder>(); this.namespace=new Namespace();