Package org.enhydra.shark.xpdl.elements

Examples of org.enhydra.shark.xpdl.elements.TypeDeclaration


    }

    public TypeDeclaration createXPDLObject(TypeDeclarations tds,
            String type,
            boolean addToCollection) {
        TypeDeclaration td = (TypeDeclaration) tds.generateNewElement();
        adjustType(td, type);

        JaWETypes jts = JaWEManager.getInstance().getJaWEController().getJaWETypes();
        boolean hasTemplate = jts.hasTemplateId(type);
        if (hasTemplate) {
            jts.fillFromTemplate(td, type);
        }
        String id = td.getId();
        if (!hasTemplate || id.equals("") || tds.getTypeDeclaration(id) != null) {
            if (id.equals("")) {
                id = JaWEManager.getInstance().getIdFactory().generateUniqueId(tds);
            } else {
                id = JaWEManager.getInstance().getIdFactory().generateSimilarOrIdenticalUniqueId(tds, new HashSet(), id);
            }
            int i = 0;
            while (tds.getTypeDeclaration(id) != null) {
                id = id + String.valueOf(++i);
            }
            td.setId(id);
        }

        adjustXPDLObject(td, type);

        if (addToCollection) {
View Full Code Here


    }

    protected void checkDeclaredTypeId(XMLAttribute dtId, List existingErrors)
    {
        String tdId = dtId.toValue();
        TypeDeclaration td = XMLUtil.getPackage(dtId).getTypeDeclaration(tdId);
        if(td == null)
        {
            XMLValidationError verr = new XMLValidationError("ERROR", "LOGIC", "ERROR_NON_EXISTING_TYPE_DECLARATION_REFERENCE", tdId, dtId);
            existingErrors.add(verr);
        }
View Full Code Here

TOP

Related Classes of org.enhydra.shark.xpdl.elements.TypeDeclaration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.