use of org.camunda.bpm.model.xml.type.ModelElementType in project camunda-dmn-model by camunda.
the class ExtensionElementsImpl method addExtensionElement.
public ModelElementInstance addExtensionElement(String namespaceUri, String localName) {
ModelElementType extensionElementType = modelInstance.registerGenericType(namespaceUri, localName);
ModelElementInstance extensionElement = extensionElementType.newInstance(modelInstance);
addChildElement(extensionElement);
return extensionElement;
}
use of org.camunda.bpm.model.xml.type.ModelElementType in project camunda-xml-model by camunda.
the class ModelUtil method calculateAllBaseTypes.
/**
* Calculate a collection of all base types for the given type
*/
public static Collection<ModelElementType> calculateAllBaseTypes(ModelElementType type) {
List<ModelElementType> baseTypes = new ArrayList<ModelElementType>();
ModelElementTypeImpl typeImpl = (ModelElementTypeImpl) type;
typeImpl.resolveBaseTypes(baseTypes);
return baseTypes;
}
use of org.camunda.bpm.model.xml.type.ModelElementType in project camunda-xml-model by camunda.
the class AttributeAssert method hasOwningElementType.
public AttributeAssert hasOwningElementType(ModelElementType owningElementType) {
isNotNull();
ModelElementType actualOwningElementType = actual.getOwningElementType();
if (!owningElementType.equals(actualOwningElementType)) {
failWithMessage("Expected attribute <%s> to have owning element type <%s> but was <%s>", attributeName, owningElementType, actualOwningElementType);
}
return this;
}
use of org.camunda.bpm.model.xml.type.ModelElementType in project camunda-xml-model by camunda.
the class ChildElementAssert method hasParentElementType.
public ChildElementAssert hasParentElementType(ModelElementType parentElementType) {
isNotNull();
ModelElementType actualParentElementType = actual.getParentElementType();
if (!parentElementType.equals(actualParentElementType)) {
failWithMessage("Expected child element <%s> to have parent element type <%s> but has <%s>", typeClass, parentElementType.getTypeName(), actualParentElementType.getTypeName());
}
return this;
}
use of org.camunda.bpm.model.xml.type.ModelElementType in project camunda-xml-model by camunda.
the class ModelElementTypeAssert method getTypeNames.
private Collection<String> getTypeNames(Collection<ModelElementType> elementTypes) {
List<String> typeNames = new ArrayList<String>();
QName qName;
for (ModelElementType elementType : elementTypes) {
qName = new QName(elementType.getTypeNamespace(), elementType.getTypeName());
typeNames.add(qName.toString());
}
return typeNames;
}
Aggregations