Package org.openehr.am.archetype.ontology

Examples of org.openehr.am.archetype.ontology.ArchetypeOntology


    static int nodes_count = 0;
    static List<CObject> nodes = new ArrayList<>();

    public static void analyzeAttribute(CAttribute parent, Archetype archetype, ContainerPanel panel) {
       
        ArchetypeOntology archetypeOntology = archetype.getOntology();

        List<CObject> children = parent.getChildren();
       
        // items asi nikdy nebude z triedy CMultipleAttribute
        //if( parent.getRmAttributeName().equalsIgnoreCase("items") )
        {
       
            String parentPath = parent.path();
            CObject node = archetype.node(parentPath);
            debugText(parentPath);
            if( node instanceof CComplexObject){
                debugText("CComplexObject");
            }
            debugText("children size: "+children.size());
            String parentClassName = parent.getClass().getSimpleName();
            System.out.println("attribute class name: "+parentClassName);//+" - "+node.getRmTypeName()+"\n");

            debugText("rmAttributeName: "+parent.getRmAttributeName());
            CAttribute.Existence existence;
            existence = parent.getExistence();
            debugText("existence: "+existence);
            //debugText(parent.childNodePathBase());
            debugText("isAnyAllowed: "+parent.isAnyAllowed());
            debugText("isNotAllowed: "+parent.isNotAllowed());
            debugText("isRequired: "+parent.isRequired());

            if (node != null) {
                debugText("node class name: " + node.getClass().getSimpleName());
                debugText("nodeID: "+node.getNodeID());
                debugText("node rmTypeName: "+node.getRmTypeName());
                debugText("occurences: "+node.getOccurrences());
                debugText("li: "+node.getOccurrences().isLowerIncluded());
                debugText("lu: "+node.getOccurrences().isLowerUnbounded());
                debugText("l: "+node.getOccurrences().getLower());
                debugText("ui: "+node.getOccurrences().isUpperIncluded());
                debugText("uu: "+node.getOccurrences().isUpperUnbounded());
                debugText("u: "+node.getOccurrences().getUpper());
                //debugText(": "+node.);
                nodes_count++;
                nodes.add(node);
            }

            debugText("parentNodePath: "+parent.parentNodePath());
            CObject parentNode = archetype.node(parent.parentNodePath());
            if( parentNode != null ){
                debugText("parent nodeId: "+parentNode.getNodeID());
                if( parentNode.getNodeID() != null ){
                    debugText("term text: "+archetypeOntology.termDefinition("en", parentNode.getNodeID()).getText());
                } else {
                    debugText("term text: ");
                }               
            }
           
View Full Code Here


    }

    public static void analyzeNodes(Archetype a) {

        ArchetypeOntology archetypeOntology = a.getOntology();
       
        for (CObject node : nodes) {
            debugText(node.path());
            CObject parent = null;
            //String termString = archetypeOntology.termDefinition("en", node.getNodeID()).getText();
View Full Code Here

        System.out.println("paths size: " + paths.size());

        CObject node = null;
        String rmTypeName = null;
        ArchetypeOntology archetypeOntology = a.getOntology();
        ArchetypeTerm termDefinition = null;
        String termDefinitionString = null;
       
        int i = 0;
        for (String path : paths) {
            node = a.node(path);
            rmTypeName = node.getRmTypeName();
            if (node != null) {
//                if(    !rmTypeName.equalsIgnoreCase("ELEMENT")
//                    && !rmTypeName.equalsIgnoreCase("ITEM_TREE")
//                    && !rmTypeName.equalsIgnoreCase("EVENT")
//                    && !rmTypeName.equalsIgnoreCase("HISTORY")
//                    && !rmTypeName.equalsIgnoreCase("OBSERVATION")
//                    && !rmTypeName.equalsIgnoreCase("DV_CODED_TEXT")
//                   )
                {
                    termDefinition = archetypeOntology.termDefinition("en", node.getNodeID());
                    if(termDefinition != null){
                        termDefinitionString = termDefinition.getText();
                        i++;
                        debugText(termDefinitionString+"\n"+rmTypeName+" \t- "+node.getClass().getSimpleName() + " \t- " + path);
                    } else {
View Full Code Here

TOP

Related Classes of org.openehr.am.archetype.ontology.ArchetypeOntology

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.