code: public static String getNameOperation(byte[] scriptPubKey) {
  		if (scriptPubKey==null) {
  			return NamecoinUtil.STR_OP_UNKNOWN;
  		}
  		if (scriptPubKey.length>1)  {
  			byte nameOp=scriptPubKey[0];
  			switch(nameOp) {
  				case NamecoinUtil.OP_NAME_NEW: 
  					return NamecoinUtil.STR_OP_NAME_NEW;
  				case NamecoinUtil.OP_NAME_FIRSTUPDATE: 
  					return NamecoinUtil.STR_OP_NAME_FIRSTUPDATE;
  				case NamecoinUtil.OP_NAME_UDPATE: 
  					return NamecoinUtil.STR_OP_NAME_UDPATE;
  				default:
  						return NamecoinUtil.STR_OP_UNKNOWN;
  			}
  
  		}
  		// in all other cases we do not know
  		return NamecoinUtil.STR_OP_UNKNOWN;
  	}
docs: Determines the name operation (if any) of the given script. Please note that not all Namecoin transactions do contain Namecoin fields, some are coinbase (ie mining) transactions and others are regular transactions to transfer Namecoins (comparable to Bitcoin transactions
  
  @param scriptPubKey Output script potentially containing a Namecoin operation
  @return  Name operation: "OP_NAME_NEW", "OP_NAME_FIRST_UPDATE", "OP_NAME_UPDATE" or in case it cannot be determined: "unknown"