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: ");
}
}