public Property newProperty(Property property) { return newProperty(property.getKey(),property.getValue()); }
public void expandAnnotation(EmbeddedAnnotation ann) { if (ann instanceof Label) { Label label=(Label) ann; String labelValue=label.getValue(); ann.getProperty().add(newProperty(LABEL_PROPERTY,labelValue)); } if (ann instanceof Type) { Type type=(Type) ann; String typeValue=type.getValue(); ann.getProperty().add(newProperty(TYPE_PROPERTY,typeValue)); } if (ann instanceof Value) { Value val=(Value) ann; Object valValue=val.getContent(); ann.getProperty().add(newProperty(VALUE_PROPERTY,valValue)); } if (ann instanceof PName) { PName pname=(PName) ann; String pnameValue=pname.getValue(); ann.getProperty().add(newProperty(PNAME_PROPERTY,pnameValue)); } }
public EmbeddedAnnotation newEmbeddedAnnotation(String id, String property, Object value, Collection<AccountRef> accs, Object dummyParameterForAvoidingSameErasure) { EmbeddedAnnotation res=of.createEmbeddedAnnotation(); res.setId(id); addProperty(res,newProperty(property,value)); addAccounts(res,accs); return res; } public EmbeddedAnnotation newEmbeddedAnnotation(String id,
properties.add(pFactory.newProperty(predicateUri,o)); } else if (predicateUri.equals(OPMXml2Rdf.OPM_HAS_ANNOTATION)) { System.out.println("*********************** Found annotation of annotation !");
public Annotation newAnnotation(String id, Ref ref, String property, Object value, Collection<AccountRef> accs) { Annotation res=of.createAnnotation(); res.setId(id); res.setLocalSubject(ref.getRef()); addProperty(res,newProperty(property,value)); addAccounts(res,accs); return res; }