<commit_before>package org.ndexbio.model.object.network;


import org.ndexbio.model.object.NdexProperty;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)

public class PropertyGraphNode extends PropertiedNetworkElement implements Comparable <PropertyGraphNode> {

   public static final String represents = "NDEX:represents";
   public static final String aliases    = "NDEX:aliases";
   public static final String relatedTerms   = "NDEX:relatedTerms";
   public static final String name       = "NDEX:nodeName";
	
   public PropertyGraphNode () {
      super();
   }


public int compareTo(PropertyGraphNode o) {
	long c = this.getId() - o.getId();
	
	if ( c > 0) return 1;
	if ( c < 0) return -1;
	return 0;
	
}
   
@Override
public int hashCode () { return (int) getId(); }

 @Override
public boolean equals(Object anObject) {
	 if ( anObject instanceof PropertyGraphNode) {
		return ((PropertyGraphNode)anObject).getId() == getId();
	 }
	 return false;
 }

 	/**
 	 * Set the name of the node.
 	 * @param name
 	 */
 	public void setName (String nodeName) {
	  for ( NdexProperty p : this.getProperties()) {
		  if ( p.getPredicateString().equals(name)) {
			  p.setValue(nodeName);
			  return;
		  }   
	  }
	  NdexProperty p = new NdexProperty(name, nodeName);
	  this.getProperties().add(p);

 	}
 
}<commit_msg>added getName in PropertyGraphNode.<commit_after>package org.ndexbio.model.object.network;


import org.ndexbio.model.object.NdexProperty;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)

public class PropertyGraphNode extends PropertiedNetworkElement implements Comparable <PropertyGraphNode> {

   public static final String represents = "NDEX:represents";
   public static final String aliases    = "NDEX:aliases";
   public static final String relatedTerms   = "NDEX:relatedTerms";
   public static final String name       = "NDEX:nodeName";
	
   public PropertyGraphNode () {
      super();
   }


public int compareTo(PropertyGraphNode o) {
	long c = this.getId() - o.getId();
	
	if ( c > 0) return 1;
	if ( c < 0) return -1;
	return 0;
	
}
   
@Override
public int hashCode () { return (int) getId(); }

 @Override
public boolean equals(Object anObject) {
	 if ( anObject instanceof PropertyGraphNode) {
		return ((PropertyGraphNode)anObject).getId() == getId();
	 }
	 return false;
 }

 	/**
 	 * Set the name of the node.
 	 * @param name
 	 */
 	public void setName (String nodeName) {
	  for ( NdexProperty p : this.getProperties()) {
		  if ( p.getPredicateString().equals(name)) {
			  p.setValue(nodeName);
			  return;
		  }   
	  }
	  NdexProperty p = new NdexProperty(name, nodeName);
	  this.getProperties().add(p);

 	}

 	
 	  public String getName () {
 		  for ( NdexProperty p : this.getProperties()) {
 			  if ( p.getPredicateString().equals(name))
 				  return p.getValue();
 		  }
 		  return null;
 	  }

}
{'fraction_non_alphanumeric': 0.11361344537815125, 'fraction_numerical': 0.0033613445378151263, 'mean_word_length': 3.48868778280543, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6542154', 'n_tokens_mistral': 1004, 'n_tokens_neox': 908, 'n_words': 238}