Search in sources :

Example 1 with QName

use of org.camunda.bpm.model.xml.impl.util.QName 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;
}
Also used : ModelElementType(org.camunda.bpm.model.xml.type.ModelElementType) QName(org.camunda.bpm.model.xml.impl.util.QName) ArrayList(java.util.ArrayList)

Example 2 with QName

use of org.camunda.bpm.model.xml.impl.util.QName in project camunda-xml-model by camunda.

the class ModelImpl method registerType.

/**
 * Registers a {@link ModelElementType} in this {@link Model}.
 *
 * @param modelElementType  the element type to register
 * @param instanceType  the instance class of the type to register
 */
public void registerType(ModelElementType modelElementType, Class<? extends ModelElementInstance> instanceType) {
    QName qName = ModelUtil.getQName(modelElementType.getTypeNamespace(), modelElementType.getTypeName());
    typesByName.put(qName, modelElementType);
    typesByClass.put(instanceType, modelElementType);
}
Also used : QName(org.camunda.bpm.model.xml.impl.util.QName)

Aggregations

QName (org.camunda.bpm.model.xml.impl.util.QName)2 ArrayList (java.util.ArrayList)1 ModelElementType (org.camunda.bpm.model.xml.type.ModelElementType)1