<commit_before>/**
 * <!-- LICENSE_TEXT_START -->
The contents of this file are subject to the caAdapter Software License (the "License"). You may obtain a copy of the License at the following location: 
[caAdapter Home Directory]\docs\caAdapter_license.txt, or at:
http://ncicb.nci.nih.gov/infrastructure/cacore_overview/caadapter/indexContent/docs/caAdapter_License
 * <!-- LICENSE_TEXT_END -->
 */

package gov.nih.nci.caadapter.common.metadata;

import gov.nih.nci.caadapter.common.MetaObjectImpl;
import gov.nih.nci.caadapter.common.SDKMetaData;
/**
 * This class holds attributemetadata during the mapping.
 * @version 1.0
 * @created 11-Aug-2006 8:18:15 AM
 * @author LAST UPDATE $Author: wangeug $
 * @since      caAdapter  v4.2    
 * @version    $Revision: 1.7 $
 * @date       $Date: 2009-07-30 17:31:55 $
 */
public class AttributeMetadata extends MetaObjectImpl implements SDKMetaData{

	private String datatype;
	/**
	 * This attribute represents the name of an object attribute
	 * concatenated with the fully qualified domain name of the parent
	 * object.
	 */
	private String name;
	private String xPath;
	private boolean derived;
	private boolean childTag=true; //define if a child tag is required to represent this the attribute
									//as GME present a object metadata as an XML
	
	public String getDatatype(){
		return datatype;
	}

	public String getName(){
		return name;
	}

	public String toString() {  
		if (isDerived()) {
			return getName() + " (A - Derived)";
		}

        if (isChildTag()){
			return getName() + " (A)";
		}
		else
			return "@"+getName() + " (A)";
		//TODO: check for xmi<commit_msg>Set display names for tree nodes<commit_after>/**
 * <!-- LICENSE_TEXT_START -->
The contents of this file are subject to the caAdapter Software License (the "License"). You may obtain a copy of the License at the following location: 
[caAdapter Home Directory]\docs\caAdapter_license.txt, or at:
http://ncicb.nci.nih.gov/infrastructure/cacore_overview/caadapter/indexContent/docs/caAdapter_License
 * <!-- LICENSE_TEXT_END -->
 */

package gov.nih.nci.caadapter.common.metadata;

import gov.nih.nci.caadapter.common.MetaObjectImpl;
import gov.nih.nci.caadapter.common.SDKMetaData;
/**
 * This class holds attributemetadata during the mapping.
 * @version 1.0
 * @created 11-Aug-2006 8:18:15 AM
 * @author LAST UPDATE $Author: wangeug $
 * @since      caAdapter  v4.2    
 * @version    $Revision: 1.7 $
 * @date       $Date: 2009-07-30 17:31:55 $
 */
public class AttributeMetadata extends MetaObjectImpl implements SDKMetaData{

	private String datatype;
	/**
	 * This attribute represents the name of an object attribute
	 * concatenated with the fully qualified domain name of the parent
	 * object.
	 */
	private String name;
	private String xPath;
	private boolean derived;
	private boolean childTag=true; //define if a child tag is required to represent this the attribute
									//as GME present a object metadata as an XML
	
	public String getDatatype(){
		return datatype;
	}

	public String getName(){
		return name;
	}

	public String toString() {  
		String rtnSt="";
		if (isDerived()) {
			rtnSt= getName() + " (A - Inherited)";
		}
		else  if (isChildTag()){
        	rtnSt=getName() + " (A)";
		}
		else
			rtnSt= "@"+getName() + " (A)";
        if (this.getDatatype()==null)
        	return rtnSt;
        else
        	return rtnSt+":"+this.getDatatype();
		//TODO: check for xmi
{'fraction_non_alphanumeric': 0.11350407450523865, 'fraction_numerical': 0.018044237485448197, 'mean_word_length': 3.4463130659767143, 'pattern_counts': {'":': 1, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '21887', 'n_tokens_mistral': 1167, 'n_tokens_neox': 1057, 'n_words': 341}