public Attribute newAttribute(String namespace, String localName, String prefix, Object value, QualifiedName type) { Attribute res; res = newAttribute(newQualifiedName(namespace, localName, prefix), value, type); return res; }
public List<TypedValue> a_val(QualifiedName s) { List<TypedValue> ll=new LinkedList<TypedValue>(); ll.add(pf.newAttribute(pf.newQualifiedName(TMPL_NS, "ignore", "app"), s, name.PROV_QUALIFIED_NAME)); return ll; }
public Attribute newAttribute(String namespace, String localName, String prefix, Object value, QualifiedName type) { Attribute res; res = newAttribute(newQualifiedName(namespace, localName, prefix), value, type); return res; }
/** Attribute value */ public List<TypedValue> a_val(String s) { List<TypedValue> ll=new LinkedList<TypedValue>(); ll.add(pf.newAttribute(pf.newQualifiedName(TMPL_NS, "ignore", "app"), s, name.XSD_STRING)); return ll; }
public void add1DValues_v2(List<Statement> ll, Hashtable<QualifiedName, List<QualifiedName>> variables) { for (Entry<QualifiedName, List<QualifiedName>> entry: variables.entrySet()) { int count=0; List<Attribute> attrs=new LinkedList<Attribute>(); for (QualifiedName qn: entry.getValue()) { attrs.add(pf.newAttribute(TMPL_NS, VALUE_v2+count, TMPL_PREFIX, qn, pf.getName().PROV_QUALIFIED_NAME)); count++; } Entity e=pf.newEntity(entry.getKey(),attrs); ll.add(e); } }
public void add1DValues_v2(List<Statement> ll, Hashtable<QualifiedName, List<QualifiedName>> variables) { for (Entry<QualifiedName, List<QualifiedName>> entry: variables.entrySet()) { int count=0; List<Attribute> attrs=new LinkedList<Attribute>(); for (QualifiedName qn: entry.getValue()) { attrs.add(pf.newAttribute(TMPL_NS, VALUE_v2+count, TMPL_PREFIX, qn, pf.getName().PROV_QUALIFIED_NAME)); count++; } Entity e=pf.newEntity(entry.getKey(),attrs); ll.add(e); } }
public void add1DValues(List<Statement> ll, Hashtable<QualifiedName, List<QualifiedName>> variables) { for (Entry<QualifiedName, List<QualifiedName>> entry: variables.entrySet()) { int count=0; List<Attribute> attrs=new LinkedList<Attribute>(); for (QualifiedName qn: entry.getValue()) { attrs.add(pf.newAttribute(TMPL_NS, VALUE+count, TMPL_PREFIX, qn, pf.getName().PROV_QUALIFIED_NAME)); count++; } Entity e=pf.newEntity(entry.getKey(),attrs); ll.add(e); } } public void add1DValues_v2(List<Statement> ll, Hashtable<QualifiedName, List<QualifiedName>> variables) {
public void addVariableBindingsAsAttributeBindings() { Hashtable<QualifiedName, List<QualifiedName>> vb=getVariables(); for(Entry<QualifiedName,List<QualifiedName>> entry: vb.entrySet()) { int count=0; for (QualifiedName qn: entry.getValue()) { List<TypedValue> ll=new LinkedList<TypedValue>(); ll.add(pf.newAttribute(TMPL_NS, VALUE2+count+"_"+0, TMPL_PREFIX, qn, pf.getName().PROV_QUALIFIED_NAME)); count++; addAttribute(entry.getKey(),ll); } } }
public void addVariableBindingsAsAttributeBindings() { Hashtable<QualifiedName, List<QualifiedName>> vb=getVariables(); for(Entry<QualifiedName,List<QualifiedName>> entry: vb.entrySet()) { int count=0; for (QualifiedName qn: entry.getValue()) { List<TypedValue> ll=new LinkedList<TypedValue>(); ll.add(pf.newAttribute(TMPL_NS, VALUE2+count+"_"+0, TMPL_PREFIX, qn, pf.getName().PROV_QUALIFIED_NAME)); count++; addAttribute(entry.getKey(),ll); } } }
public Attribute newAttributeForValue(Value obj, QualifiedName type) { Attribute attr; if (obj instanceof Literal) { attr=newAttribute((Literal)obj,type); } else if (obj instanceof Resource) { attr=pFactory.newAttribute(type, convertResourceToQualifiedName((Resource) obj), name.PROV_QUALIFIED_NAME); } else { throw new UnsupportedOperationException(); } return attr; }
public List<Attribute> convertLabelAttributes(HasLabel e, List<Attribute> acc) { List<LangString> labels = e.getLabel(); for (LangString label : labels) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_LABEL,label, pFactory.getName().XSD_STRING)); } return acc; }
public Attribute newAttributeForValue(Value obj, QualifiedName type) { Attribute attr; if (obj instanceof Literal) { attr=newAttribute((Literal)obj,type); } else if (obj instanceof Resource) { attr=pFactory.newAttribute(type, convertResourceToQualifiedName((Resource) obj), name.PROV_QUALIFIED_NAME); } else { throw new UnsupportedOperationException(); } return attr; }
public List<Attribute> convertRoleAttributes(HasRole e, List<Attribute> acc) { List<Role> roles = e.getRole(); for (Role role : roles) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_ROLE, role.getValue(), role.getType())); } return acc; }
public List<Attribute> convertLocationAttributes(HasLocation e, List<Attribute> acc) { List<Location> locations = e.getLocation(); for (Location location : locations) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_LOCATION, location.getValue(), location.getType())); } return acc; }
public List<Attribute> convertLocationAttributes(HasLocation e, List<Attribute> acc) { List<Location> locations = e.getLocation(); for (Location location : locations) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_LOCATION, location.getValue(), location.getType())); } return acc; }
public Object convertValueAttributes(HasValue e, List<Attribute> acc) { Value value = e.getValue(); if (value==null) return acc; acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_VALUE, value.getValue(), value.getType())); return acc; }
public List<Attribute> convertRoleAttributes(HasRole e, List<Attribute> acc) { List<Role> roles = e.getRole(); for (Role role : roles) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_ROLE, role.getValue(), role.getType())); } return acc; }
public List<Attribute> convertTypeAttributes(HasType e, List<Attribute> acc) { List<Type> types=e.getType(); for (Type type : types) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_TYPE, type.getValue(), //type.getValueAsObject(vconv), type.getType())); } return acc; }
public Object convertValueAttributes(HasValue e, List<Attribute> acc) { Value value = e.getValue(); if (value==null) return acc; acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_VALUE, value.getValue(), value.getType())); return acc; }
public List<Attribute> convertTypeAttributes(HasType e, List<Attribute> acc) { List<Type> types=e.getType(); for (Type type : types) { acc.add(pFactory.newAttribute(Attribute.AttributeKind.PROV_TYPE, type.getValue(), //type.getValueAsObject(vconv), type.getType())); } return acc; }