public void addRole(HasRole a, Role role) { if (role != null) { a.getRole().add(role); } }
public void addRole(HasRole a, Role role) { if (role != null) { a.getRole().add(role); } }
public void doActionRoles(HasRole s) { for(org.openprovenance.prov.model.Role loc: s.getRole()) { doAction(loc); } }
public Collection<Attribute> getAttributes(Statement statement) { Collection<Attribute> result=new LinkedList<Attribute>(); if (statement instanceof HasType) result.addAll(((HasType)statement).getType()); if (statement instanceof HasLocation) result.addAll(((HasLocation)statement).getLocation()); if (statement instanceof HasRole) result.addAll(((HasRole)statement).getRole()); if (statement instanceof HasValue) { Value val=((HasValue)statement).getValue(); if (val!=null) { result.add(val); } } if (statement instanceof HasOther) { for (Other o: ((HasOther)statement).getOther()) { result.add((Attribute)o); } } return result; }
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 Collection<Attribute> getAttributes(Statement statement) { Collection<Attribute> result=new LinkedList<Attribute>(); if (statement instanceof HasType) result.addAll(((HasType)statement).getType()); if (statement instanceof HasLocation) result.addAll(((HasLocation)statement).getLocation()); if (statement instanceof HasRole) result.addAll(((HasRole)statement).getRole()); if (statement instanceof HasValue) { Value val=((HasValue)statement).getValue(); if (val!=null) { result.add(val); } } if (statement instanceof HasOther) { for (Other o: ((HasOther)statement).getOther()) { result.add((Attribute)o); } } return result; }
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 void addRoles(HasRole hl){ for (Object [] pair: attributeValues) { Object value=pair[0]; QualifiedName type=(QualifiedName) pair[1]; hl.getRole().add(pFactory.newRole(value,type)); } } public void addOthers(HasOther ho, org.openprovenance.prov.model.QualifiedName elementName) {
public void emitAnnotations(String id, HasOther statement, PrintStream out) { if (((statement.getOther()==null) || (statement.getOther().isEmpty()) || (countOthers(statement)==0)) && (((HasType)statement).getType().isEmpty()) && (! (statement instanceof HasValue) || ((HasValue)statement).getValue()==null) && (! (statement instanceof HasRole) || ((HasRole)statement).getRole().isEmpty()) && (((HasLabel)statement).getLabel().isEmpty()) ) return; HashMap<String,String> properties=new HashMap<String, String>(); QualifiedName newId=annotationId(((Identifiable)statement).getId(),id); emitElement(newId, addAnnotationShape(statement,addAnnotationColor(statement,addAnnotationLabel(statement,properties))), out); HashMap<String,String> linkProperties=new HashMap<String, String>(); emitRelation(qualifiedNameToString(newId), qualifiedNameToString(((Identifiable)statement).getId()), addAnnotationLinkProperties(statement,linkProperties),out,true); }
public void emitAnnotations(String id, HasOther statement, PrintStream out) { if (((statement.getOther()==null) || (statement.getOther().isEmpty()) || (countOthers(statement)==0)) && (((HasType)statement).getType().isEmpty()) && (! (statement instanceof HasValue) || ((HasValue)statement).getValue()==null) && (! (statement instanceof HasRole) || ((HasRole)statement).getRole().isEmpty()) && (((HasLabel)statement).getLabel().isEmpty()) ) return; HashMap<String,String> properties=new HashMap<String, String>(); QualifiedName newId=annotationId(((Identifiable)statement).getId(),id); emitElement(newId, addAnnotationShape(statement,addAnnotationColor(statement,addAnnotationLabel(statement,properties))), out); HashMap<String,String> linkProperties=new HashMap<String, String>(); emitRelation(qualifiedNameToString(newId), qualifiedNameToString(((Identifiable)statement).getId()), addAnnotationLinkProperties(statement,linkProperties),out,true); }
for (Role role: ((HasRole)ann).getRole()) { label=label+" <TR>\n"; label=label+" <TD align=\"left\">" + "role" + ":</TD>\n";
for (Role role: ((HasRole)ann).getRole()) { label=label+" <TR>\n"; label=label+" <TD align=\"left\">" + "role" + ":</TD>\n";
case PROV_ROLE: if (rol!=null) { rol.getRole().add(newRole(aValue,attr.getType()));
case PROV_ROLE: if (rol!=null) { rol.getRole().add(newRole(aValue,attr.getType()));
if (!values.isEmpty()) { if (statement instanceof HasRole) { List<Role> roles = ((HasRole) statement).getRole(); for (JsonElement value : values) { roles.add((org.openprovenance.prov.model.Role) decodeAttributeValue(value,
if (!values.isEmpty()) { if (statement instanceof HasRole) { List<Role> roles = ((HasRole) statement).getRole(); for (JsonElement value : values) { roles.add((org.openprovenance.prov.model.Role) decodeAttributeValue(value,