public static boolean isEventable(Property property, FunctionBlock fb) { if (findEventByName(property.getName(), fb) !=null) { return true; } return false; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); if (findOperationByName(setterName,fb) != null) { return true; } return false; }
public static EList<Entity> getReferencedEntities(FunctionBlock fb) { EList<Entity> entities = new BasicEList<Entity>(); for (Type type : getReferencedTypes(fb)) { if (type instanceof Entity) { entities.add((Entity) type); } } return entities; }
public String getAccessString(final Property property, final FunctionBlock fb) { String accessString = null; boolean _isReadable = CodeGenTools.isReadable(property, fb); if (_isReadable) { accessString = "R"; } boolean _isWritable = CodeGenTools.isWritable(property, fb); if (_isWritable) { accessString = (accessString + "W"); } boolean _isEventable = CodeGenTools.isEventable(property, fb); if (_isEventable) { accessString = (accessString + "E"); } return accessString; } }
public String getAccessString(final Property property, final FunctionBlock fb) { String accessString = null; boolean _isReadable = CodeGenTools.isReadable(property, fb); if (_isReadable) { accessString = "R"; } boolean _isWritable = CodeGenTools.isWritable(property, fb); if (_isWritable) { accessString = (accessString + "W"); } boolean _isEventable = CodeGenTools.isEventable(property, fb); if (_isEventable) { accessString = (accessString + "E"); } return accessString; } }
public static EList<Enum> getReferencedEnums(FunctionBlock fb) { EList<Enum> enums = new BasicEList<Enum>(); for (Type type : getReferencedTypes(fb)) { if (type instanceof Enum) { enums.add((Enum) type); } } return enums; }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); if (findOperationByName(getterName,fb) != null) { return true; } return false; }
public static boolean isEventable(Property property, FunctionBlock fb) { return findEventByName(property.getName(), fb) != null; }
public static EList<Enum> getReferencedEnums(FunctionBlock fb) { EList<Enum> enums = new BasicEList<Enum>(); for (Type type : getReferencedTypes(fb)) { if (type instanceof Enum) { enums.add((Enum) type); } } return enums; }
public static boolean isReadable(Property property, FunctionBlock fb) { String getterName = GETTER_PREFIX + property.getName(); return findOperationByName(getterName, fb) != null; }
public static EList<Entity> getReferencedEntities(FunctionBlock fb) { EList<Entity> entities = new BasicEList<Entity>(); for (Type type : getReferencedTypes(fb)) { if (type instanceof Entity) { entities.add((Entity) type); } } return entities; }
public static boolean isWritable(Property property, FunctionBlock fb) { String setterName = SETTER_PREFIX + property.getName(); return findOperationByName(setterName, fb) != null; }
public static EList<Type> getReferencedTypes(Entity entity) { EList<Type> types = new BasicEList<Type>(); for (Property property : entity.getProperties()) { types.addAll(getReferencedTypes(property)); } types.add(entity.getSuperType()); return types; }
public static EList<Type> getReferencedTypes(Entity entity) { EList<Type> types = new BasicEList<Type>(); for (Property property : entity.getProperties()) { types.addAll(getReferencedTypes(property)); } types.add(entity.getSuperType()); return types; }
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }
public static EList<Type> getReferencedTypes(Property property) { EList<Type> types = new BasicEList<Type>(); if (property.getType() instanceof ObjectPropertyType) { ObjectPropertyType objectType = (ObjectPropertyType) property.getType(); types.add(objectType.getType()); if (objectType.getType() instanceof Entity) { types.addAll(getReferencedTypes((Entity) objectType.getType())); } } return types; }
public static EList<Type> getReferencedTypes(Property property) { EList<Type> types = new BasicEList<Type>(); if (property.getType() instanceof ObjectPropertyType) { ObjectPropertyType objectType = (ObjectPropertyType)property.getType(); types.add(objectType.getType()); if (objectType.getType() instanceof Entity) { types.addAll(getReferencedTypes((Entity)objectType.getType())); } } return types; }
public static EList<Type> getReferencedTypes(FunctionBlock fb) { EList<Type> types = new BasicEList<Type>(); if (fb != null) { // Analyze the status properties... if (fb.getStatus() != null) { for (Property property : fb.getStatus().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the configuration properties... if (fb.getConfiguration() != null) { for (Property property : fb.getConfiguration().getProperties()) { types.addAll(getReferencedTypes(property)); } } // Analyze the fault properties... if (fb.getFault() != null) { for (Property property : fb.getFault().getProperties()) { types.addAll(getReferencedTypes(property)); } } } return types; } }