/** * Create a string representation of this OAV object id. */ public String toString() { return type.getName()+"_"+id; }
/** * Create a string representation of this OAV object id. */ public String toString() { return type.getName()+"_"+id; }
/** * Create a string representation of this OAV object id. */ public String toString() { return type.getName()+"_"+id; }
/** * Create a string representation of this OAV object id. */ public String toString() { return type.getName()+"_"+id; }
/** * Test if two types are equal. * @return True if equal. */ public boolean equals(Object object) { return object instanceof OAVObjectType && ((OAVObjectType)object).getName().equals(name); }
/** * Test if two types are equal. * @return True if equal. */ public boolean equals(Object object) { return object instanceof OAVObjectType && ((OAVObjectType)object).getName().equals(name); }
/** * Get a string representation of this existential declaration. */ public String toString() { return type.getName()+" "+variable.getName(); }
/** * Get a string representation of this existential declaration. */ public String toString() { return type.getName()+" "+variable.getName(); }
/** * Remove an existing type. * Deletes the type from the state. * @param type The object type. * @return True, if could be removed. */ public boolean removeType(OAVObjectType type) { boolean ret = types.remove(type.getName())!=null; for(int i=0; !ret && tmodels!=null && i<tmodels.length; i++) ret = tmodels[i].removeType(type); return ret; }
/** * Remove an existing type. * Deletes the type from the state. * @param type The object type. * @return True, if could be removed. */ public boolean removeType(OAVObjectType type) { boolean ret = types.remove(type.getName())!=null; for(int i=0; !ret && tmodels!=null && i<tmodels.length; i++) ret = tmodels[i].removeType(type); return ret; }
/** * Get the string representation. * @return The string representation. */ public String toString() { StringBuffer ret = new StringBuffer(); ret.append("("); ret.append(type.getName()); for(int i=0; i<getConstraints().size(); i++) { ret.append(" "); ret.append(getConstraints().get(i).toString());//+"\n"); } ret.append(")"); return ret.toString(); } }
/** * Get the string representation. * @return The string representation. */ public String toString() { StringBuffer ret = new StringBuffer(); ret.append("("); ret.append(type.getName()); for(int i=0; i<getConstraints().size(); i++) { ret.append(" "); ret.append(getConstraints().get(i).toString());//+"\n"); } ret.append(")"); return ret.toString(); } }
buf.append(type.getName()); buf.append("_"); buf.append(id);
String kind = state.getType(mgoal).getName(); kind = kind.substring(1, kind.length()-4); // 'm<xyz>goal' String type = (String)state.getAttributeValue(mgoal, OAVBDIMetaModel.modelelement_has_name);
/** * Get the tag name for an object. */ public QName getTagName(Object object, IContext context) { QName ret; IOAVState state = (IOAVState)context; if(state.containsObject(object)) { String typename = state.getType(object).getName(); ret = new QName(typename); } else { String clazzname = SReflect.getClassName(object.getClass()); Namespace ns; int idx = clazzname.lastIndexOf("."); String pck = SXML.PROTOCOL_TYPEINFO+clazzname.substring(0, idx); String tag = clazzname.substring(idx+1); AWriteContext wc = (AWriteContext)context; ns = wc.getNamespace(pck); ret = new QName(ns.getURI(), tag, ns.getPrefix()); } return ret; }
/** * Get the tag name for an object. */ public QName getTagName(Object object, IContext context) { QName ret; IOAVState state = (IOAVState)context; if(state.containsObject(object)) { String typename = state.getType(object).getName(); ret = new QName(typename); } else { String clazzname = SReflect.getClassName(object.getClass()); Namespace ns; int idx = clazzname.lastIndexOf("."); String pck = SXML.PROTOCOL_TYPEINFO+clazzname.substring(0, idx); String tag = clazzname.substring(idx+1); AWriteContext wc = (AWriteContext)context; ns = wc.getNamespace(pck); ret = new QName(ns.getURI(), tag, ns.getPrefix()); } return ret; }
public String getObjectName(Object obj) { String name = null; if(state.getType(obj).isSubtype(OAVBDIMetaModel.modelelement_type)) { name = (String)state.getAttributeValue(obj, OAVBDIMetaModel.modelelement_has_name); } if(name==null && state.getType(obj).isSubtype(OAVBDIMetaModel.elementreference_type)) { name = (String)state.getAttributeValue(obj, OAVBDIMetaModel.elementreference_has_concrete); } if(name==null && state.getType(obj).isSubtype(OAVBDIMetaModel.expression_type)) { IParsedExpression exp =(IParsedExpression)state.getAttributeValue(obj, OAVBDIMetaModel.expression_has_parsed); String text = (String)state.getAttributeValue(obj, OAVBDIMetaModel.expression_has_text); name = exp!=null ? exp.getExpressionText() : text!=null ? text.trim() : null; } if(name==null) { name = ""+obj; } return obj instanceof String ? (String)obj : state.getType(obj).getName().substring(1) + " " + name; } }
&& BasicTypeConverter.isBuiltInType(((OAVJavaType)state.getType(elem)).getClazz()))) linked = internalLinkObjects(state.getType(elem).getName(), elem, parent, state);